¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptance; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptanceFile; |
| | | import com.yuanchu.mom.service.DeviceAcceptanceFileService; |
| | | import com.yuanchu.mom.service.DeviceAcceptanceService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | @Api(tags = "设å¤éªæ¶(è£
å¤)") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceAcceptance") |
| | | public class DeviceAcceptanceController { |
| | | |
| | | private DeviceAcceptanceService deviceAcceptanceService; |
| | | private DeviceAcceptanceFileService deviceAcceptanceFileService; |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤éªæ¶å表") |
| | | @PostMapping("/pageDeviceAcceptance") |
| | | public Result<IPage<DeviceAcceptance>> pageDeviceAcceptance(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceAcceptance deviceAcceptance = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceAcceptance.class); |
| | | return Result.success(deviceAcceptanceService.pageDeviceAcceptance(page, deviceAcceptance)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤éªæ¶ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤éªæ¶") |
| | | @GetMapping("/getDeviceAcceptance") |
| | | public Result getDeviceAcceptance(Integer acceptanceId){ |
| | | return Result.success(deviceAcceptanceService.getById(acceptanceId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤éªæ¶ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤éªæ¶") |
| | | @GetMapping("/delDeviceAcceptance") |
| | | public Result delDeviceAcceptance(Integer acceptanceId){ |
| | | return Result.success(deviceAcceptanceService.removeById(acceptanceId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤éªæ¶ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤éªæ¶") |
| | | @PostMapping("/addDeviceAcceptance") |
| | | public Result addDeviceAcceptance(@RequestBody DeviceAcceptance deviceAcceptance){ |
| | | return Result.success(deviceAcceptanceService.save(deviceAcceptance)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤éªæ¶ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ç¼è¾è®¾å¤éªæ¶") |
| | | @PostMapping("/updateDeviceAcceptance") |
| | | public Result updateDeviceAcceptance(@RequestBody DeviceAcceptance deviceAcceptance){ |
| | | return Result.success(deviceAcceptanceService.updateById(deviceAcceptance)); |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å¯¼åº |
| | | * @param acceptanceId 设å¤éªæ¶id |
| | | * @param response ååºä½ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "设å¤éªæ¶å¯¼åº") |
| | | @GetMapping("/exportDeviceAcceptance") |
| | | public void exportDeviceAcceptance(Integer acceptanceId, HttpServletResponse response){ |
| | | deviceAcceptanceService.exportDeviceAcceptance(acceptanceId, response); |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶éä»¶æ°å¢ |
| | | * @param acceptanceId |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "设å¤éªæ¶éä»¶æ°å¢") |
| | | @PostMapping("/uploadDeviceAcceptanceFile") |
| | | public Result<?> uploadDeviceAcceptanceFile(Integer acceptanceId, MultipartFile file) { |
| | | return Result.success(deviceAcceptanceService.uploadDeviceAcceptanceFile(acceptanceId, file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设å¤éªæ¶éä»¶å表 |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "设å¤éªæ¶éä»¶å表") |
| | | @GetMapping("/getDeviceAcceptanceFileList") |
| | | public Result<List<DeviceAcceptanceFile>> getVerifyMethodFileList(Integer acceptanceId){ |
| | | return Result.success(deviceAcceptanceFileService.list(Wrappers.<DeviceAcceptanceFile>lambdaQuery() |
| | | .eq(DeviceAcceptanceFile::getAcceptanceId, acceptanceId))); |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶éä»¶å é¤ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "设å¤éªæ¶éä»¶å é¤") |
| | | @GetMapping("/delDeviceAcceptanceFileList") |
| | | public Result delDeviceAcceptanceFileList(Integer acceptanceFileId){ |
| | | return Result.success(deviceAcceptanceFileService.removeById(acceptanceFileId)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceAccidentReport; |
| | | import com.yuanchu.mom.service.DeviceAccidentReportService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | @Api(tags = "设å¤äºæ
æ¥åå") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceAccidentReport") |
| | | public class DeviceAccidentReportController { |
| | | |
| | | private DeviceAccidentReportService deviceAccidentReportService; |
| | | |
| | | |
| | | /** |
| | | * 设å¤äºæ
æ¥åå表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "设å¤äºæ
æ¥åå表") |
| | | @PostMapping("/pageDeviceAccidentReport") |
| | | public Result<IPage<DeviceAccidentReport>> pageDeviceAccidentReport(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceAccidentReport deviceAccidentReport = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceAccidentReport.class); |
| | | return Result.success(deviceAccidentReportService.pageDeviceAccidentReport(page, deviceAccidentReport)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äºæ
æ¥å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤äºæ
æ¥å") |
| | | @GetMapping("/getDeviceAccidentReport") |
| | | public Result getDeviceAccidentReport(Integer accidentReportId){ |
| | | return Result.success(deviceAccidentReportService.getById(accidentReportId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤äºæ
æ¥å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤äºæ
æ¥å") |
| | | @GetMapping("/delDeviceAccidentReport") |
| | | public Result delDeviceAccidentReport(Integer accidentReportId){ |
| | | return Result.success(deviceAccidentReportService.removeById(accidentReportId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äºæ
æ¥å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤äºæ
æ¥å") |
| | | @PostMapping("/addDeviceAccidentReport") |
| | | public Result addDeviceAccidentReport(@RequestBody DeviceAccidentReport deviceAccidentReport){ |
| | | return Result.success(deviceAccidentReportService.addDeviceAccidentReport(deviceAccidentReport)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤äºæ
æ¥å |
| | | * @param accidentReportId 设å¤äºæ
æ¥åid |
| | | * @param response ååº |
| | | */ |
| | | @ApiOperation(value = "导åºè®¾å¤äºæ
æ¥å") |
| | | @GetMapping("/exportDeviceAccidentReport") |
| | | public Result exportDeviceAccidentReport(Integer accidentReportId, HttpServletResponse response) { |
| | | deviceAccidentReportService.exportDeviceAccidentReport(accidentReportId, response); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceBorrow; |
| | | import com.yuanchu.mom.service.DeviceBorrowService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/deviceBorrow") |
| | | public class DeviceBorrowController { |
| | | |
| | | @Resource |
| | | private DeviceBorrowService deviceBorrowService; |
| | | |
| | | |
| | | //å页 |
| | | @PostMapping("/deviceBorrowPage") |
| | | public Result deviceBorrowPage(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceBorrow deviceBorrow = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceBorrow.class); |
| | | return Result.success(deviceBorrowService.deviceBorrowPage(page, deviceBorrow)); |
| | | } |
| | | |
| | | //æ¥è¯¢ |
| | | @GetMapping("/getDeviceBorrow") |
| | | public Result getDeviceBorrow(Integer id) { |
| | | return Result.success(deviceBorrowService.getDeviceBorrow(id)); |
| | | } |
| | | |
| | | //æ°å¢ |
| | | @PostMapping("/saveDeviceBorrow") |
| | | public Result saveDeviceBorrow(@RequestBody DeviceBorrow deviceBorrow) { |
| | | return Result.success(deviceBorrowService.saveDeviceBorrow(deviceBorrow)); |
| | | } |
| | | |
| | | //å é¤ |
| | | @PostMapping("/deleteDeviceBorrow") |
| | | public Result deleteDeviceBorrow(Integer id) { |
| | | return Result.success(deviceBorrowService.removeById(id)); |
| | | } |
| | | |
| | | //å¯¼åº |
| | | @PostMapping("/deviceBorrowExport") |
| | | public Result deviceBorrowExport(@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) throws Exception { |
| | | List<DeviceBorrow> deviceBorrows = deviceBorrowService.getDeviceBorrowBydeviceId(deviceId); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(DeviceBorrow.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet() |
| | | .doWrite(deviceBorrows); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceBreakdownMaintenance; |
| | | import com.yuanchu.mom.service.DeviceBreakdownMaintenanceService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ
é维修表") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceBreakdownMaintenance") |
| | | public class DeviceBreakdownMaintenanceController { |
| | | |
| | | private DeviceBreakdownMaintenanceService deviceBreakdownMaintenanceService; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ
éç»´ä¿®å表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ
éç»´ä¿®å表") |
| | | @PostMapping("/pageDeviceBreakdownMaintenance") |
| | | public Result<IPage<DeviceBreakdownMaintenance>> pageDeviceBreakdownMaintenance(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceBreakdownMaintenance deviceBreakdownMaintenance = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceBreakdownMaintenance.class); |
| | | return Result.success(deviceBreakdownMaintenanceService.pageDeviceBreakdownMaintenance(page, deviceBreakdownMaintenance)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ
éç»´ä¿® |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤æ
éç»´ä¿®") |
| | | @GetMapping("/getDeviceBreakdownMaintenance") |
| | | public Result getDeviceBreakdownMaintenance(Integer maintenanceId){ |
| | | return Result.success(deviceBreakdownMaintenanceService.getById(maintenanceId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ
éç»´ä¿® |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ
éç»´ä¿®") |
| | | @GetMapping("/delDeviceBreakdownMaintenance") |
| | | public Result delDeviceBreakdownMaintenance(Integer maintenanceId){ |
| | | return Result.success(deviceBreakdownMaintenanceService.removeById(maintenanceId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ
éç»´ä¿® |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ
éç»´ä¿®") |
| | | @PostMapping("/addDeviceBreakdownMaintenance") |
| | | public Result addDeviceBreakdownMaintenance(@RequestBody DeviceBreakdownMaintenance deviceBreakdownMaintenance){ |
| | | return Result.success(deviceBreakdownMaintenanceService.addDeviceBreakdownMaintenance(deviceBreakdownMaintenance)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ
éç»´ä¿® |
| | | * @param maintenanceId è®¾å¤æ
éç»´ä¿®id |
| | | * @param response ååº |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºè®¾å¤æ
éç»´ä¿®") |
| | | @GetMapping("/exportDeviceBreakdownMaintenance") |
| | | public Result exportDeviceBreakdownMaintenance(Integer maintenanceId, HttpServletResponse response){ |
| | | deviceBreakdownMaintenanceService.exportDeviceBreakdownMaintenance(maintenanceId, response); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.DeviceCalibrationPlanDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlan; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail; |
| | | import com.yuanchu.mom.service.DeviceCalibrationPlanDetailService; |
| | | import com.yuanchu.mom.service.DeviceCalibrationPlanService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ ¡å计å") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceCalibrationPlan") |
| | | public class DeviceCalibrationPlanController { |
| | | |
| | | private DeviceCalibrationPlanService deviceCalibrationPlanService; |
| | | |
| | | private DeviceCalibrationPlanDetailService deviceCalibrationPlanDetailService; |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¡å计å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ ¡å计å") |
| | | @PostMapping("/addDeviceCalibrationPlan") |
| | | public Result addDeviceCalibrationPlan(@RequestBody DeviceCalibrationPlanDto calibrationPlanDto){ |
| | | return Result.success(deviceCalibrationPlanService.addDeviceCalibrationPlan(calibrationPlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¡å计å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导å
¥è®¾å¤æ ¡å计å") |
| | | @PostMapping("/importDeviceCalibrationPlan") |
| | | public Result importDeviceCalibrationPlan(MultipartFile file, String planYear){ |
| | | return Result.success(deviceCalibrationPlanService.importDeviceCalibrationPlan(file, planYear)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå é¤ |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "è®¾å¤æ ¡å计åå é¤") |
| | | @GetMapping("/delQualitySupervise") |
| | | public Result delQualitySupervise(Integer planId){ |
| | | return Result.success(deviceCalibrationPlanService.removeById(planId)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡åè®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ValueClassify("è´¨éè®¾å¤æ ¡å计å") |
| | | @ApiOperation(value = "è®¾å¤æ ¡åè®¡åæ¹å") |
| | | @PostMapping("/ratifyDeviceCalibrationPlan") |
| | | public Result ratifyDeviceCalibrationPlan(@RequestBody DeviceCalibrationPlan DeviceCalibrationPlan){ |
| | | return Result.success(deviceCalibrationPlanService.ratifyDeviceCalibrationPlan(DeviceCalibrationPlan)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "è®¾å¤æ ¡å计åå表") |
| | | @PostMapping("/pageDeviceCalibrationPlan") |
| | | public Result<IPage<DeviceCalibrationPlanDto>> pageDeviceCalibrationPlan(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceCalibrationPlan DeviceCalibrationPlan = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceCalibrationPlan.class); |
| | | return Result.success(deviceCalibrationPlanService.pageDeviceCalibrationPlan(page, DeviceCalibrationPlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计å详æ
å表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "è®¾å¤æ ¡å计å详æ
å表") |
| | | @PostMapping("/pageDeviceCalibrationPlanDetail") |
| | | public Result<IPage<DeviceCalibrationPlanDetail>> pageDeviceCalibrationPlanDetail(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceCalibrationPlanDetail deviceCalibrationPlanDetails = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceCalibrationPlanDetail.class); |
| | | return Result.success(deviceCalibrationPlanService.pageDeviceCalibrationPlanDetail(page, deviceCalibrationPlanDetails)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¡å计å详æ
|
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ ¡å计å详æ
") |
| | | @PostMapping("/addDeviceCalibrationPlanDetail") |
| | | public Result addDeviceCalibrationPlanDetail(@RequestBody DeviceCalibrationPlanDetail deviceCalibrationPlanDetail){ |
| | | if (deviceCalibrationPlanDetail.getPlanId() == null) { |
| | | throw new ErrorException("缺å°è®¾å¤æ ¡å计å主表id"); |
| | | } |
| | | return Result.success(deviceCalibrationPlanDetailService.save(deviceCalibrationPlanDetail)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ ¡å计å详æ
|
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "ä¿®æ¹è®¾å¤æ ¡å计å详æ
") |
| | | @PostMapping("/updateDeviceCalibrationPlanDetail") |
| | | public Result updateDeviceCalibrationPlanDetail(@RequestBody DeviceCalibrationPlanDetail deviceCalibrationPlanDetail){ |
| | | return Result.success(deviceCalibrationPlanDetailService.updateById(deviceCalibrationPlanDetail)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ ¡å计å详æ
|
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "å é¤è®¾å¤æ ¡å计å详æ
") |
| | | @GetMapping("/delDeviceCalibrationPlanDetail") |
| | | public Result delDeviceCalibrationPlanDetail(Integer planDetailsId){ |
| | | return Result.success(deviceCalibrationPlanDetailService.removeById(planDetailsId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¡å计å |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºè®¾å¤æ ¡å计å") |
| | | @GetMapping("/exportDeviceCalibrationPlanDetail") |
| | | public void exportDeviceCalibrationPlanDetail(Integer planId, HttpServletResponse response){ |
| | | deviceCalibrationPlanService.exportDeviceCalibrationPlanDetail(planId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yuanchu.mom.pojo.DeviceCheck; |
| | | import com.yuanchu.mom.service.DeviceCheckService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/device-check") |
| | | public class DeviceCheckController { |
| | | @Autowired |
| | | private DeviceCheckService deviceCheckService; |
| | | |
| | | @PostMapping(consumes= MediaType.APPLICATION_FORM_URLENCODED_VALUE) |
| | | public Result create(DeviceCheck deviceCheck) { |
| | | return Result.success(deviceCheckService.save(deviceCheck)); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | public Result read(@PathVariable Integer id) { |
| | | LambdaQueryWrapper<DeviceCheck> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(DeviceCheck::getDeviceId,id); |
| | | return Result.success(deviceCheckService.list(lambdaQueryWrapper)); |
| | | } |
| | | |
| | | @PutMapping("/{id}") |
| | | public Result update(@PathVariable Integer id, @RequestBody DeviceCheck deviceCheck) { |
| | | deviceCheck.setDeviceId(id); |
| | | deviceCheckService.updateById(deviceCheck); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | public Result delete(@PathVariable Integer id) { |
| | | return Result.success(deviceCheckService.removeById(id)); |
| | | } |
| | | |
| | | @GetMapping |
| | | public Result list() { |
| | | return Result.success(deviceCheckService.list()); |
| | | } |
| | | } |
| | |
| | | @ValueClassify("设å¤") |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤è¯¦æ
å表") |
| | | @PostMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | | public Result selectDeviceParameter(@RequestBody Map<String, Object> data,@RequestParam(value = "laboratoryNameIsNull", required = false) Boolean laboratoryNameIsNull) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceDto.class); |
| | | return Result.success(deviceService.selectDeviceParameter(page, itemParameter)); |
| | | return Result.success(deviceService.selectDeviceParameter(page, itemParameter,laboratoryNameIsNull)); |
| | | } |
| | | |
| | | @ValueClassify("设å¤") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.DeviceExaminePlanDto; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordContrastDto; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlan; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | import com.yuanchu.mom.service.DeviceExaminePlanDetailsService; |
| | | import com.yuanchu.mom.service.DeviceExaminePlanService; |
| | | import com.yuanchu.mom.service.DeviceExamineRecordContrastService; |
| | | import com.yuanchu.mom.service.DeviceExamineRecordService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ ¸æ¥è®¡å") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceExaminePlan") |
| | | public class DeviceExaminePlanController { |
| | | |
| | | private DeviceExaminePlanService deviceExaminePlanService; |
| | | |
| | | private DeviceExaminePlanDetailsService deviceExaminePlanDetailsService; |
| | | |
| | | private DeviceExamineRecordService deviceExamineRecordService; |
| | | |
| | | private DeviceExamineRecordContrastService deviceExamineRecordContrastService; |
| | | |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¸æ¥è®¡å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ ¸æ¥è®¡å") |
| | | @PostMapping("/addDeviceExaminePlan") |
| | | public Result addDeviceExaminePlan(@RequestBody DeviceExaminePlanDto examinePlanDto){ |
| | | return Result.success(deviceExaminePlanService.addDeviceExaminePlan(examinePlanDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¸æ¥è®¡å |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导å
¥è®¾å¤æ ¸æ¥è®¡å") |
| | | @PostMapping("/importDeviceExaminePlan") |
| | | public Result importDeviceExaminePlan(MultipartFile file){ |
| | | return Result.success(deviceExaminePlanService.importDeviceExaminePlan(file)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå é¤ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¸æ¥è®¡åå é¤") |
| | | @GetMapping("/delQualitySupervise") |
| | | public Result delQualitySupervise(Integer planId){ |
| | | return Result.success(deviceExaminePlanService.removeById(planId)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åæ¹å |
| | | * @return |
| | | */ |
| | | @ValueClassify("è´¨éè®¾å¤æ ¸æ¥è®¡å") |
| | | @ApiOperation(value = "è®¾å¤æ ¸æ¥è®¡åæ¹å") |
| | | @PostMapping("/ratifyDeviceExaminePlan") |
| | | public Result ratifyDeviceExaminePlan(@RequestBody DeviceExaminePlan DeviceExaminePlan){ |
| | | return Result.success(deviceExaminePlanService.ratifyDeviceExaminePlan(DeviceExaminePlan)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¸æ¥è®¡åå表") |
| | | @PostMapping("/pageDeviceExaminePlan") |
| | | public Result<IPage<DeviceExaminePlanDto>> pageDeviceExaminePlan(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceExaminePlan DeviceExaminePlan = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceExaminePlan.class); |
| | | return Result.success(deviceExaminePlanService.pageDeviceExaminePlan(page, DeviceExaminePlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
å表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ ¸æ¥è®¡å详æ
å表") |
| | | @PostMapping("/pageDeviceExaminePlanDetail") |
| | | public Result<IPage<DeviceExaminePlanDetails>> pageDeviceExaminePlanDetail(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceExaminePlanDetails deviceExaminePlanDetails = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceExaminePlanDetails.class); |
| | | return Result.success(deviceExaminePlanService.pageDeviceExaminePlanDetail(page, deviceExaminePlanDetails)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ ¸æ¥è®¡å详æ
") |
| | | @PostMapping("/addDeviceExaminePlanDetail") |
| | | public Result addDeviceExaminePlanDetail(@RequestBody DeviceExaminePlanDetails deviceExaminePlanDetail){ |
| | | if (deviceExaminePlanDetail.getPlanId() == null) { |
| | | throw new ErrorException("缺å°è®¾å¤æ ¸æ¥è®¡å主表id"); |
| | | } |
| | | return Result.success(deviceExaminePlanDetailsService.save(deviceExaminePlanDetail)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ä¿®æ¹è®¾å¤æ ¸æ¥è®¡å详æ
") |
| | | @PostMapping("/updateDeviceExaminePlanDetail") |
| | | public Result updateDeviceExaminePlanDetail(@RequestBody DeviceExaminePlanDetails deviceExaminePlanDetail){ |
| | | return Result.success(deviceExaminePlanDetailsService.updateById(deviceExaminePlanDetail)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ ¸æ¥è®¡å详æ
") |
| | | @GetMapping("/delDeviceExaminePlanDetail") |
| | | public Result delDeviceExaminePlanDetail(Integer planDetailsId){ |
| | | return Result.success(deviceExaminePlanDetailsService.removeById(planDetailsId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¸æ¥è®¡å |
| | | * @param planId è®¾å¤æ ¸æ¥è®¡åid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºè®¾å¤æ ¸æ¥è®¡å") |
| | | @GetMapping("/exportDeviceExaminePlanDetail") |
| | | public void exportDeviceExaminePlanDetail(Integer planId, HttpServletResponse response){ |
| | | deviceExaminePlanService.exportDeviceExaminePlanDetail(planId, response); |
| | | } |
| | | |
| | | /*********************************************** æ¥å **************************************************/ |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢æ ¸æ¥è®°å½") |
| | | @GetMapping("/getExamineRecord") |
| | | public Result<DeviceExamineRecordDto> getExamineRecord(Integer planDetailsId){ |
| | | return Result.success(deviceExamineRecordService.getExamineRecord(planDetailsId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢æ ¸æ¥è®°å½") |
| | | @PostMapping("/addExamineRecord") |
| | | public Result addExamineRecord(@RequestBody DeviceExamineRecordDto deviceExamineRecordDto){ |
| | | return Result.success(deviceExamineRecordService.addExamineRecord(deviceExamineRecordDto)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 夿 ¸æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿 ¸æ ¸æ¥è®°å½") |
| | | @PostMapping("/reviewExamineRecord") |
| | | public Result reviewExamineRecord(@RequestBody DeviceExamineRecordDto deviceExamineRecordDto){ |
| | | return Result.success(deviceExamineRecordService.reviewExamineRecord(deviceExamineRecordDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå¤æ ¸æ ¸æ¥è®°å½ |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºå¤æ ¸æ ¸æ¥è®°å½") |
| | | @GetMapping("/exportReviewExamineRecordDetail") |
| | | public void exportReviewExamineRecordDetail(Integer planDetailsId, HttpServletResponse response){ |
| | | deviceExamineRecordService.exportReviewExamineRecordDetail(planDetailsId, response); |
| | | } |
| | | |
| | | /*********************************************** æ¥åå¯¹æ¯ **************************************************/ |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½") |
| | | @GetMapping("/getExamineRecordContrast") |
| | | public Result<DeviceExamineRecordContrastDto> getExamineRecordContrast(Integer planDetailsId){ |
| | | return Result.success(deviceExamineRecordContrastService.getExamineRecordContrast(planDetailsId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢æ ¸æ¥å¯¹æ¯è®°å½") |
| | | @PostMapping("/addExamineRecordContrast") |
| | | public Result addExamineRecordContrast(@RequestBody DeviceExamineRecordContrastDto deviceExamineRecordContrastDto){ |
| | | return Result.success(deviceExamineRecordContrastService.addExamineRecordContrast(deviceExamineRecordContrastDto)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½") |
| | | @PostMapping("/reviewExamineRecordContrast") |
| | | public Result reviewExamineRecordContrast(@RequestBody DeviceExamineRecordContrastDto deviceExamineRecordContrastDto){ |
| | | return Result.success(deviceExamineRecordContrastService.reviewExamineRecordContrast(deviceExamineRecordContrastDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @ApiOperation(value = "导åºå®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½") |
| | | @GetMapping("/exportReviewExamineRecordContrast") |
| | | public Result exportReviewExamineRecordContrast(Integer planDetailsId, HttpServletResponse response){ |
| | | deviceExamineRecordContrastService.exportReviewExamineRecordContrast(planDetailsId, response); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceExternalApply; |
| | | import com.yuanchu.mom.service.DeviceExternalApplyService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | @Api(tags = "å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceExternalApply") |
| | | public class DeviceExternalApplyController { |
| | | |
| | | private DeviceExternalApplyService deviceExternalApplyService; |
| | | |
| | | |
| | | /** |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·å表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å©ç¨å¤é¨è®¾å¤ç³è¯·å表") |
| | | @PostMapping("/pageDeviceExternalApply") |
| | | public Result<IPage<DeviceExternalApply>> pageDeviceExternalApply(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceExternalApply deviceExternalApply = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceExternalApply.class); |
| | | return Result.success(deviceExternalApplyService.pageDeviceExternalApply(page, deviceExternalApply)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢å©ç¨å¤é¨è®¾å¤ç³è¯·") |
| | | @GetMapping("/getDeviceExternalApply") |
| | | public Result getDeviceExternalApply(Integer externalApplyId){ |
| | | return Result.success(deviceExternalApplyService.getById(externalApplyId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤å©ç¨å¤é¨è®¾å¤ç³è¯·") |
| | | @GetMapping("/delDeviceExternalApply") |
| | | public Result delDeviceExternalApply(Integer externalApplyId){ |
| | | return Result.success(deviceExternalApplyService.removeById(externalApplyId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢å©ç¨å¤é¨è®¾å¤ç³è¯·") |
| | | @PostMapping("/addDeviceExternalApply") |
| | | public Result addDeviceExternalApply(@RequestBody DeviceExternalApply deviceExternalApply){ |
| | | return Result.success(deviceExternalApplyService.addDeviceExternalApply(deviceExternalApply)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @param externalApplyId å¤é¨è®¾å¤ç³è¯·id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºå©ç¨å¤é¨è®¾å¤ç³è¯·") |
| | | @GetMapping("/exportDeviceExternalApply") |
| | | public Result exportDeviceExternalApply(Integer externalApplyId, HttpServletResponse response){ |
| | | deviceExternalApplyService.exportDeviceExternalApply(externalApplyId, response); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceFault; |
| | | import com.yuanchu.mom.service.DeviceFaultService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/device-faults") |
| | | public class DeviceFaultController { |
| | | |
| | | private final DeviceFaultService deviceFaultService; |
| | | |
| | | @Autowired |
| | | public DeviceFaultController(DeviceFaultService deviceFaultService) { |
| | | this.deviceFaultService = deviceFaultService; |
| | | } |
| | | |
| | | @GetMapping |
| | | public List<DeviceFault> getAllDeviceFaults() { |
| | | return deviceFaultService.list(); |
| | | } |
| | | |
| | | @PostMapping |
| | | public DeviceFault createDeviceFault(@RequestBody DeviceFault deviceFault) { |
| | | deviceFaultService.save(deviceFault); |
| | | return deviceFault; |
| | | } |
| | | |
| | | @PutMapping("/{id}") |
| | | public DeviceFault updateDeviceFault(@PathVariable Integer id, @RequestBody DeviceFault deviceFault) { |
| | | deviceFault.setId(id); |
| | | deviceFaultService.updateById(deviceFault); |
| | | return deviceFault; |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | public void deleteDeviceFault(@PathVariable Integer id) { |
| | | deviceFaultService.removeById(id); |
| | | } |
| | | |
| | | @GetMapping("/device/{deviceId}") |
| | | public Result<Map<String,Object>> getDeviceFaultsByDeviceId(@PathVariable Integer deviceId) { |
| | | return Result.success(deviceFaultService.findByDeviceId(deviceId)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceFaultOneDto; |
| | | import com.yuanchu.mom.excel.DeviceFaultOneExport; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.DeviceFaultOne; |
| | | import com.yuanchu.mom.service.DeviceFaultOneService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 02:03:29 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/deviceFaultOne") |
| | | public class DeviceFaultOneController { |
| | | |
| | | @Autowired |
| | | private DeviceFaultOneService deviceFaultOneService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceFaultOne> numberGenerator; |
| | | |
| | | @GetMapping("/deviceFaultOnePage") |
| | | public Result deviceFaultOnePage(@RequestParam("deviceId") Integer deviceId, Page page, String processNumber) { |
| | | return Result.success(deviceFaultOneService.deviceFaultOnePage(deviceId,page, processNumber)); |
| | | } |
| | | |
| | | @PostMapping("/addOrUpdateDeviceFaultOne") |
| | | public Result addOrUpdateDeviceFaultOne(@RequestBody DeviceFaultOne deviceFaultOne) { |
| | | if (ObjectUtils.isEmpty(deviceFaultOne.getProcessNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "DG-TC-23FM " + month + "-" + year + month, DeviceFaultOne::getProcessNumber); |
| | | deviceFaultOne.setProcessNumber(processNumber); |
| | | } |
| | | return Result.success(deviceFaultOneService.saveOrUpdate(deviceFaultOne)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceFaultOne") |
| | | public Result deleteDeviceFaultOne(@RequestParam("id") Integer id) { |
| | | return Result.success(deviceFaultOneService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "奿©è®°å½å¯¼åº") |
| | | @PostMapping("exportRewardAndPunishmentRecords") |
| | | public void exportRewardAndPunishmentRecords(@RequestParam("deviceId") Integer deviceId, String processNumber, |
| | | HttpServletResponse response) throws Exception { |
| | | IPage<DeviceFaultOneDto> data = deviceFaultOneService.deviceFaultOnePage(deviceId, new Page<>(1, -1), processNumber); |
| | | List<DeviceFaultOneExport> studentList = JSONObject.parseArray(JSON.toJSONString(data.getRecords()), DeviceFaultOneExport.class); |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(DeviceFaultOneExport.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet("sheet") |
| | | .doWrite(studentList); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceInspectionRecordDto; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecord; |
| | | import com.yuanchu.mom.service.DeviceInspectionRecordService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ç¹æ£è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | @Api(tags = "设å¤ç¹æ£è®°å½") |
| | | @RestController |
| | | @RequestMapping("/deviceInspectionRecord") |
| | | public class DeviceInspectionRecordController { |
| | | @Resource |
| | | private DeviceInspectionRecordService deviceInspectionRecordService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | * @param data å页忰 |
| | | */ |
| | | @ApiOperation("å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½") |
| | | @PostMapping("/getDeviceInspectionRecordByPage") |
| | | @SneakyThrows |
| | | public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(@RequestBody Map<String, Object> data) { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceInspectionRecordDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceInspectionRecordDto.class); |
| | | return deviceInspectionRecordService.getDeviceInspectionRecordByPage(page, itemParameter); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£è¯¦æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢ç¹æ£è¯¦æ
") |
| | | @GetMapping("/getDeviceInspectionRecord") |
| | | public Result getDeviceInspectionRecord(Integer inspectionRecordId) { |
| | | return deviceInspectionRecordService.getDeviceInspectionRecord(inspectionRecordId); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ç¹æ£è®°å½ |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("æ°å¢è®¾å¤ç¹æ£è®°å½") |
| | | @PostMapping("/addDeviceInspectionRecord") |
| | | public Result addDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | return deviceInspectionRecordService.addDeviceInspectionRecord(deviceInspectionRecord); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹è®¾å¤ç¹æ£è®°å½") |
| | | @PostMapping("/updateDeviceInspectionRecord") |
| | | public Result updateDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | return deviceInspectionRecordService.updateInspectionRecordAndDetails(deviceInspectionRecord); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("å é¤è®¾å¤ç¹æ£è®°å½") |
| | | @GetMapping("/deleteDeviceInspectionRecord") |
| | | public Result deleteDeviceInspectionRecord(DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | return deviceInspectionRecordService.deleteDeviceInspectionRecordOrDetails(deviceInspectionRecord); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 夿 ¸ç¹æ£è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿 ¸æ ¸æ¥è®°å½") |
| | | @PostMapping("/reviewDeviceInspectionRecord") |
| | | public Result reviewDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceExamineRecordDto){ |
| | | return deviceInspectionRecordService.reviewDeviceInspectionRecord(deviceExamineRecordDto); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç¹æ£è®°å½ |
| | | */ |
| | | @ApiOperation("导åºè®¾å¤ç¹æ£è®°å½") |
| | | @GetMapping("/exportDeviceInspectionRecord") |
| | | public Result exportDeviceInspectionRecord(@RequestParam("inspectionRecordId") Integer inspectionRecordId, HttpServletResponse response) { |
| | | return deviceInspectionRecordService.exportDeviceInspectionRecord(inspectionRecordId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yuanchu.mom.pojo.DeviceLease; |
| | | import com.yuanchu.mom.service.IDeviceLeaseService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/deviceleases") |
| | | public class DeviceLeaseController { |
| | | |
| | | @Autowired |
| | | private IDeviceLeaseService deviceLeaseService; |
| | | |
| | | @PostMapping("") |
| | | public Result create( DeviceLease deviceLease) { |
| | | deviceLeaseService.save(deviceLease); |
| | | return Result.success(); |
| | | } |
| | | |
| | | // @GetMapping("/{leaseId}") |
| | | // public DeviceLease get(@PathVariable Integer leaseId) { |
| | | // return deviceLeaseService.getById(leaseId); |
| | | // } |
| | | @GetMapping("/list/{id}") |
| | | public Result get(@PathVariable Integer id) { |
| | | LambdaQueryWrapper<DeviceLease> lambdaQueryWrapper=new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(DeviceLease::getDeviceId,id); |
| | | return Result.success(deviceLeaseService.list(lambdaQueryWrapper)); |
| | | } |
| | | |
| | | @PutMapping("/{leaseId}") |
| | | public boolean update(@PathVariable Integer leaseId, @RequestBody DeviceLease deviceLease) { |
| | | deviceLease.setLeaseId(leaseId); |
| | | return deviceLeaseService.updateById(deviceLease); |
| | | } |
| | | |
| | | @DeleteMapping("/{leaseId}") |
| | | public boolean delete(@PathVariable Integer leaseId) { |
| | | return deviceLeaseService.removeById(leaseId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yuanchu.mom.pojo.DeviceLog; |
| | | import com.yuanchu.mom.service.IDeviceLogService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/device-log") // æ´æ°è·¯å¾ |
| | | //è¿éçæ¥å£å
¨é¨æ¯å¨è®¾å¤æ ¡åçå°æ¹ç¨å°,使¯å
¶ä»å°æ¹ä¼å¦å¤å |
| | | public class DeviceLogController { |
| | | |
| | | @Autowired |
| | | private IDeviceLogService deviceLogService; // æ´æ°Serviceå¼ç¨ |
| | | |
| | | @GetMapping |
| | | public List<DeviceLog> getAllDeviceLogs() { // æ´æ°æ¹æ³å |
| | | return deviceLogService.list(); |
| | | } |
| | | @GetMapping("/{id}") |
| | | public Result getAllDeviceLogsBydId(@PathVariable int id) { // æ´æ°æ¹æ³å |
| | | LambdaQueryWrapper<DeviceLog> lambdaQueryWrapper=new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(DeviceLog::getDeviceId,id); |
| | | lambdaQueryWrapper.eq(DeviceLog::getRelevanceForm,"device_maintenance"); |
| | | return Result.success(deviceLogService.list(lambdaQueryWrapper)); |
| | | } |
| | | @PostMapping |
| | | public Result createDeviceLog(DeviceLog deviceLog) { // æ´æ°æ¹æ³å |
| | | deviceLog.setRelevanceForm("device_maintenance");//å
³èè®¾å¤æ ¡å |
| | | deviceLogService.save(deviceLog); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @PutMapping("/{id}") |
| | | public DeviceLog updateDeviceLog(@PathVariable Integer id, @RequestBody DeviceLog deviceLog) { // æ´æ°æ¹æ³å |
| | | deviceLog.setId(id); |
| | | deviceLogService.updateById(deviceLog); |
| | | return deviceLog; |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | public Result deleteDeviceLog(@PathVariable Integer id) { // æ´æ°æ¹æ³å |
| | | deviceLogService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.excel.DeviceMaintenanceExport; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenance; |
| | | import com.yuanchu.mom.service.DeviceMaintenanceService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.usermodel.VerticalAlignment; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | |
| | | @RestController |
| | | @RequestMapping("/device-maintain") |
| | | public class DeviceMaintenanceController { |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceService deviceMaintenanceService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceMaintenance> numberGenerator; |
| | | //å¢ |
| | | @PostMapping() |
| | | public Result create(DeviceMaintenance deviceMaintenance){ |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "DG-TC-23FM " + month + "-" + year + month, DeviceMaintenance::getDeviceNumber); |
| | | deviceMaintenance.setDeviceNumber(processNumber); |
| | | return Result.success(deviceMaintenanceService.save(deviceMaintenance)); |
| | | } |
| | | |
| | | //éè¿deviceIdæ¥è¯¢ç»´æ¤æ°æ® |
| | | @GetMapping("/getDeviceMaintenancePage") |
| | | public Result getDeviceMaintenancePage(@RequestParam("deviceId") Integer deviceId, Page page, String deviceNumber){ |
| | | return Result.success(deviceMaintenanceService.getDeviceMaintenancePage(page, deviceId, deviceNumber)); |
| | | } |
| | | |
| | | //å |
| | | @DeleteMapping("/delete/{id}") |
| | | public void deleteDeviceFault(@PathVariable Integer id) { |
| | | deviceMaintenanceService.removeById(id); |
| | | } |
| | | |
| | | @GetMapping("/deviceMaintenanceExport") |
| | | public Result deviceMaintenanceExport(@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) throws IOException { |
| | | List<DeviceMaintenanceExport> list = deviceMaintenanceService.deviceMaintenanceExport(deviceId); |
| | | response.setHeader("requestType","excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(DeviceMaintenanceExport.class) |
| | | .registerWriteHandler(getHorizontalCellStyleStrategy((short) 12)) |
| | | .sheet() |
| | | .doWrite(list); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "设å¤ç»´æ¤è®°å½å¯¼åº") |
| | | @GetMapping("/exportMaintenanceRecord") |
| | | @ValueAuth |
| | | public void exportMaintenanceRecord(@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) throws Exception { |
| | | deviceMaintenanceService.exportMaintenanceRecord(deviceId, response); |
| | | } |
| | | |
| | | /** |
| | | * åå
æ ¼æ ·å¼çç¥ |
| | | */ |
| | | public static HorizontalCellStyleStrategy getHorizontalCellStyleStrategy(Short fontHeightInPoints) { |
| | | // å
容ççç¥ |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | |
| | | // ãæ°´å¹³å±
ä¸éè¦ä½¿ç¨ä»¥ä¸ä¸¤è¡ã |
| | | // 设置æåå·¦å³å±
ä¸ |
| | | contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); |
| | | // 设置æåä¸ä¸å±
ä¸ |
| | | contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
| | | // 设置 èªå¨æ¢è¡ |
| | | contentWriteCellStyle.setWrapped(true); |
| | | |
| | | // æ ·å¼çç¥ |
| | | return new HorizontalCellStyleStrategy(null, contentWriteCellStyle); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceMaintenancePlanDto; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlan; |
| | | import com.yuanchu.mom.service.DeviceMaintenancePlanService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | @Api(tags = "设å¤ä¿å
»è®¡å") |
| | | @RestController |
| | | @RequestMapping("/deviceMaintenancePlan") |
| | | public class DeviceMaintenancePlanController { |
| | | @Resource |
| | | private DeviceMaintenancePlanService deviceMaintenancePlanService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * @param data å页忰 |
| | | * @return |
| | | */ |
| | | @ApiOperation("å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å") |
| | | @PostMapping("selectDeviceMaintenancePlanByPage") |
| | | @SneakyThrows |
| | | public Result<IPage<DeviceMaintenancePlan>> selectDeviceMaintenancePlanByPage(@RequestBody Map<String, Object> data){ |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceMaintenancePlanDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceMaintenancePlanDto.class); |
| | | return deviceMaintenancePlanService.selectDeviceMaintenancePlanByPage(page, itemParameter); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @ApiOperation("æ°å¢è®¾å¤ä¿å
»è®¡å") |
| | | @PostMapping("/addMaintenancePlan") |
| | | public Result addMaintenancePlan(@RequestBody DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.addMaintenancePlan(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @ApiOperation("ä¿®æ¹è®¾å¤ä¿å
»è®¡å") |
| | | @PostMapping("/updateMaintenancePlan") |
| | | public Result updateMaintenancePlan(@RequestBody DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.updateMaintenancePlan(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @ApiOperation("å é¤è®¾å¤ä¿å
»è®¡å") |
| | | @GetMapping("/deleteMaintenancePlan") |
| | | public Result deleteMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.deleteMaintenancePlan(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
") |
| | | @GetMapping("/getMaintenancePlanDetail") |
| | | public Result<DeviceMaintenancePlanDto> getMaintenancePlanDetail(Integer maintenancePlanId) { |
| | | return deviceMaintenancePlanService.getMaintenancePlanDetail(maintenancePlanId); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | */ |
| | | @ApiOperation("ä¿å
»è®¡åå®¡æ ¸ç¶æä¿®æ¹") |
| | | @PostMapping("/reviewMaintenancePlanStatus") |
| | | public Result reviewMaintenancePlanStatus(@RequestBody DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | return deviceMaintenancePlanService.reviewMaintenancePlanStatus(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä¿å
»è®¡å |
| | | */ |
| | | @ApiOperation("导åºè®¾å¤ä¿å
»è®¡å") |
| | | @GetMapping("/exportDeviceMaintenancePlan") |
| | | public Result exportDeviceMaintenancePlan(@RequestParam("maintenancePlanId") Integer maintenancePlanId, HttpServletResponse response) { |
| | | return deviceMaintenancePlanService.exportDeviceMaintenancePlanDto(maintenancePlanId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.yuanchu.mom.pojo.DeviceMetric; |
| | | import com.yuanchu.mom.service.IDeviceMetricService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/deviceMetrics") |
| | | public class DeviceMetricController { |
| | | |
| | | @Autowired |
| | | private IDeviceMetricService deviceMetricService; |
| | | |
| | | @PostMapping("/saveOrUpdateDeviceMetric") |
| | | public Result create(@RequestBody DeviceMetric deviceMetric) { |
| | | return Result.success(deviceMetricService.saveOrUpdate(deviceMetric)); |
| | | } |
| | | |
| | | @GetMapping("/selectDeviceMetric") |
| | | public Result read(@RequestParam("deviceId") Integer deviceId, @RequestParam("type") String type) { |
| | | return Result.success(deviceMetricService.list(Wrappers.<DeviceMetric>lambdaQuery() |
| | | .eq(DeviceMetric::getDeviceId,deviceId) |
| | | .eq(DeviceMetric::getType,type))); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceMetrics") |
| | | public Result delete(@RequestParam("id") Integer id) { |
| | | return Result.success(deviceMetricService.removeById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceMetricRecordDto; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.DeviceMetricRecord; |
| | | import com.yuanchu.mom.pojo.DeviceMetricsCopy; |
| | | import com.yuanchu.mom.service.DeviceMetricRecordService; |
| | | import com.yuanchu.mom.service.DeviceMetricsCopyService; |
| | | import com.yuanchu.mom.utils.FileSaveUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Locale; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | @Api(tags = "è®¾å¤ - è®¾å¤æ ¡å") |
| | | @RestController |
| | | @RequestMapping("/deviceMetricRecord") |
| | | public class DeviceMetricRecordController { |
| | | |
| | | @Autowired |
| | | private DeviceMetricRecordService deviceMetricRecordService; |
| | | |
| | | @Autowired |
| | | private DeviceMetricsCopyService deviceMetricsCopyService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceMetricRecord> numberGenerator; |
| | | |
| | | @ApiOperation("è®¾å¤æ ¡åå页æ¥è¯¢") |
| | | @GetMapping("/deviceMetricRecordPage") |
| | | public Result deviceMetricRecordPage(@RequestParam("deviceId") Integer deviceId, Page page, @RequestParam("type") String type) { |
| | | return Result.success(deviceMetricRecordService.page(page, Wrappers.<DeviceMetricRecord>lambdaQuery() |
| | | .eq(DeviceMetricRecord::getDeviceId, deviceId) |
| | | .eq(DeviceMetricRecord::getType, type))); |
| | | } |
| | | |
| | | @ApiOperation("è®¾å¤æ ¡å æ°å¢ æ´æ°") |
| | | @PostMapping("/addOrUpdateDeviceMetricRecord") |
| | | public Result addOrUpdateDeviceMetricRecord(@RequestBody DeviceMetricRecordDto deviceMetricRecordDto) { |
| | | if (ObjectUtils.isEmpty(deviceMetricRecordDto.getProcessNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(5, "SBJZ" + year + month, DeviceMetricRecord::getProcessNumber); |
| | | deviceMetricRecordDto.setProcessNumber(processNumber); |
| | | } |
| | | deviceMetricRecordService.saveOrUpdate(deviceMetricRecordDto); |
| | | if (CollectionUtils.isNotEmpty(deviceMetricRecordDto.getDeviceMetricsCopyList())) { |
| | | deviceMetricRecordDto.getDeviceMetricsCopyList().forEach(i -> i.setDeviceMetricsId(deviceMetricRecordDto.getId())); |
| | | deviceMetricsCopyService.saveOrUpdateBatch(deviceMetricRecordDto.getDeviceMetricsCopyList()); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("è®¾å¤æ ¡å å é¤") |
| | | @DeleteMapping("/deleteDeviceMetricRecord") |
| | | public Result deleteDeviceMetricRecord(@RequestParam("id") Integer id) { |
| | | DeviceMetricRecord deviceMetricRecord = deviceMetricRecordService.getById(id); |
| | | deviceMetricsCopyService.remove(Wrappers.<DeviceMetricsCopy>lambdaQuery() |
| | | .eq(DeviceMetricsCopy::getDeviceMetricsId, id)); |
| | | // å 餿件 |
| | | FileSaveUtil.DeleteFile(deviceMetricRecord.getSystemFileName()); |
| | | return Result.success(deviceMetricRecordService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation("è®¾å¤æ ¡å æ ¡åæ¡ç®æ¥è¯¢") |
| | | @GetMapping("/showDeviceMetricsCopy") |
| | | public Result showDeviceMetricsCopy(@RequestParam("id") Integer id, @RequestParam("type") String type) { |
| | | return Result.success(deviceMetricsCopyService.list(Wrappers.<DeviceMetricsCopy>lambdaQuery() |
| | | .eq(DeviceMetricsCopy::getDeviceMetricsId, id) |
| | | .eq(DeviceMetricsCopy::getType, type))); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.DeviceRecord; |
| | | import com.yuanchu.mom.service.DeviceRecordService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | @Api(tags = "设å¤ä½¿ç¨è®°å½") |
| | | @RestController |
| | | @RequestMapping("/deviceRecord") |
| | | public class DeviceRecordController { |
| | | @Autowired |
| | | private DeviceRecordService deviceRecordService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceRecord> numberGenerator; |
| | | |
| | | @ValueClassify("设å¤ä½¿ç¨è®°å½") |
| | | @ApiOperation(value = "å¤ä½¿ç¨è®°å½æ¥è¯¢") |
| | | @GetMapping("/deviceRecordPage") |
| | | public Result deviceRecordPage(Integer deviceId, Page page, String sampleCode, String managementNumber) { |
| | | return Result.success(deviceRecordService.deviceRecordPage(deviceId, page, sampleCode, managementNumber)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢") |
| | | @PostMapping("/saveDeviceRecord") |
| | | public Result saveDeviceRecords(@RequestBody DeviceRecord deviceRecord) { |
| | | return Result.success(deviceRecordService.save(deviceRecord)); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾è®¾å¤ä½¿ç¨è®°å½ |
| | | * @param deviceRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ä¿®æ¹") |
| | | @PostMapping("/updateDeviceRecord") |
| | | public Result updateDeviceRecord(@RequestBody DeviceRecord deviceRecord) { |
| | | return Result.success(deviceRecordService.updateById(deviceRecord)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceRecord") |
| | | public Result deleteDeviceRecords(@RequestParam("id") Integer id) { |
| | | return Result.success(deviceRecordService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "设å¤ä½¿ç¨è®°å½å¯¼åº") |
| | | @GetMapping("/exportUseRecord") |
| | | @ValueAuth |
| | | public void exportUseRecord(Integer deviceId, String exportDate, HttpServletResponse response) throws Exception { |
| | | deviceRecordService.exportUseRecord(deviceId, exportDate, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceScrapped; |
| | | import com.yuanchu.mom.service.DeviceScrappedService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | @Api(tags = "è®¾å¤æ¥åºç³è¯·è¡¨") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/deviceScrapped") |
| | | public class DeviceScrappedController { |
| | | |
| | | private DeviceScrappedService deviceScrappedService; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "è®¾å¤æ¥åºç³è¯·å表") |
| | | @PostMapping("/pageDeviceScrapped") |
| | | public Result<IPage<DeviceScrapped>> pageDeviceScrapped(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceScrapped deviceScrapped = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceScrapped.class); |
| | | return Result.success(deviceScrappedService.pageDeviceScrapped(page, deviceScrapped)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ¥åºç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤æ¥åºç³è¯·") |
| | | @GetMapping("/getDeviceScrapped") |
| | | public Result getDeviceScrapped(Integer scrappedId){ |
| | | return Result.success(deviceScrappedService.getById(scrappedId)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å é¤è®¾å¤æ¥åºç³è¯·") |
| | | @GetMapping("/delDeviceScrapped") |
| | | public Result delDeviceScrapped(Integer scrappedId){ |
| | | return Result.success(deviceScrappedService.removeById(scrappedId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ¥åºç³è¯· |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "æ°å¢è®¾å¤æ¥åºç³è¯·") |
| | | @PostMapping("/addDeviceScrapped") |
| | | public Result addDeviceScrapped(@RequestBody DeviceScrapped deviceScrapped){ |
| | | return Result.success(deviceScrappedService.addDeviceScrapped(deviceScrapped)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ¥åºç³è¯· |
| | | */ |
| | | @ApiOperation("导åºè®¾å¤æ¥åºç³è¯·") |
| | | @GetMapping("/exportDeviceScrapped") |
| | | public Result exportDeviceScrapped(Integer scrappedId, HttpServletResponse response) { |
| | | return deviceScrappedService.exportDeviceScrapped(scrappedId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.dto.DeviceStateDto; |
| | | import com.yuanchu.mom.excel.DeviceStateExport; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.DeviceState; |
| | | import com.yuanchu.mom.service.DeviceStateService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/deviceState") |
| | | public class DeviceStateController { |
| | | |
| | | @Autowired |
| | | private DeviceStateService deviceStateService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceState> numberGenerator; |
| | | |
| | | @PostMapping("saveDeviceState") |
| | | public Result saveIncidentReportData(@RequestBody DeviceState deviceState) { |
| | | if (ObjectUtils.isEmpty(deviceState.getProcessNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "DG-TC-23FM " + month + "-" + year + month, DeviceState::getProcessNumber); |
| | | deviceState.setProcessNumber(processNumber); |
| | | } |
| | | deviceStateService.saveOrUpdate(deviceState); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("/getDeviceStatePage") |
| | | public Result getDeviceStatePage(@RequestParam("deviceId") Integer deviceId, Page page, String processNumber){ |
| | | return Result.success(deviceStateService.getDeviceStatePage(deviceId, page, processNumber)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceState") |
| | | public Result deleteDeviceState(@RequestParam("stateId") Integer stateId){ |
| | | return Result.success(deviceStateService.removeById(stateId)); |
| | | } |
| | | |
| | | @PostMapping("/deviceStateExport") |
| | | public Result deviceStateExport(@RequestParam("deviceId") Integer deviceId, String processNumber, HttpServletResponse response) throws Exception { |
| | | IPage<DeviceStateDto> deviceBorrows = deviceStateService.getDeviceStatePage(deviceId, new Page<>(1, -1), processNumber); |
| | | List<DeviceStateExport> studentList = JSONObject.parseArray(JSON.toJSONString(deviceBorrows.getRecords()), DeviceStateExport.class); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(DeviceStateExport.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet("sheet") |
| | | .doWrite(studentList); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "设å¤å¯å¨/忢坼åº") |
| | | @GetMapping("/exportDeviceStatus") |
| | | @ValueAuth |
| | | public void exportDeviceStatus(@RequestParam("processNumber") String processNumber,@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) throws Exception { |
| | | deviceStateService.exportDeviceStatus(deviceId, processNumber, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceTraceabilityManagementDto; |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagement; |
| | | import com.yuanchu.mom.service.DeviceTraceabilityManagementService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | @Api(tags = "设å¤é弿º¯æºè®¡å") |
| | | @RestController |
| | | @RequestMapping("/deviceTraceabilityManagement") |
| | | public class DeviceTraceabilityManagementController { |
| | | @Resource |
| | | private DeviceTraceabilityManagementService deviceTraceabilityManagementService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢é弿º¯æºè®¡å |
| | | * @param data å页忰 |
| | | * @return |
| | | */ |
| | | @ApiOperation("å页æ¥è¯¢é弿º¯æºè®¡å") |
| | | @PostMapping("selectDeviceTraceabilityManagementByPage") |
| | | @SneakyThrows |
| | | public Result<IPage<DeviceTraceabilityManagement>> selectDeviceTraceabilityManagementByPage(@RequestBody Map<String, Object> data){ |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceTraceabilityManagementDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceTraceabilityManagementDto.class); |
| | | return deviceTraceabilityManagementService.selectDeviceTraceabilityManagementByPage(page, itemParameter); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | @ApiOperation("æ°å¢é弿º¯æºè®¡å") |
| | | @PostMapping("/addTraceabilityManagement") |
| | | public Result addTraceabilityManagement(@RequestBody DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.addTraceabilityManagement(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | @ApiOperation("ä¿®æ¹é弿º¯æºè®¡å") |
| | | @PostMapping("/updateTraceabilityManagement") |
| | | public Result updateTraceabilityManagement(@RequestBody DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.updateTraceabilityManagement(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | @ApiOperation("å é¤é弿º¯æºè®¡å") |
| | | @GetMapping("/deleteTraceabilityManagement") |
| | | public Result deleteTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.deleteTraceabilityManagement(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢é弿º¯æºè®¡å详æ
|
| | | */ |
| | | @ApiOperation("æ¥è¯¢é弿º¯æºè®¡å详æ
") |
| | | @GetMapping("/getTraceabilityManagementDetail") |
| | | public Result<DeviceTraceabilityManagementDto> getTraceabilityManagementDetail(Integer traceabilityManagementId) { |
| | | return deviceTraceabilityManagementService.getTraceabilityManagementDetail(traceabilityManagementId); |
| | | } |
| | | |
| | | /** |
| | | * é弿º¯æºè®¡åå®¡æ ¸ç¶æä¿®æ¹ |
| | | */ |
| | | @ApiOperation("é弿º¯æºè®¡åå®¡æ ¸ç¶æä¿®æ¹") |
| | | @PostMapping("/reviewTraceabilityManagementStatus") |
| | | public Result reviewTraceabilityManagementStatus(@RequestBody DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | return deviceTraceabilityManagementService.reviewTraceabilityManagementStatus(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * 导åºé弿º¯æºè®¡å |
| | | */ |
| | | @ApiOperation("导åºé弿º¯æºè®¡å") |
| | | @GetMapping("/exportDeviceTraceabilityManagement") |
| | | public Result exportDeviceTraceabilityManagement(@RequestParam("traceabilityManagementId") Integer traceabilityManagementId, HttpServletResponse response) { |
| | | return deviceTraceabilityManagementService.exportDeviceTraceabilityManagementDto(traceabilityManagementId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yuanchu.mom.pojo.Document; |
| | | import com.yuanchu.mom.service.DocumentService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/documents") |
| | | public class DocumentController { |
| | | |
| | | @Autowired |
| | | private DocumentService documentService; |
| | | |
| | | @PostMapping |
| | | public Result createDocument( Document document) { |
| | | documentService.save(document); |
| | | return Result.success("ok"); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | public Document getDocumentById(@PathVariable Integer id) { |
| | | return documentService.getById(id); |
| | | } |
| | | |
| | | @PutMapping("updateDocument") |
| | | public Result updateDocument(@RequestBody Document document) { |
| | | return Result.success(documentService.updateById(document)); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | public Result deleteDocumentById(@PathVariable Integer id) { |
| | | return Result.success(documentService.removeById(id)); |
| | | } |
| | | |
| | | @GetMapping("/getListByDId/{id}") |
| | | public Result getAllDocuments(@PathVariable Integer id) { |
| | | LambdaQueryWrapper<Document> lambdaQueryWrapper=new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(Document::getDeviceId,id); |
| | | return Result.success(documentService.list(lambdaQueryWrapper)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.IncidentReportAddDto; |
| | | import com.yuanchu.mom.excel.IncidentReportExport; |
| | | import com.yuanchu.mom.service.IncidentReportService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶æ·»å éªæ¶å段表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 03:54:49 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/incident-report") |
| | | public class IncidentReportController { |
| | | @Autowired |
| | | private IncidentReportService incidentReportService; |
| | | |
| | | @PostMapping("saveIncidentReportData") |
| | | public Result saveIncidentReportData(@RequestBody IncidentReportAddDto incidentReportAddDto) { |
| | | incidentReportService.saveIncidentReportData(incidentReportAddDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("/getShowIncidentReport") |
| | | public Result getShowIncidentReport(@RequestParam("id") Integer id) { |
| | | return Result.success(incidentReportService.getShowIncidentReport(id)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteIncidentReport") |
| | | public Result deleteIncidentReport(@RequestParam("id") Integer id) { |
| | | incidentReportService.deleteIncidentReport(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("/incidentReportPage") |
| | | public Result incidentReportPage(@RequestParam("deviceId") Integer deviceId, Page page, String processNumber){ |
| | | return Result.success(incidentReportService.getByDeviceId(deviceId, page, processNumber)); |
| | | } |
| | | |
| | | @DeleteMapping("deleteIncidentReportAll") |
| | | public Result deleteIncidentReport(Integer sparePartsId, Integer fileId, Integer installId, Integer acceptanceCheckId) { |
| | | incidentReportService.deleteIncidentReportAll(sparePartsId, fileId, installId, acceptanceCheckId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("/incidentReportExport") |
| | | public Result incidentReportPage(@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) throws IOException { |
| | | List<IncidentReportExport> list = incidentReportService.incidentReportExport(deviceId); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(IncidentReportExport.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet() |
| | | .doWrite(list); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("设å¤éªæ¶") |
| | | @ApiOperation(value = "设å¤éªæ¶å¯¼åº") |
| | | @GetMapping("/acceptanceCertificateExport") |
| | | @ValueAuth |
| | | public void acceptanceCertificateExport(@RequestParam("deviceId") Integer deviceId, @RequestParam("processNumber") String processNumber, HttpServletResponse response) throws Exception { |
| | | incidentReportService.acceptanceCertificateExport(deviceId, processNumber, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.InstructionDto; |
| | | import com.yuanchu.mom.dto.OperationInstructionDto; |
| | | import com.yuanchu.mom.pojo.Instruction; |
| | | import com.yuanchu.mom.pojo.OperationInstruction; |
| | | import com.yuanchu.mom.service.InstructionService; |
| | | import com.yuanchu.mom.service.OperationInstructionService; |
| | | import com.yuanchu.mom.vo.OperationInstructionVo; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/instruction") |
| | | public class InstructionController { |
| | | |
| | | @Autowired |
| | | private InstructionService instructionService; |
| | | |
| | | @Autowired |
| | | private OperationInstructionService operationInstructionService; |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦ å页") |
| | | @GetMapping("/pageByPageQueryOfHomeworkInstructions") |
| | | public Result<IPage<Instruction>> pageByPageQueryOfHomeworkInstructions(Page page, OperationInstructionDto operationInstructionDto){ |
| | | return Result.success(instructionService.pageByPageQueryOfHomeworkInstructions(page, operationInstructionDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦æ°å¢") |
| | | @PostMapping("/newHomeworkGuidebookAdded") |
| | | public Result newHomeworkGuidebookAdded(@RequestBody InstructionDto instructionDto){ |
| | | instructionService.newHomeworkGuidebookAdded(instructionDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦ç¼è¾") |
| | | @GetMapping("/homeworkGuidebookEditor") |
| | | public Result<Map<String, Object>> homeworkGuidebookEditor(Integer instructionId){ |
| | | Instruction instruction = instructionService.getById(instructionId); |
| | | List<OperationInstructionVo> list = operationInstructionService.homeworkGuidebookEditor(instructionId); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("list", list); |
| | | map.put("instruction", instruction); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦åæ§æä»¶å é¤") |
| | | @GetMapping("/deleteHomeworkGuidebook") |
| | | public Result deleteHomeworkGuidebook(String ids){ |
| | | if (ObjectUtils.isNotEmpty(ids)) { |
| | | String[] idArray = ids.split(","); |
| | | operationInstructionService.removeBatchByIds(Arrays.asList(idArray)); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦å é¤") |
| | | @GetMapping("/homeworkGuidebook") |
| | | public Result homeworkGuidebook(String id, String instructionId){ |
| | | // å é¤åè¡¨æ°æ® |
| | | operationInstructionService.removeById(id); |
| | | // 妿åè¡¨æ°æ®ä¸ºç©º |
| | | long count = operationInstructionService.count(Wrappers.<OperationInstruction>lambdaQuery() |
| | | .eq(OperationInstruction::getInstructionId, instructionId)); |
| | | // é£ä¹å°±å é¤ç¶è¡¨æ°æ® |
| | | if (count < 1) { |
| | | instructionService.removeById(id); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦å®¡æ¹") |
| | | @GetMapping("/approvalOfHomeworkInstructionManual") |
| | | public Result approvalOfHomeworkInstructionManual(String id, Boolean status){ |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null); |
| | | operationInstructionService.update(Wrappers.<OperationInstruction>lambdaUpdate() |
| | | .eq(OperationInstruction::getId, id) |
| | | .set(OperationInstruction::getStatus, status) |
| | | .set(OperationInstruction::getApproverId, map1.get("userId")) |
| | | .set(OperationInstruction::getEntryIntoForceTime, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.enums.QrModelType; |
| | | import com.yuanchu.mom.service.QrShowService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | @Controller |
| | | @RequestMapping("/qr") |
| | | public class QrShowController { |
| | | |
| | | @Autowired |
| | | private QrShowService qrShowService; |
| | | |
| | | /** |
| | | * äºç»´ç æ«ç è¯·æ±æ¥å£ |
| | | * @param model |
| | | * @param code ç¼å· |
| | | * @param type ç±»å(word/device) |
| | | * @return |
| | | */ |
| | | @ValueAuth |
| | | @GetMapping("/qrScan") |
| | | public String hello(Model model, @RequestParam("code") String code,@RequestParam("type") String type){ |
| | | qrShowService.transformModelByType(model,code,type); |
| | | return QrModelType.getValueByType(type); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.pojo.Reservation; |
| | | import com.yuanchu.mom.service.DeviceService; |
| | | import com.yuanchu.mom.service.ReservationService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * èµæºé¢å®æ°å»ºé¢å®è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author baomidou |
| | | * @since 2024-09-14 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/reservation") |
| | | public class ReservationController { |
| | | @Autowired |
| | | private ReservationService reservationService; |
| | | |
| | | @Resource |
| | | private DeviceService deviceService; |
| | | |
| | | @PostMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(@RequestBody Map<String, Object> data, @RequestParam(value = "laboratoryNameIsNull", required = false) Boolean laboratoryNameIsNull,@RequestParam(value = "starttime", required = false)String starttime,@RequestParam(value = "endtime", required = false) String endtime) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | DeviceDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceDto.class); |
| | | Map<String, Object> map = reservationService.selectDeviceParameter(page, itemParameter, laboratoryNameIsNull,starttime,endtime); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @PostMapping("/selectReservationParameterPage") |
| | | public Result selectReservationParameterPage(@RequestParam String deviceId,@RequestParam String reservationTime,@RequestParam String specificTime){ |
| | | return Result.success(reservationService.selectReservationParameterPage(deviceId,reservationTime,specificTime)); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | public Result getList(@PathVariable Integer id) { |
| | | LambdaQueryWrapper<Reservation> lambdaQueryWrapper=new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(Reservation::getDeviceId,id); |
| | | return Result.success(reservationService.list(lambdaQueryWrapper)); |
| | | } |
| | | |
| | | @PostMapping("save") |
| | | public Result save(Reservation reservation){ |
| | | reservation.setCreateDate(LocalDateTime.now()); |
| | | reservationService.save(reservation); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/delete/{ids}") |
| | | public Result deleteReservation(@PathVariable String ids) { |
| | | String[] idArray = ids.split(","); |
| | | reservationService.removeBatchByIds(Arrays.asList(idArray)); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceAccidentReport; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-18 ææä¸ 10:00:48 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceAccidentReportDto extends DeviceAccidentReport { |
| | | @ApiModelProperty("æ¶é´") |
| | | private String accidentDateStr; |
| | | |
| | | @ApiModelProperty("æ¥åäººå¡«åæ¶é´") |
| | | private String reportDateStr; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äººå¡«åæ¶é´") |
| | | private String assessorDateStr; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private String departmentHeadDateStr; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººå¡«åæ¶é´") |
| | | private String technicalDirectorDateStr; |
| | | |
| | | @ApiModelProperty("䏻任填忶é´") |
| | | private String directorHeadDateStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 10:05:08 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceCalibrationPlanDetailDto extends DeviceCalibrationPlanDetail { |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | @ApiModelProperty("æè¿æ£å®æ¶é´Str") |
| | | private String lastDateStr; |
| | | @ApiModelProperty("æ¬å¹´è®¡åæ ¡åæ¶é´Str") |
| | | private String planDateStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlan; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/16 |
| | | */ |
| | | @Data |
| | | public class DeviceCalibrationPlanDto extends DeviceCalibrationPlan { |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String writeName; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String ratifyName; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private String writeTimeStr; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | private String ratifyTimeStr; |
| | | |
| | | @ApiModelProperty("æ ¡å计å详æ
") |
| | | private List<DeviceCalibrationPlanDetail> calibrationPlanDetailList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤éé对象 |
| | | * |
| | | * @Author zhuo |
| | | * @Date 2024/12/3 |
| | | */ |
| | | @Data |
| | | public class DeviceCollectionDto { |
| | | |
| | | @ApiModelProperty(value = "æ ·åid") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "订åç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty(value = "æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty(value = "ééçæ£éªé¡¹id") |
| | | private List<Integer> itemIds; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 15:34:44 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceExaminePlanDetailsDto extends DeviceExaminePlanDetails { |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlan; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/16 |
| | | */ |
| | | @Data |
| | | public class DeviceExaminePlanDto extends DeviceExaminePlan { |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String writeName; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String ratifyName; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private String writeTimeStr; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | private String ratifyTimeStr; |
| | | |
| | | @ApiModelProperty("年度") |
| | | private String year; |
| | | |
| | | private List<DeviceExaminePlanDetails> examinePlanDetailsList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrastDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 13:59:37 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceExamineRecordContrastDetailsDto extends DeviceExamineRecordContrastDetails { |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrast; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrastDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/16 |
| | | */ |
| | | @Data |
| | | public class DeviceExamineRecordContrastDto extends DeviceExamineRecordContrast { |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
") |
| | | private List<DeviceExamineRecordContrastDetails> recordContrastDetailsList; |
| | | |
| | | |
| | | @ApiModelProperty("A设å¤åç§°") |
| | | private String aDeviceName; |
| | | |
| | | @ApiModelProperty("A设å¤ç¼å·") |
| | | private String aDeviceNumber; |
| | | |
| | | @ApiModelProperty("b设å¤åç§°") |
| | | private String bDeviceName; |
| | | |
| | | @ApiModelProperty("b设å¤ç¼å·") |
| | | private String bDeviceNumber; |
| | | |
| | | @ApiModelProperty("c设å¤åç§°") |
| | | private String cDeviceName; |
| | | |
| | | @ApiModelProperty("c设å¤ç¼å·") |
| | | private String cDeviceNumber; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¥æ") |
| | | private String checkerTimeStr; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private String reviewTimeStr; |
| | | |
| | | @ApiModelProperty("å®éªå®¤") |
| | | private String labName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecord; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/16 |
| | | */ |
| | | @Data |
| | | public class DeviceExamineRecordDto extends DeviceExamineRecord { |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è®°å½è¯¦æ
") |
| | | private List<DeviceExamineRecordDetail> recordDetailList; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("æå䏿¬¡ä¿®æ¹æ¥æ") |
| | | private String updateTimeStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-10 ææäº 15:55:29 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceExport extends Device { |
| | | @ApiModelProperty("管ç人") |
| | | private String equipmentManagerName; |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceExternalApply; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/19 |
| | | */ |
| | | @Data |
| | | public class DeviceExternalApplyDto extends DeviceExternalApply { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceFaultOne; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceFaultOneDto extends DeviceFaultOne { |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecord; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecordDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-16 ææä¸ 17:23:22 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceInspectionRecordDto extends DeviceInspectionRecord { |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("æµè¯è¯¦æ
å
容") |
| | | private List<DeviceInspectionRecordDetails> details; |
| | | |
| | | @ApiModelProperty("æµè¯æ¶é´") |
| | | private String testDateString; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlanDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 9:26:48 |
| | | * Description: 设å¤ä¿å
»è®¡å详æ
|
| | | */ |
| | | @Data |
| | | public class DeviceMaintenancePlanDetailsDto extends DeviceMaintenancePlanDetails { |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty("å½å±å®éªå®¤") |
| | | private String storagePoint; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlan; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-16 ææä¸ 18:26:59 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceMaintenancePlanDto extends DeviceMaintenancePlan { |
| | | |
| | | @ApiModelProperty("设å¤ä¿å
»è®¡å详æ
") |
| | | @TableField(exist = false) |
| | | private List<DeviceMaintenancePlanDetailsDto> deviceMaintenancePlanDetails; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private String datePreparationStr; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private String auditDateStr; |
| | | |
| | | @ApiModelProperty("设å¤Id") |
| | | private Integer deviceId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-13 ææäº 10:43:06 |
| | | * Description: 仪å¨è®¾å¤æ¡£æ¡å¡ä¸æ¾ç¤ºçè®¾å¤æ ¡åè®°å½åç»´æ¤è®°å½çå表对象 |
| | | */ |
| | | @Data |
| | | public class DeviceMetricRecordAndMaintenanceDto { |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | |
| | | // æ ¡å表ä¸çæ°æ® |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | private String calibrationDateString; |
| | | |
| | | @ApiModelProperty("è¯ä¹¦æ å·") |
| | | private String certificateNumber; |
| | | |
| | | @ApiModelProperty("æ ¡åæææ¥æ") |
| | | private String validityDateString; |
| | | |
| | | @ApiModelProperty("å¤å®") |
| | | private String judgement; |
| | | |
| | | // 维修记å½è¡¨ä¸çæ°æ® |
| | | @ApiModelProperty("ç»´ä¿®æ¥æ") |
| | | private String maintenanceDateString; |
| | | |
| | | @ApiModelProperty("å¤çæ¹å¼") |
| | | private String handlingMethod; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String comments; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceMetricRecord; |
| | | import com.yuanchu.mom.pojo.DeviceMetricsCopy; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DeviceMetricRecordDto extends DeviceMetricRecord { |
| | | |
| | | private List<DeviceMetricsCopy> deviceMetricsCopyList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceRecordDto extends DeviceRecord { |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String managementNumber; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-10 ææäº 17:19:22 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceRecordExportWord extends DeviceRecord { |
| | | @ApiModelProperty("使ç¨å0ä»£è¡¨ä¸æ£å¸¸1代表æ£å¸¸") |
| | | private String useBeforeString; |
| | | |
| | | @ApiModelProperty("使ç¨å0ä»£è¡¨ä¸æ£å¸¸1代表æ£å¸¸") |
| | | private String useAfterString; |
| | | |
| | | @ApiModelProperty("æä½æ¶é´ String yyyy-MM-dd") |
| | | private String operationDate; |
| | | |
| | | @ApiModelProperty("使ç¨å¼å§æ¥æ String yyyy-MM-dd \n HH:mm:ss") |
| | | private String useStartDateString; |
| | | |
| | | @ApiModelProperty("使ç¨ç»ææ¥æ String yyyy-MM-dd \n HH:mm:ss") |
| | | private String useEndDateString; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceScrapped; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 18:34:17 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceScrappedDto extends DeviceScrapped { |
| | | |
| | | @ApiModelProperty("ç³è¯·æ¶é´") |
| | | private String applicantDateStr; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private String departmentHeadDateStr; |
| | | |
| | | @ApiModelProperty("计éå®¤äººå¡«åæ¶é´") |
| | | private String meteringRoomDateStr; |
| | | |
| | | @ApiModelProperty("æ¹åäººå¡«åæ¶é´") |
| | | private String approverDateStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceState; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceStateDto extends DeviceState { |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty(value = "æä½æ¥æ yyyy-MM-dd") |
| | | private String submitDateString; |
| | | |
| | | @ApiModelProperty("è´è´£äººå®¡æ¹æ¥æ yyyy-MM-dd") |
| | | private String departmentDateString; |
| | | |
| | | @ApiModelProperty("计éå®¤å®¡æ¹æ¥æ yyyy-MM-dd") |
| | | private String measuringRoomDateString; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ yyyy-MM-dd") |
| | | private String approvalDateString; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç±»å") |
| | | private String largeCategory; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagementDetails; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-20 ææäº 15:05:02 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceTraceabilityManagementDetailsDto extends DeviceTraceabilityManagementDetails { |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("仪å¨è®¾å¤åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String managementNumber; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagement; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-20 ææäº 14:30:45 |
| | | * Description: |
| | | */ |
| | | @Data |
| | | public class DeviceTraceabilityManagementDto extends DeviceTraceabilityManagement { |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡å详æ
") |
| | | private List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetails; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private String datePreparationStr; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private String auditDateStr; |
| | | |
| | | @ApiModelProperty("设å¤Id") |
| | | private Integer deviceId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-13 ææäº 8:45:34 |
| | | * Description: ç¨äºä»ªå¨è®¾å¤æ¡£æ¡å¡çå¯¼åº |
| | | */ |
| | | @Data |
| | | public class DocumentExportWordDto { |
| | | |
| | | // è®¾å¤æ¡£æ¡å·¦å表 |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index1; |
| | | |
| | | @ApiModelProperty("æ¡£æ¡åç§°") |
| | | private String name1; |
| | | |
| | | @ApiModelProperty("份æ°") |
| | | private Integer quantity1; |
| | | |
| | | @ApiModelProperty("页ç ") |
| | | private Integer pageCount1; |
| | | |
| | | @ApiModelProperty("彿¡£æ¥æ") |
| | | private String archiveDateString1; |
| | | |
| | | // è®¾å¤æ¡£æ¡å³å表 |
| | | @ApiModelProperty("åºå·") |
| | | private Integer index2; |
| | | |
| | | @ApiModelProperty("æ¡£æ¡åç§°") |
| | | private String name2; |
| | | |
| | | @ApiModelProperty("份æ°") |
| | | private Integer quantity2; |
| | | |
| | | @ApiModelProperty("页ç ") |
| | | private Integer pageCount2; |
| | | |
| | | @ApiModelProperty("彿¡£æ¥æ") |
| | | private String archiveDateString2; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.*; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IncidentReportAddDto extends IncidentReport { |
| | | private List<IncidentSpareParts> sparePartsConfirmationList; // å¤ä»¶ç¡®è®¤List |
| | | private List<IncidentFile> fileClassConfirmationList; // æä»¶ç¡®è®¤List |
| | | private List<IncidentInstall> installationAcceptanceRecordList; // å®è£
éªæ¶è®°å½ |
| | | private List<IncidentAcceptanceCheck> acceptanceCheckRecordList; // éªæ¶æ ¸æ¥è®°å½ |
| | | |
| | | private String deviceName; |
| | | |
| | | private String managementNumber; |
| | | |
| | | private String submitUser; |
| | | |
| | | private String saveState; |
| | | |
| | | private String manufacturer; |
| | | |
| | | private String specificationModel; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.IncidentReport; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-12 ææå 10:39:23 |
| | | * Description: 导åºéªæ¶æ¥åå°wordçdto |
| | | */ |
| | | public class IncidentReportExportWordDto extends IncidentReport { |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("éé¢") |
| | | private String amount; |
| | | |
| | | @ApiModelProperty("åºåç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("å°è´§æ¥æ") |
| | | private String arrivalDateString; |
| | | |
| | | @ApiModelProperty("åæ¾å°ç¹") |
| | | private String deviceLocation; |
| | | |
| | | @ApiModelProperty("ç产åå®¶") |
| | | private String manufacturer; |
| | | |
| | | @ApiModelProperty("ä¾åºå") |
| | | private String supplier; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®åä½") |
| | | private String maintainUnit; |
| | | |
| | | @ApiModelProperty("æ¶è®¾å¤ä¸»æºåå¤ä»¶æ
åµ") |
| | | private String equipmentHostAndSpareParts; |
| | | |
| | | @ApiModelProperty("éªæ¶æ
åµ") |
| | | private String unpackingAcceptanceConclusionString; |
| | | |
| | | @ApiModelProperty("æäº¤æ¥æ yyyy-MM-dd") |
| | | private String submitDateString; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.Instruction; |
| | | import com.yuanchu.mom.pojo.OperationInstruction; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class InstructionDto extends Instruction { |
| | | |
| | | private List<OperationInstruction> feTempHumRecordList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.yuanchu.mom.pojo.Instruction; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class InstructionFileDto extends Instruction { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(" 设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(" ææ¡£ç¼å·") |
| | | private String documentNumber; |
| | | |
| | | @ApiModelProperty(" 设å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty(" ææ¡£çæ¬") |
| | | private String documentVersion; |
| | | |
| | | @ApiModelProperty("éä»¶") |
| | | private String attachmentInformation; |
| | | |
| | | @ApiModelProperty(" ä½è
") |
| | | private Integer author; |
| | | |
| | | @ApiModelProperty("æäº¤æ¥æ") |
| | | private LocalDate submitDate; |
| | | |
| | | @ApiModelProperty("ææ¡£è¯´æ") |
| | | private String documentNote; |
| | | |
| | | private String documentType; |
| | | |
| | | private String deviceModel; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.OperationInstruction; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OperationInstructionDto extends OperationInstruction { |
| | | @ApiModelProperty("ç³è¯·ç¼å·") |
| | | private String applicationNumber; |
| | | |
| | | @ApiModelProperty("ç³è¯·é¨é¨") |
| | | private String applicationDepartment; |
| | | |
| | | @ApiModelProperty("责任人") |
| | | private String personLiable; |
| | | |
| | | @ApiModelProperty("åæ§ç³è¯·è¯´æ") |
| | | private String controlledApplicationDescription; |
| | | |
| | | @ApiModelProperty("管çç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("ä¸ä¼ 人") |
| | | private String uploaderName; |
| | | |
| | | @ApiModelProperty("审æ¹äºº") |
| | | private String approverName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.Reservation; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ReservationDto extends Reservation { |
| | | |
| | | private String name; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class DeviceBorrowExcel { |
| | | |
| | | @ApiModelProperty("æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty("0设å¤ç¶æ") |
| | | private String deviceStatus; |
| | | |
| | | @ApiModelProperty("0åç¨å¯ç¨çç±") |
| | | private String reason; |
| | | |
| | | @ExcelProperty(value = "æäº¤äºº") |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("æäº¤æ¥æ") |
| | | @ExcelProperty(value = "æäº¤æ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | |
| | | @Data |
| | | @EqualsAndHashCode |
| | | public class DeviceFaultOneExcel { |
| | | @ExcelProperty("åºå·") |
| | | private Long index; |
| | | @ExcelProperty("æµç¨ç¼å·") |
| | | private String deviceNumber; |
| | | @ExcelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | @ExcelProperty("ç»ä¸ç¼å·") |
| | | private Double managementNumber; |
| | | @ExcelProperty("æ
éæ
åµ") |
| | | private String faultSituation; |
| | | @ExcelProperty("æäº¤äºº") |
| | | private String submitPerson; |
| | | @ExcelProperty("æäº¤æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | private LocalDate faultDate; |
| | | @ExcelProperty("å½åç¶æ") |
| | | private String currentStatus; |
| | | @ExcelProperty("å½å责任人") |
| | | private String currentResponsiblePerson; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class DeviceFaultOneExport { |
| | | |
| | | @ExcelProperty("æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ExcelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ExcelProperty(value = "ç»ä¸ç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ExcelProperty("æ
éæ
åµ") |
| | | private String faultSituation; |
| | | |
| | | @ExcelProperty("æäº¤äºº") |
| | | private String submitPerson; |
| | | |
| | | @ExcelProperty("æäº¤æ¥æ") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ExcelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ExcelProperty("å½å责任人") |
| | | private String currentResponsible; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceMaintenanceExport { |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("æµç¨ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ColumnWidth(50) |
| | | @ExcelProperty("ç»´æ¤å
容") |
| | | private String content; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("ç»´æ¤æ¶é´") |
| | | private String date; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("䏿¬¡ç»´æ¤æ¶é´") |
| | | private String nextDate; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("ç»´æ¤ç±»å") |
| | | private String maintenanceType; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("ç»´æ¤äºº") |
| | | private String name; |
| | | |
| | | @ColumnWidth(50) |
| | | @ExcelProperty("夿³¨") |
| | | private String comments; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceRecordExport { |
| | | @ExcelProperty("æµç¨ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ExcelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ExcelProperty("管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ExcelProperty("温度") |
| | | private String temperature; |
| | | |
| | | @ExcelProperty("湿度") |
| | | private String humidity; |
| | | |
| | | @ExcelProperty("使ç¨å") |
| | | private String useBefore; |
| | | |
| | | @ExcelProperty("使ç¨å") |
| | | private String useAfter; |
| | | |
| | | @ExcelProperty("å¼å¸¸æ
åµ") |
| | | private String abnormal; |
| | | |
| | | @ExcelProperty("ä½¿ç¨æ¥æ") |
| | | private String useDate; |
| | | |
| | | @ExcelProperty("使ç¨äºº") |
| | | private String usePerson; |
| | | |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class DeviceStateExport { |
| | | @ExcelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ExcelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | @ExcelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ExcelProperty("设å¤ç¶æ") |
| | | private String deviceStatus; |
| | | |
| | | @ExcelProperty("åç¨å¯ç¨çç±") |
| | | private String reason; |
| | | |
| | | @ExcelProperty("æäº¤äºº") |
| | | private String createUser; |
| | | |
| | | @ExcelProperty("æäº¤æ¥æ") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ExcelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ExcelProperty("å½åè´è´£äºº") |
| | | private String currentResponsible; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class IncidentReportExport { |
| | | @ExcelProperty(value = "æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ExcelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ExcelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ExcelProperty(value = "åºåå·") |
| | | private String serialNumber; |
| | | |
| | | @ExcelProperty(value = "æäº¤è
") |
| | | private String submitUser; |
| | | |
| | | @ExcelProperty(value = "æäº¤æ¥æ") |
| | | private String createTime; |
| | | |
| | | @ExcelProperty(value = "å½åç¶æ") |
| | | private String saveState; |
| | | |
| | | @ExcelProperty("å½åè´è´£äºº") |
| | | private String currentResponsible; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel.upload; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/20 |
| | | */ |
| | | @Data |
| | | public class DeviceCalibrationPlanDetailUpload { |
| | | |
| | | @ApiModelProperty("设å¤åç§°ååå·") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ°é") |
| | | private String deviceAmount; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("æ£å®åä½") |
| | | private String verificationUnit; |
| | | |
| | | @ApiModelProperty("æ£å®å¨æ") |
| | | private String verificationCycles; |
| | | |
| | | @ApiModelProperty("æè¿æ£å®æ¶é´") |
| | | private String lastDate; |
| | | |
| | | @ApiModelProperty("æ¬å¹´è®¡åæ ¡åæ¶é´") |
| | | private String planDate; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel.upload; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/12/20 |
| | | */ |
| | | @Data |
| | | public class DeviceExaminePlanUpload { |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¶é´") |
| | | private String checkTime; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥ææ ") |
| | | private String checkIndex; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¹æ³") |
| | | private String checkMethod; |
| | | |
| | | @ApiModelProperty("ç»æå¦ä½å¤å®") |
| | | private String howResults; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è´£ä»»äºº") |
| | | private String checkChargerUser; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptanceFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤)é件表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:26 |
| | | */ |
| | | public interface DeviceAcceptanceFileMapper extends BaseMapper<DeviceAcceptanceFile> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptance; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | public interface DeviceAcceptanceMapper extends BaseMapper<DeviceAcceptance> { |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceAcceptance> pageDeviceAcceptance(Page page, @Param("ew") QueryWrapper<DeviceAcceptance> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceAccidentReportDto; |
| | | import com.yuanchu.mom.pojo.DeviceAccidentReport; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | public interface DeviceAccidentReportMapper extends BaseMapper<DeviceAccidentReport> { |
| | | |
| | | /** |
| | | * 设å¤äºæ
æ¥åå表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceAccidentReport> pageDeviceAccidentReport(Page page, @Param("ew") QueryWrapper<DeviceAccidentReport> ew); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äºæ
æ¥å详æ
|
| | | * @param accidentReportId 设å¤äºæ
æ¥åid |
| | | * @return |
| | | */ |
| | | DeviceAccidentReportDto selectDeviceAccidentReportById(Integer accidentReportId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceBorrow; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | public interface DeviceBorrowMapper extends BaseMapper<DeviceBorrow> { |
| | | |
| | | IPage<DeviceBorrow> deviceBorrowPage(Page page, @Param("ew")QueryWrapper<DeviceBorrow> ew); |
| | | |
| | | List<DeviceBorrow> getDeviceBorrowBydeviceId(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceBreakdownMaintenance; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | public interface DeviceBreakdownMaintenanceMapper extends BaseMapper<DeviceBreakdownMaintenance> { |
| | | |
| | | /** |
| | | * è®¾å¤æ
éç»´ä¿®å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceBreakdownMaintenance> pageDeviceBreakdownMaintenance(Page page, @Param("ew") QueryWrapper<DeviceBreakdownMaintenance> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:29 |
| | | */ |
| | | public interface DeviceCalibrationPlanDetailMapper extends BaseMapper<DeviceCalibrationPlanDetail> { |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计å详æ
å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceCalibrationPlanDetail> pageDeviceCalibrationPlanDetail(Page page, @Param("ew") QueryWrapper<DeviceCalibrationPlanDetail> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceCalibrationPlanDto; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlan; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | public interface DeviceCalibrationPlanMapper extends BaseMapper<DeviceCalibrationPlan> { |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceCalibrationPlanDto> pageDeviceCalibrationPlan(Page page, @Param("ew") QueryWrapper<DeviceCalibrationPlan> ew); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceCheck; |
| | | |
| | | public interface DeviceCheckMapper extends BaseMapper<DeviceCheck> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:16 |
| | | */ |
| | | public interface DeviceExaminePlanDetailsMapper extends BaseMapper<DeviceExaminePlanDetails> { |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceExaminePlanDetails> pageDeviceExaminePlanDetail(Page page, @Param("ew") QueryWrapper<DeviceExaminePlanDetails> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceExaminePlanDto; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlan; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | public interface DeviceExaminePlanMapper extends BaseMapper<DeviceExaminePlan> { |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceExaminePlanDto> deviceExaminePlanDetailsMapper(Page page, @Param("ew") QueryWrapper<DeviceExaminePlan> ew); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | * @param deviceExaminePlanId è®¾å¤æ ¸æ¥è®¡åid |
| | | * @return |
| | | */ |
| | | DeviceExaminePlanDto selectExamineExaminePlanDto(@Param("deviceExaminePlanId") Integer deviceExaminePlanId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrastDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:57 |
| | | */ |
| | | public interface DeviceExamineRecordContrastDetailsMapper extends BaseMapper<DeviceExamineRecordContrastDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordContrastDto; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrast; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:43 |
| | | */ |
| | | public interface DeviceExamineRecordContrastMapper extends BaseMapper<DeviceExamineRecordContrast> { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordContrastDto getExamineRecordContrast(Integer planDetailsId); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¯¹æ¯è®°å½ç¨äºå¯¼åº |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordContrastDto selectExamineRecordContrastDto(@Param("planDetailsId") Integer planDetailsId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:15:11 |
| | | */ |
| | | public interface DeviceExamineRecordDetailMapper extends BaseMapper<DeviceExamineRecordDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordDto; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:28 |
| | | */ |
| | | public interface DeviceExamineRecordMapper extends BaseMapper<DeviceExamineRecord> { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¸æ¥è®°å½ |
| | | * @param planDetailsId |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordDto getExamineRecord(Integer planDetailsId); |
| | | |
| | | /** |
| | | * 夿 ¸æ ¸æ¥è®°å½ |
| | | * @param planDetailsId 夿 ¸æ ¸æ¥è®°å½id |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordDto selectReviewExamineRecordDto(@Param("planDetailsId") Integer planDetailsId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.DeviceExternalApply; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | public interface DeviceExternalApplyMapper extends BaseMapper<DeviceExternalApply> { |
| | | |
| | | /** |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceExternalApply> pageDeviceExternalApply(Page page, @Param("ew") QueryWrapper<DeviceExternalApply> ew); |
| | | |
| | | /** |
| | | * å¯¼åºæ¥è¯¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @param externalApplyId å¤é¨è®¾å¤ç³è¯·è¡¨id |
| | | * @return |
| | | */ |
| | | DeviceExternalApply selectDeviceExternalById(@Param("externalApplyId") Integer externalApplyId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceFault; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceFaultMapper extends BaseMapper<DeviceFault> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceFaultOneDto; |
| | | import com.yuanchu.mom.pojo.DeviceFaultOne; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 02:03:29 |
| | | */ |
| | | public interface DeviceFaultOneMapper extends BaseMapper<DeviceFaultOne> { |
| | | |
| | | IPage<DeviceFaultOneDto> deviceFaultOnePage(Integer deviceId, Page page, String processNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecordDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:27:32 |
| | | */ |
| | | public interface DeviceInspectionRecordDetailsMapper extends BaseMapper<DeviceInspectionRecordDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto.DeviceInspectionRecordDto; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | public interface DeviceInspectionRecordMapper extends BaseMapper<DeviceInspectionRecord> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | * @param page |
| | | * @param queryWrappers |
| | | * @return |
| | | */ |
| | | IPage<DeviceInspectionRecord> selectDeviceParameterPage(IPage page, @Param("ew") QueryWrapper<DeviceInspectionRecordDto> queryWrappers); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceLease; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceLeaseMapper extends BaseMapper<DeviceLease> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceLogMapper extends BaseMapper<DeviceLog> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.excel.DeviceMaintenanceExport; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenance; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface DeviceMaintenanceMapper extends BaseMapper<DeviceMaintenance> { |
| | | List<DeviceMaintenance> getDeviceMaintenanceParam(); |
| | | |
| | | // IPage<DeviceMaintenance> getDeviceMaintenancePage(Page page, Integer deviceId); |
| | | |
| | | List<DeviceMaintenanceExport> deviceMaintenanceExport(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.dto.DeviceMaintenancePlanDetailsDto; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlanDetails; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:11:46 |
| | | */ |
| | | public interface DeviceMaintenancePlanDetailsMapper extends BaseMapper<DeviceMaintenancePlanDetails> { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿å
»è¯¦æ
|
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | */ |
| | | List<DeviceMaintenancePlanDetailsDto> deviceInspectionRecordDetailsList(@Param("maintenancePlanId") Integer maintenancePlanId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto.DeviceMaintenancePlanDto; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlan; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | public interface DeviceMaintenancePlanMapper extends BaseMapper<DeviceMaintenancePlan> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * @param page å½å页 |
| | | * @param queryWrappers æ¥è¯¢æ¡ä»¶ |
| | | * @return |
| | | */ |
| | | IPage<DeviceMaintenancePlan> selectDeviceParameterPage(IPage page, @Param("ew") QueryWrapper<DeviceMaintenancePlanDto> queryWrappers); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¿å
»è®¡åidæ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * @param maintenancePlanId ä¿å
»è®¡åid |
| | | * @return |
| | | */ |
| | | DeviceMaintenancePlanDto selectMaintenancePlanById(@Param("maintenancePlanId") Integer maintenancePlanId); |
| | | } |
| | |
| | | //æ¥è¯¢è®¾å¤è´è´£äºº |
| | | List<Device> selectDevicePrincipal(); |
| | | |
| | | IPage<DeviceDto> selectDeviceParameterPage(Page page, @Param("ew") QueryWrapper<DeviceDto> queryWrappers); |
| | | IPage<DeviceDto> selectDeviceParameterPage(Page page, @Param("ew") QueryWrapper<DeviceDto> queryWrappers,@Param("laboratoryNameIsNull") Boolean laboratoryNameIsNull); |
| | | |
| | | List<Map<String, Object>> getInspectionItemSubclass(@Param("id") Integer id); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMetric; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceMetricMapper extends BaseMapper<DeviceMetric> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMetricRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | public interface DeviceMetricRecordMapper extends BaseMapper<DeviceMetricRecord> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMetricsCopy; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | public interface DeviceMetricsCopyMapper extends BaseMapper<DeviceMetricsCopy> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceRecordDto; |
| | | import com.yuanchu.mom.pojo.DeviceRecord; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | public interface DeviceRecordMapper extends BaseMapper<DeviceRecord> { |
| | | |
| | | IPage<DeviceRecordDto> deviceRecordPage(Integer deviceId, Page page, String sampleCode, String managementNumber, Integer userId); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æªå¡«åçè®¾å¤ |
| | | * @return |
| | | */ |
| | | List<DeviceRecordDto> selectNotFilled(); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¯¼åºè®¾å¤ä½¿ç¨è®°å½ |
| | | * @param deviceId |
| | | * @param exportDate |
| | | * @return |
| | | */ |
| | | List<DeviceRecord> selectExportList(Integer deviceId, String exportDate); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceScrappedDto; |
| | | import com.yuanchu.mom.pojo.DeviceScrapped; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | public interface DeviceScrappedMapper extends BaseMapper<DeviceScrapped> { |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<DeviceScrapped> pageDeviceScrapped(Page page, @Param("ew") QueryWrapper<DeviceScrapped> ew); |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢è®¾å¤æ¥åºç³è¯· |
| | | * @param scrappedId |
| | | * @return |
| | | */ |
| | | DeviceScrappedDto selectDeviceScrappedById(@Param("scrappedId") Integer scrappedId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.DeviceStateDto; |
| | | import com.yuanchu.mom.pojo.DeviceState; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | public interface DeviceStateMapper extends BaseMapper<DeviceState> { |
| | | |
| | | IPage<DeviceStateDto> getDeviceStatePage(Integer deviceId, Page page, String processNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.dto.DeviceTraceabilityManagementDetailsDto; |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagementDetails; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:58 |
| | | */ |
| | | public interface DeviceTraceabilityManagementDetailsMapper extends BaseMapper<DeviceTraceabilityManagementDetails> { |
| | | |
| | | /** |
| | | * æ ¹æ®æº¯æºè®¡åidæ¥è¯¢æº¯æºè®¡å详æ
|
| | | * @param traceabilityManagementId 溯æºè®¡åid |
| | | * @return 溯æºè®¡å详æ
|
| | | */ |
| | | List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetailsList(@Param("traceabilityManagementId") Integer traceabilityManagementId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.yuanchu.mom.dto.DeviceTraceabilityManagementDto; |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagement; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | public interface DeviceTraceabilityManagementMapper extends BaseMapper<DeviceTraceabilityManagement> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤é弿º¯æºè®¡å |
| | | * @param page |
| | | * @param queryWrappers |
| | | * @return |
| | | */ |
| | | IPage<DeviceTraceabilityManagement> selectDeviceParameterPage(IPage page, @Param("ew") QueryWrapper<DeviceTraceabilityManagementDto> queryWrappers); |
| | | |
| | | /** |
| | | * æ ¹æ®idæ¥è¯¢è®¾å¤é弿º¯æºè®¡å |
| | | * @param traceabilityManagementId |
| | | * @return |
| | | */ |
| | | DeviceTraceabilityManagementDto selectDeviceTraceabilityManagementById(@Param("traceabilityManagementId") Integer traceabilityManagementId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.Document; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DocumentDao extends BaseMapper<Document> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.mybatis_config.MyBaseMapper; |
| | | import com.yuanchu.mom.pojo.IncidentAcceptanceCheck; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-éªæ¶æ ¸æ¥ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:19 |
| | | */ |
| | | public interface IncidentAcceptanceCheckMapper extends MyBaseMapper<IncidentAcceptanceCheck> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.mybatis_config.MyBaseMapper; |
| | | import com.yuanchu.mom.pojo.IncidentFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-æä»¶ç±»ç¡®è®¤ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:36 |
| | | */ |
| | | public interface IncidentFileMapper extends MyBaseMapper<IncidentFile> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.mybatis_config.MyBaseMapper; |
| | | import com.yuanchu.mom.pojo.IncidentInstall; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-å®è£
éªæ¶æ£æ¥ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:50 |
| | | */ |
| | | public interface IncidentInstallMapper extends MyBaseMapper<IncidentInstall> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.IncidentReportAddDto; |
| | | import com.yuanchu.mom.dto.IncidentReportExportWordDto; |
| | | import com.yuanchu.mom.excel.IncidentReportExport; |
| | | import com.yuanchu.mom.pojo.IncidentReport; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶æ·»å éªæ¶å段表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 03:54:49 |
| | | */ |
| | | public interface IncidentReportMapper extends BaseMapper<IncidentReport> { |
| | | |
| | | IPage<IncidentReportAddDto> getByDeviceId(Page page, @Param("deviceId") Integer deviceId, @Param("processNumber") String processNumber); |
| | | |
| | | IncidentReportAddDto getShowIncidentReport(Integer id); |
| | | |
| | | List<IncidentReportExport> incidentReportExport(Integer deviceId); |
| | | |
| | | /** |
| | | * 导åºéªæ¶æ¥å |
| | | * @param deviceId 设å¤id |
| | | * @param processNumber æµç¨å· |
| | | * @return |
| | | */ |
| | | IncidentReportExportWordDto acceptanceCertificateExport(@Param("deviceId") Integer deviceId,@Param("processNumber") String processNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.yuanchu.mom.mybatis_config.MyBaseMapper; |
| | | import com.yuanchu.mom.pojo.IncidentSpareParts; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-å¤ä»¶ç¡®è®¤ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:42:06 |
| | | */ |
| | | public interface IncidentSparePartsMapper extends MyBaseMapper<IncidentSpareParts> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.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.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.OperationInstructionDto; |
| | | import com.yuanchu.mom.pojo.Instruction; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | public interface InstructionMapper extends BaseMapper<Instruction> { |
| | | |
| | | |
| | | IPage<Instruction> pageByPageQueryOfHomeworkInstructions(Page page, @Param("ew") QueryWrapper<OperationInstructionDto> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.OperationInstruction; |
| | | import com.yuanchu.mom.vo.OperationInstructionVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:43:32 |
| | | */ |
| | | public interface OperationInstructionMapper extends BaseMapper<OperationInstruction> { |
| | | |
| | | List<OperationInstructionVo> homeworkGuidebookEditor(Integer instructionId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.dto.ReservationDto; |
| | | import com.yuanchu.mom.pojo.Reservation; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * èµæºé¢å®æ°å»ºé¢å®è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author baomidou |
| | | * @since 2024-09-14 |
| | | */ |
| | | public interface ReservationMapper extends BaseMapper<Reservation> { |
| | | |
| | | |
| | | List<ReservationDto> selectReservationParameterPage(@Param("deviceId") Integer deviceId, @Param("reservationTime") String reservationTime, @Param("specificTime") String specificTime); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_acceptance") |
| | | @ApiModel(value = "DeviceAcceptance对象", description = "设å¤éªæ¶(è£
å¤)") |
| | | public class DeviceAcceptance { |
| | | |
| | | @TableId(value = "acceptance_id", type = IdType.AUTO) |
| | | private Integer acceptanceId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å°è´§æ¥æ") |
| | | private LocalDate arrivalDate; |
| | | |
| | | @ApiModelProperty("éé¢") |
| | | private String goldAmount; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®åä½") |
| | | private String maintenanceunit; |
| | | |
| | | @ApiModelProperty("æ¶è®¾å¤ä¸»æºåå¤ä»½æ
åµ") |
| | | private String spareParts; |
| | | |
| | | @ApiModelProperty("å®è£
åè°è¯æ
åµ") |
| | | private String installationDebugging; |
| | | |
| | | @ApiModelProperty("éªæ¶æ
åµ") |
| | | private String checkSituation; |
| | | |
| | | @ApiModelProperty("æ¥æ¶ç¾å") |
| | | private String receivingSignature; |
| | | |
| | | @ApiModelProperty("å家代表") |
| | | private String producer; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äºº") |
| | | private String recipient; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æ¶é´") |
| | | private String recipientDate; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤)é件表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:26 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_acceptance_file") |
| | | @ApiModel(value = "DeviceAcceptanceFile对象", description = "设å¤éªæ¶(è£
å¤)é件表") |
| | | public class DeviceAcceptanceFile implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "acceptance_file_id", type = IdType.AUTO) |
| | | private Integer acceptanceFileId; |
| | | |
| | | @ApiModelProperty("设å¤éªæ¶id") |
| | | private Integer acceptanceId; |
| | | |
| | | @ApiModelProperty("ç±»å:1å¾ç/2æä»¶") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("éä»¶è·¯å¾") |
| | | private String fileUrl; |
| | | |
| | | @ApiModelProperty("éä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_accident_report") |
| | | @ApiModel(value = "DeviceAccidentReport对象", description = "设å¤äºæ
æ¥åå") |
| | | public class DeviceAccidentReport { |
| | | |
| | | @TableId(value = "accident_report_id", type = IdType.AUTO) |
| | | private Integer accidentReportId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å°å") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("æ¶é´") |
| | | private LocalDateTime accidentDate; |
| | | |
| | | @ApiModelProperty("äºæ
æ
åµæè¿°") |
| | | private String descriptionOfAccident; |
| | | |
| | | @ApiModelProperty("æ¥å人id") |
| | | private Integer reportUserId; |
| | | |
| | | @ApiModelProperty("æ¥å人") |
| | | private String reportUser; |
| | | |
| | | @ApiModelProperty("æ¥åäººå¡«åæ¶é´") |
| | | private LocalDate reportDate; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äººæè§") |
| | | private String assessorOpinion; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äººid") |
| | | private Integer assessorUserId; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äºº") |
| | | private String assessorUser; |
| | | |
| | | @ApiModelProperty("è¯ä¼°äººå¡«åæ¶é´") |
| | | private LocalDate assessorDate; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººæè§") |
| | | private String departmentHeadOpinion; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadUserId; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äºº") |
| | | private String departmentHeadUser; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate departmentHeadDate; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººæè§") |
| | | private String technicalDirectorOpinion; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººid") |
| | | private Integer technicalDirectorUserId; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äºº") |
| | | private String technicalDirectorUser; |
| | | |
| | | @ApiModelProperty("ææ¯è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate technicalDirectorDate; |
| | | |
| | | @ApiModelProperty("主任æè§") |
| | | private String directorHeadOpinion; |
| | | |
| | | @ApiModelProperty("主任id") |
| | | private Integer directorHeadUserId; |
| | | |
| | | @ApiModelProperty("主任") |
| | | private String directorHeadUser; |
| | | |
| | | @ApiModelProperty("䏻任填忶é´") |
| | | private LocalDate directorHeadDate; |
| | | |
| | | @ApiModelProperty("æ¯å¦ç»æ,0 æªç»æ, 1ç»æ") |
| | | private Integer isFinish; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @ApiModelProperty("æµç¨, 0:æ¥å, 1è¯ä¼°, 2:é¨é¨è´è´£äººæè§, 3:ææ¯è´è´£äººæè§, 4:主任æè§") |
| | | private Integer flowType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_borrow") |
| | | @ApiModel(value = "DeviceBorrow对象", description = "设å¤åç¨") |
| | | public class DeviceBorrow extends OrderBy implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ExcelIgnore |
| | | private Integer id; |
| | | |
| | | @ValueTableShow(1) |
| | | @ApiModelProperty("æµç¨ç¼å·") |
| | | @ExcelProperty(value = "æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | @ExcelIgnore |
| | | private Integer deviceId; |
| | | |
| | | @ValueTableShow(3) |
| | | @ApiModelProperty("管çç¼å·") |
| | | @ExcelProperty(value = "管çç¼å·") |
| | | private String unifyNumber; |
| | | |
| | | @ApiModelProperty("åç¨äºº") |
| | | @ValueTableShow(4) |
| | | @ExcelProperty(value = "åç¨äºº") |
| | | private String recipientUser; |
| | | |
| | | @ValueTableShow(5) |
| | | @ExcelProperty(value = "åç¨äººèç³»æ¹å¼") |
| | | @ApiModelProperty("åç¨äººèç³»æ¹å¼") |
| | | private String borrowerContactInformation; |
| | | |
| | | @ValueTableShow(6) |
| | | @ApiModelProperty("åç¨æ¶ç¶æ") |
| | | @ExcelProperty(value = "åç¨æ¶ç¶æ") |
| | | //0åæ ¼;1ç»´ä¿®;2åç¨;3æ¥åº |
| | | private Integer recipientState; |
| | | |
| | | @ValueTableShow(5) |
| | | @ApiModelProperty("åç¨æ¥æ") |
| | | @ExcelProperty(value = "æäº¤æ¥æ") |
| | | private Date recipientTime; |
| | | |
| | | @ApiModelProperty("ååºäºº") |
| | | @ValueTableShow(7) |
| | | @ExcelProperty(value = "ååºäºº") |
| | | private String submitUser; |
| | | |
| | | @ValueTableShow(8) |
| | | @ApiModelProperty("ååºæ¥æ") |
| | | @ExcelProperty(value = "ååºæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ValueTableShow(9) |
| | | @ApiModelProperty("å½åç¶æ") |
| | | @ExcelProperty(value = "å½åç¶æ") |
| | | private String nowState; |
| | | |
| | | @ApiModelProperty("å½å责任人") |
| | | @ValueTableShow(10) |
| | | @ExcelProperty(value = "å½å责任人") |
| | | private String nowUser; |
| | | |
| | | @ExcelIgnore |
| | | @ApiModelProperty("éä»¶") |
| | | //è·¯å¾ |
| | | private String url; |
| | | |
| | | @ValueTableShow(11) |
| | | @ApiModelProperty("éä»¶") |
| | | @ExcelProperty(value = "éä»¶") |
| | | //æä»¶å |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ä¸ç¯è责任人") |
| | | @ExcelIgnore |
| | | private String nextUser; |
| | | |
| | | @ApiModelProperty("æäº¤æä½äºº") |
| | | @ExcelIgnore |
| | | private String submitOperationUser; |
| | | |
| | | @ApiModelProperty("æäº¤æä½æ¶é´") |
| | | @ExcelIgnore |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime submitOperationTime; |
| | | |
| | | @ApiModelProperty("å½è¿äºº") |
| | | @ExcelIgnore |
| | | private String rebackUser; |
| | | |
| | | @ApiModelProperty("å½è¿æ¥æ") |
| | | @ExcelIgnore |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime rebackTime; |
| | | |
| | | @ApiModelProperty("æ¥åç¶æ0åæ ¼;1ç»´ä¿®;2åç¨;3æ¥åº") |
| | | @ExcelIgnore |
| | | private Integer receiveState; |
| | | |
| | | @ApiModelProperty("设å¤è´£ä»»äºº") |
| | | @ExcelIgnore |
| | | private String deviceUser; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelIgnore |
| | | private String note; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æä½äºº") |
| | | @ExcelIgnore |
| | | private String receiveOperationUser; |
| | | |
| | | @ApiModelProperty("æ¥æ¶æä½æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelIgnore |
| | | private LocalDateTime receiveOperationTime; |
| | | |
| | | @ValueTableShow(2) |
| | | @ApiModelProperty("设å¤åç§°") |
| | | @TableField(select = false, exist = false) |
| | | @ExcelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | |
| | | @ApiModelProperty("æµç¨è·è¸ª") |
| | | @TableField(select = false, exist = false) |
| | | @ExcelIgnore |
| | | private List<DeviceLog> deviceLogs; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_breakdown_maintenance") |
| | | @ApiModel(value = "DeviceBreakdownMaintenance对象", description = "è®¾å¤æ
é维修表") |
| | | public class DeviceBreakdownMaintenance { |
| | | |
| | | @TableId(value = "maintenance_id", type = IdType.AUTO) |
| | | private Integer maintenanceId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å®è£
å°å") |
| | | private String location; |
| | | |
| | | @ApiModelProperty("æåææ
éæ
åµ") |
| | | private String damageOrMalfunction; |
| | | |
| | | @ApiModelProperty("ç³è¯·äººid") |
| | | private Integer applicantUserId; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | private String applicantUser; |
| | | |
| | | @ApiModelProperty("è¦æ±ä¿®å¤æ¶é´") |
| | | private LocalDate repairDate; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººæè§") |
| | | private String departmentHeadOpinion; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadUserId; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äºº") |
| | | private String departmentHeadUser; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate departmentHeadDate; |
| | | |
| | | @ApiModelProperty("维修记äº") |
| | | private String maintenanceRecord; |
| | | |
| | | @ApiModelProperty("维修人") |
| | | private String maintenanceUser; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®æ¶é´") |
| | | private LocalDate maintenanceDate; |
| | | |
| | | @ApiModelProperty("æ¯å¦ç»æ,0 æªç»æ, 1ç»æ") |
| | | private Integer isFinish; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @ApiModelProperty("æµç¨, 0:ç³è¯·, 1ç³è¯·é¨é¨è´è´£äººæè§, 2:维修记äº") |
| | | private Integer flowType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_calibration_plan") |
| | | @ApiModel(value = "DeviceCalibrationPlan对象", description = "è®¾å¤æ ¡å计å主表") |
| | | public class DeviceCalibrationPlan { |
| | | |
| | | @TableId(value = "plan_id", type = IdType.AUTO) |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planName; |
| | | |
| | | @ApiModelProperty("计å年份") |
| | | private String planYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private Integer writeUserId; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private Integer ratifyUserId; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ,0 ä¸éè¿, 1 éè¿") |
| | | private Integer ratifyStatus; |
| | | |
| | | @ApiModelProperty("æ¹åä¿¡æ¯") |
| | | private String ratifyRemark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:29 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_calibration_plan_detail") |
| | | @ApiModel(value = "DeviceCalibrationPlanDetail对象", description = "è®¾å¤æ ¡å计å详æ
表") |
| | | public class DeviceCalibrationPlanDetail { |
| | | |
| | | @TableId(value = "plan_detail_id", type = IdType.AUTO) |
| | | private Integer planDetailId; |
| | | |
| | | @ApiModelProperty("计å主表id") |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("设å¤åç§°ååå·") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ°é") |
| | | private String deviceAmount; |
| | | |
| | | @ApiModelProperty("仪å¨ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("æ£å®åä½") |
| | | private String verificationUnit; |
| | | |
| | | @ApiModelProperty("æ£å®å¨æ") |
| | | private String verificationCycles; |
| | | |
| | | @ApiModelProperty("æè¿æ£å®æ¶é´") |
| | | private LocalDate lastDate; |
| | | |
| | | @ApiModelProperty("æ¬å¹´è®¡åæ ¡åæ¶é´") |
| | | private LocalDate planDate; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("device_check") |
| | | public class DeviceCheck { |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; //id |
| | | private Integer deviceId; // 设å¤ID |
| | | private String measurementParameter; // 计éåæ° |
| | | private String rangeOfMeasurement; // éç¨èå´ |
| | | private String maxPermissibleError; // æå¤§å
许误差 |
| | | private String judgmentCriteria; // å¤å®æ å |
| | | private String createdBy; // å建人 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime creationTime; // å建æ¶é´ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_plan") |
| | | @ApiModel(value = "DeviceExaminePlan对象", description = "è®¾å¤æ ¸æ¥è®¡å主表") |
| | | public class DeviceExaminePlan { |
| | | |
| | | @TableId(value = "plan_id", type = IdType.AUTO) |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planName; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private Integer writeUserId; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private LocalDateTime writeTime; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private Integer ratifyUserId; |
| | | |
| | | @ApiModelProperty("æ¹åæ¶é´") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | @ApiModelProperty("æ¹åç¶æ,0 ä¸éè¿, 1 éè¿") |
| | | private Integer ratifyStatus; |
| | | |
| | | @ApiModelProperty("æ¹åä¿¡æ¯") |
| | | private String ratifyRemark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:16 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_plan_details") |
| | | @ApiModel(value = "DeviceExaminePlanDetails对象", description = "è®¾å¤æ ¸æ¥è®¡å详æ
表") |
| | | public class DeviceExaminePlanDetails { |
| | | |
| | | @TableId(value = "plan_details_id", type = IdType.AUTO) |
| | | private Integer planDetailsId; |
| | | |
| | | @ApiModelProperty("主表id") |
| | | private Integer planId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¶é´") |
| | | private String checkTime; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥ææ ") |
| | | private String checkIndex; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¹æ³") |
| | | private String checkMethod; |
| | | |
| | | @ApiModelProperty("ç»æå¦ä½å¤å®") |
| | | private String howResults; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è´£ä»»äººid") |
| | | private Integer checkChargerUserId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥è´£ä»»äºº") |
| | | private String checkChargerUser; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:28 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_record") |
| | | @ApiModel(value = "DeviceExamineRecord对象", description = "è®¾å¤æ ¸æ¥è®°å½è¡¨") |
| | | public class DeviceExamineRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "record_id", type = IdType.AUTO) |
| | | private Integer recordId; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ ¸æ¥è¯¦æ
id") |
| | | private Integer planDetailsId; |
| | | |
| | | @ApiModelProperty("精度ç级") |
| | | private String accuracyGrade; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨åç§°") |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨ç®¡çç¼å·") |
| | | private String materialNumber; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨ç²¾åº¦/ä¸ç¡®å®åº¦") |
| | | private String materialAccuracyUncertainty; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨è§æ ¼åå·") |
| | | private String materialModel; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨æ ¸æ¥æ¹å¼") |
| | | private String materialCheckMethod; |
| | | |
| | | @ApiModelProperty("使ç¨ç©è´¨æ ¸æ¥é¡¹ç®") |
| | | private String materialCheckItems; |
| | | |
| | | @ApiModelProperty("温度") |
| | | private String temperature; |
| | | |
| | | @ApiModelProperty("湿度") |
| | | private String humidity; |
| | | |
| | | @ApiModelProperty("å¤å®") |
| | | private String determine; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äººid") |
| | | private Integer checkerUserId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äºº") |
| | | private String checkerUser; |
| | | |
| | | @ApiModelProperty("夿 ¸äººid") |
| | | private Integer reviewUserId; |
| | | |
| | | @ApiModelProperty("夿 ¸äºº") |
| | | private String reviewUser; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æ0,ä¸éè¿, 1éè¿") |
| | | private Integer reviewStatus; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å¤æ³¨") |
| | | private String reviewRemark; |
| | | |
| | | @ApiModelProperty("æµè¯ç¹1") |
| | | private String dataValue1; |
| | | @ApiModelProperty("æµè¯ç¹2") |
| | | private String dataValue2; |
| | | @ApiModelProperty("æµè¯ç¹3") |
| | | private String dataValue3; |
| | | @ApiModelProperty("æµè¯ç¹4") |
| | | private String dataValue4; |
| | | @ApiModelProperty("æµè¯ç¹5") |
| | | private String dataValue5; |
| | | @ApiModelProperty("æµè¯ç¹6") |
| | | private String dataValue6; |
| | | |
| | | @ApiModelProperty("æå¤§åå·®1") |
| | | private String maximun1; |
| | | @ApiModelProperty("æå¤§åå·®2") |
| | | private String maximun2; |
| | | @ApiModelProperty("æå¤§åå·®3") |
| | | private String maximun3; |
| | | @ApiModelProperty("æå¤§åå·®4") |
| | | private String maximun4; |
| | | @ApiModelProperty("æå¤§åå·®5") |
| | | private String maximun5; |
| | | @ApiModelProperty("æå¤§åå·®6") |
| | | private String maximun6; |
| | | |
| | | @ApiModelProperty("ç¸å¯¹åå·®1") |
| | | private String relative1; |
| | | @ApiModelProperty("ç¸å¯¹åå·®2") |
| | | private String relative2; |
| | | @ApiModelProperty("ç¸å¯¹åå·®3") |
| | | private String relative3; |
| | | @ApiModelProperty("ç¸å¯¹åå·®4") |
| | | private String relative4; |
| | | @ApiModelProperty("ç¸å¯¹åå·®5") |
| | | private String relative5; |
| | | @ApiModelProperty("ç¸å¯¹åå·®6") |
| | | private String relative6; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:43 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_record_contrast") |
| | | @ApiModel(value = "DeviceExamineRecordContrast对象", description = "è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨") |
| | | public class DeviceExamineRecordContrast implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "record_contrast_id", type = IdType.AUTO) |
| | | private Integer recordContrastId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¹å¼") |
| | | private String checkMethod; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ ¸æ¥è¯¦æ
id") |
| | | private Integer planDetailsId; |
| | | |
| | | @ApiModelProperty("设å¤idA") |
| | | private Integer aDeviceId; |
| | | |
| | | @ApiModelProperty("设å¤idb") |
| | | private Integer bDeviceId; |
| | | |
| | | @ApiModelProperty("设å¤idc") |
| | | private Integer cDeviceId; |
| | | |
| | | @ApiModelProperty("èå´ä¸ç¡®å®åº¦A") |
| | | private String aRangeUncertainty; |
| | | |
| | | @ApiModelProperty("èå´ä¸ç¡®å®åº¦b") |
| | | private String bRangeUncertainty; |
| | | |
| | | @ApiModelProperty("èå´ä¸ç¡®å®åº¦c") |
| | | private String cRangeUncertainty; |
| | | |
| | | @ApiModelProperty("综åå¤å®") |
| | | private String judgment; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äººid") |
| | | private Integer checkerUserId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äºº") |
| | | private String checkerUser; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥æ¥æ") |
| | | private LocalDateTime checkerTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer reviewUserId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | private String reviewUser; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æ0,ä¸éè¿, 1éè¿") |
| | | private Integer reviewStatus; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸å¤æ³¨") |
| | | private String reviewRemark; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private LocalDateTime reviewTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:57 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_record_contrast_details") |
| | | @ApiModel(value = "DeviceExamineRecordContrastDetails对象", description = "è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表") |
| | | public class DeviceExamineRecordContrastDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "record_contrast_details_id", type = IdType.AUTO) |
| | | private Integer recordContrastDetailsId; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ ¸æ¥è¯¦æ
id") |
| | | private Integer recordContrastId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥é¡¹ç®") |
| | | private String checkItems; |
| | | |
| | | @ApiModelProperty("a仪å¨ç¤ºå¼") |
| | | private String indicationA; |
| | | |
| | | @ApiModelProperty("b仪å¨ç¤ºå¼") |
| | | private String indicationB; |
| | | |
| | | @ApiModelProperty("c仪å¨ç¤ºå¼") |
| | | private String indicationC; |
| | | |
| | | @ApiModelProperty("å·®å¼") |
| | | private String dValue; |
| | | |
| | | @ApiModelProperty("åå·®") |
| | | private String deviation; |
| | | |
| | | @ApiModelProperty("å¤å®") |
| | | private String determine; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:15:11 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_examine_record_detail") |
| | | @ApiModel(value = "DeviceExamineRecordDetail对象", description = "è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表") |
| | | public class DeviceExamineRecordDetail implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "record_detail_id", type = IdType.AUTO) |
| | | private Integer recordDetailId; |
| | | |
| | | @ApiModelProperty("è®¾è®¾å¤æ ¸æ¥è®°å½id") |
| | | private Integer recordId; |
| | | |
| | | @ApiModelProperty("æµè¯ç¹") |
| | | private String testPoint; |
| | | |
| | | @ApiModelProperty("å
容å¼1") |
| | | private String dataValue1; |
| | | |
| | | @ApiModelProperty("å
容å¼2") |
| | | private String dataValue2; |
| | | |
| | | @ApiModelProperty("å
容å¼3") |
| | | private String dataValue3; |
| | | |
| | | @ApiModelProperty("å
容å¼4") |
| | | private String dataValue4; |
| | | |
| | | @ApiModelProperty("å
容å¼5") |
| | | private String dataValue5; |
| | | |
| | | @ApiModelProperty("å
容å¼6") |
| | | private String dataValue6; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_external_apply") |
| | | @ApiModel(value = "DeviceExternalApply对象", description = "å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨") |
| | | public class DeviceExternalApply { |
| | | |
| | | @TableId(value = "external_apply_id", type = IdType.AUTO) |
| | | private Integer externalApplyId; |
| | | |
| | | @ApiModelProperty("åä½åç§°") |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty("å°å") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("仪å¨åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("仪å¨åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("é
ä»¶") |
| | | private String parts; |
| | | |
| | | @ApiModelProperty("对æ¹ä»ªå¨ç¼å·") |
| | | private String instrumentNumber; |
| | | |
| | | @ApiModelProperty("ææ¯ææ ") |
| | | private String technicalIndex; |
| | | |
| | | @ApiModelProperty("ææ¯è¦æ±") |
| | | private String technicalRequirements; |
| | | |
| | | @ApiModelProperty("å©ç¨åå ") |
| | | private String useReason; |
| | | |
| | | @ApiModelProperty("0ç³è¯·äººid") |
| | | private Integer applicantUserId; |
| | | |
| | | @ApiModelProperty("0ç³è¯·äºº") |
| | | private String applicantUser; |
| | | |
| | | @ApiModelProperty("0ç³è¯·æ¶é´") |
| | | private LocalDate applicantDate; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººæè§") |
| | | private String departmentHeadOpinion; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadUserId; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äºº") |
| | | private String departmentHeadUser; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate departmentHeadDate; |
| | | |
| | | @ApiModelProperty("2计é室æè§") |
| | | private String meteringRoomOpinion; |
| | | |
| | | @ApiModelProperty("2计é室人id") |
| | | private Integer meteringRoomUserId; |
| | | |
| | | @ApiModelProperty("2计é室人") |
| | | private String meteringRoomUser; |
| | | |
| | | @ApiModelProperty("2计éå®¤äººå¡«åæ¶é´") |
| | | private LocalDate meteringRoomDate; |
| | | |
| | | @ApiModelProperty("3æ¹å人æè§") |
| | | private String approverOpinion; |
| | | |
| | | @ApiModelProperty("3æ¹å人id") |
| | | private Integer approverUserId; |
| | | |
| | | @ApiModelProperty("3æ¹å人") |
| | | private String approverUser; |
| | | |
| | | @ApiModelProperty("3æ¹åäººå¡«åæ¶é´") |
| | | private LocalDate approverDate; |
| | | |
| | | @ApiModelProperty("æ¯å¦ç»æ,0: æªç»æ, 1:ç»æ") |
| | | private Integer isFinish; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @ApiModelProperty("æµç¨, 0:ç³è¯·, 1ç³è¯·é¨é¨è´è´£äººæè§, 2:计é室æè§, 3:æ¹å人") |
| | | private Integer flowType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @TableName("device_faults") |
| | | public class DeviceFault { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | //设å¤di |
| | | private Integer deviceId; |
| | | //æ
鿬¡æ° |
| | | private Integer faultCount; |
| | | //æè¿æ
鿥æ |
| | | private LocalDate recentFaultDate; |
| | | //æè¿æ ¡åæ¥æ |
| | | private LocalDate recentCalibrationDate; |
| | | // æè¿æ ¡åç»è®º |
| | | private String calibrationConclusion; |
| | | // æè¿æ£æ¥æ¥æ |
| | | private LocalDate recentCheckDate; |
| | | // ä¸ä¸æ¬¡æ£æ¥æ¥æ |
| | | private LocalDate nextCheckDate; |
| | | //æ£æ¥ç»è®º |
| | | private String checkConclusion; |
| | | //ç»´æ¤ç±»å |
| | | private String maintenanceType; |
| | | //ç»´æ¤äººå |
| | | private String maintenancePerson; |
| | | //夿³¨ |
| | | private String comments; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 02:03:29 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_fault_one") |
| | | @ApiModel(value = "DeviceFaultOne对象", description = "è®¾å¤æ
é表") |
| | | public class DeviceFaultOne implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("1æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("1å确度éå¼") |
| | | private String measureOfAccuracy; |
| | | |
| | | @ApiModelProperty("1æ
éæ
åµ") |
| | | private String faultSituation; |
| | | |
| | | @ApiModelProperty("1æä»¶åå") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("1ç³»ç»æä»¶å") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("1ä¸ç¯èè´è´£äºº") |
| | | private String submitNextPesponsible; |
| | | |
| | | @ApiModelProperty("1æä½äºº") |
| | | private String submitOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("1æ¥æ") |
| | | private LocalDateTime submitDate; |
| | | |
| | | @ApiModelProperty("2ç»´ä¿®æ¹å¼åè´¹ç¨") |
| | | private String methodCost; |
| | | |
| | | @ApiModelProperty("2å®¡æ ¸æè§") |
| | | private String adminAuditOption; |
| | | |
| | | @ApiModelProperty("2设å¤ç®¡çå-ä¸ç¯èè´è´£äºº") |
| | | private String adminNextPesponsible; |
| | | |
| | | @ApiModelProperty("2管çå-æä½äºº") |
| | | private String adminOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("2管çå-æ¥æ") |
| | | private LocalDateTime adminDate; |
| | | |
| | | @ApiModelProperty("3 ææ¯è´è´£äºº å®¡æ ¸æè§") |
| | | private String technicalAuditOption; |
| | | |
| | | @ApiModelProperty("3ææ¯è´è´£äºº ä¸ç¯èè´è´£äºº") |
| | | private String technicalNextPesponsible; |
| | | |
| | | @ApiModelProperty("3 ææ¯è´è´£äºº æä½äºº") |
| | | private String technicalOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("3 ææ¯è´è´£äºº æ¥æ") |
| | | private LocalDateTime technicalDate; |
| | | |
| | | @ApiModelProperty("4ç»´ä¿®æ
åµ") |
| | | private String maintainSituation; |
| | | |
| | | @ApiModelProperty("4 ç»´ä¿® ä¸ç¯èè´è´£äºº") |
| | | private String maintainNextPesponsible; |
| | | |
| | | @ApiModelProperty("4 ç»´ä¿® æä½äºº") |
| | | private String maintainOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("4 ç»´ä¿® æ¥æ") |
| | | private LocalDateTime maintainDate; |
| | | |
| | | @ApiModelProperty("5éªæ¶ç¡®è®¤æ ¡åæ
åµ") |
| | | private String checkCalSituation; |
| | | |
| | | @ApiModelProperty("5 ç»´ä¿®å æä½äºº") |
| | | private String afterMaintenanceOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("5 ç»´ä¿®å æ¥æ") |
| | | private LocalDateTime afterMaintenanceDate; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ApiModelProperty("æäº¤äºº") |
| | | private String submitPerson; |
| | | |
| | | @ApiModelProperty("å½å责任人") |
| | | private String currentResponsible; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ
鿥æ") |
| | | private LocalDate faultDate; |
| | | |
| | | @ApiModelProperty("è¦æ±ä¿®å¤æ¥æ") |
| | | private LocalDate requestRepairDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ç¹æ£è®°å½ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_inspection_record") |
| | | @ApiModel(value = "DeviceInspectionRecord对象", description = "") |
| | | public class DeviceInspectionRecord implements Serializable { |
| | | |
| | | @ApiModelProperty("设å¤ç¹æ£è®°å½id") |
| | | @TableId(value = "inspection_record_id", type = IdType.AUTO) |
| | | private Integer inspectionRecordId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("æµéèå´") |
| | | private String measurementScope; |
| | | |
| | | @ApiModelProperty("ç¹æ£ä½¿ç¨ç©è´¨åç§°") |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty("ç¹æ£ä½¿ç¨ç©è´¨è§æ ¼åå·") |
| | | private String materialModel; |
| | | |
| | | @ApiModelProperty("ç¹æ£ä½¿ç¨ç©è´¨ç®¡çç¼å·") |
| | | private String materialManagementNumber; |
| | | |
| | | @ApiModelProperty("ç¹æ£ä½¿ç¨ç©è´¨ç²¾åº¦ç级") |
| | | private String materialAccuracyGrade; |
| | | |
| | | @ApiModelProperty("温度") |
| | | private String temperature; |
| | | |
| | | @ApiModelProperty("湿度") |
| | | private String humidity; |
| | | |
| | | @ApiModelProperty("æµè¯ç»è®º") |
| | | private String testConclusion; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("ç¶æï¼æ¯å¦å¤æ ¸ï¼0æªå¤æ ¸ï¼1夿 ¸") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("æµè¯äºº") |
| | | private String recorder; |
| | | |
| | | @ApiModelProperty("æµè¯äººid") |
| | | private Integer recorderId; |
| | | |
| | | @ApiModelProperty("夿 ¸äºº") |
| | | private String reviewer; |
| | | |
| | | @ApiModelProperty("夿 ¸äººid") |
| | | private Integer reviewerId; |
| | | |
| | | @ApiModelProperty("夿 ¸ä¿¡æ¯") |
| | | private String reviewerRemark; |
| | | |
| | | @ApiModelProperty("æµè¯æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime testDate; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | private Integer updateUserId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:27:32 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_inspection_record_details") |
| | | @ApiModel(value = "DeviceInspectionRecordDetails对象", description = "") |
| | | public class DeviceInspectionRecordDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("ç¹æ£è¯¦æ
id") |
| | | @TableId(value = "inspection_record_detail_id", type = IdType.AUTO) |
| | | private Integer inspectionRecordDetailId; |
| | | |
| | | @ApiModelProperty("ç¹æ£id") |
| | | private Integer inspectionRecordId; |
| | | |
| | | @ApiModelProperty("æµè¯é¡¹ç®") |
| | | private String testItems; |
| | | |
| | | @ApiModelProperty("æ åå¼") |
| | | private String standardValue; |
| | | |
| | | @ApiModelProperty("宿µå¼") |
| | | private String measuredValue; |
| | | |
| | | @ApiModelProperty("示å¼è¯¯å·®") |
| | | private String indicationError; |
| | | |
| | | @ApiModelProperty("å
许误差") |
| | | private String allowableError; |
| | | |
| | | @ApiModelProperty("å项ç»è®º") |
| | | private String singleItemConclusion; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | private Integer updateUserId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("device_leases") |
| | | public class DeviceLease implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId |
| | | private Integer leaseId; |
| | | |
| | | private String processNumber; |
| | | |
| | | private String deviceName; |
| | | |
| | | private String managementNumber; |
| | | |
| | | private String borrower; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDate borrowDate; |
| | | |
| | | private String borrowStatus; |
| | | |
| | | private String submitter; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime submissionDate; |
| | | |
| | | private String currentStatus; |
| | | |
| | | private String currentResponsible; |
| | | |
| | | private int deviceId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("device_log") // è®°å½ |
| | | public class DeviceLog implements Serializable { |
| | | |
| | | @TableId(type= IdType.AUTO) |
| | | private Integer id; |
| | | private String operator; |
| | | // @JsonFormat() |
| | | private LocalDateTime operationTime; |
| | | private String operationType; |
| | | private String operationContent; |
| | | private Integer deviceId; |
| | | |
| | | //å
³èç表å |
| | | private String relevanceForm; |
| | | |
| | | //å
³èçid |
| | | private Integer relevanceId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | //@Accessors(chain = true) |
| | | @TableName("device_maintenance") |
| | | public class DeviceMaintenance { |
| | | // @TableId(value = "id", type = IdType.AUTO) |
| | | private static final long serialVersionUID = 1L; |
| | | //设å¤id |
| | | @TableId(type=IdType.AUTO) |
| | | private Integer id; |
| | | private Integer deviceId; |
| | | |
| | | private String deviceName; |
| | | //ç¼å· |
| | | private String deviceNumber; |
| | | //ç»ä¸ç¼å· |
| | | private String managementNumber; |
| | | //ç»´æ¤å
容 |
| | | private String content; |
| | | //ç»´æ¤æ¥æ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate date; |
| | | //䏿¬¡ç»´æ¤æ¥æ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate nextDate; |
| | | //ç»´æ¤ç±»å |
| | | private Integer maintenanceType; |
| | | //ç»´æ¤äººå |
| | | private String name; |
| | | //夿³¨ |
| | | private String comments; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_maintenance_plan") |
| | | @ApiModel(value = "DeviceMaintenancePlan对象", description = "设å¤ä¿å
»è®¡å表") |
| | | public class DeviceMaintenancePlan implements Serializable { |
| | | |
| | | @ApiModelProperty("设å¤ä¿å
»è®¡åid") |
| | | @TableId(value = "maintenance_plan_id", type = IdType.AUTO) |
| | | private Integer maintenancePlanId; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String compiler; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planName; |
| | | |
| | | @ApiModelProperty("计å年份") |
| | | private String planYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer compilerId; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private LocalDateTime datePreparation; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æï¼0æªå®¡æ ¸ï¼1å®¡æ ¸") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer auditId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | private String audit; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private LocalDateTime auditDate; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¿¡æ¯") |
| | | private String auditRemark; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:11:46 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_maintenance_plan_details") |
| | | @ApiModel(value = "DeviceMaintenancePlanDetails对象", description = "设å¤ä¿å
»è®¡å详æ
表") |
| | | public class DeviceMaintenancePlanDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("ä¿å
»è®¡å详æ
id") |
| | | @TableId(value = "maintenance_plan_detail_id", type = IdType.AUTO) |
| | | private Integer maintenancePlanDetailId; |
| | | |
| | | @ApiModelProperty("ä¿å
»è®¡åid") |
| | | private Integer maintenancePlanId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("ä¿å
Ȍ
³é®é¨ä½") |
| | | private String maintenanceSite; |
| | | |
| | | @ApiModelProperty("ä¿å
Ȍ
容") |
| | | private String maintenanceContent; |
| | | |
| | | @ApiModelProperty("ä¿å
»å¨æ") |
| | | private String maintenanceIntervals; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("device_metrics") |
| | | public class DeviceMetric implements Serializable { |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; //id |
| | | private Integer deviceId; // 设å¤ID |
| | | private String measurementParameter; // 计éåæ° |
| | | private String rangeOfMeasurement; // éç¨èå´ |
| | | private String maxPermissibleError; // æå¤§å
许误差 |
| | | private String judgmentCriteria; // å¤å®æ å |
| | | private String createdBy; // å建人 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime creationTime; // å建æ¶é´ |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; // ç±»å |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_metric_record") |
| | | @ApiModel(value = "DeviceMetricRecord对象", description = "è®¾å¤æ ¡å - æ ¡åè®°å½") |
| | | public class DeviceMetricRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è®°å½ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | private String unitOfMeasure; |
| | | |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | private Date calibrationDate; |
| | | |
| | | @ApiModelProperty("䏿¬¡æ ¡åæ¥æ") |
| | | private Date nextCalibrationDate; |
| | | |
| | | @ApiModelProperty("计ç®å¨å
·") |
| | | private String calculatingApparatus; |
| | | |
| | | @ApiModelProperty("è®¡ç®æ åéç¨") |
| | | private String standardRange; |
| | | |
| | | @ApiModelProperty("è®¡éæ åä¸ç¡®å®åº¦") |
| | | private String calibrationStandardUncertainty; |
| | | |
| | | @ApiModelProperty("便®æä»¶") |
| | | private String byDocument; |
| | | |
| | | @ApiModelProperty("è¯ä¹¦ç¼å·") |
| | | private String certificateSerialNumber; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("åæä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææä»¶åç§°") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å建æ¶é´ / ç»è®°æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ç»è®°äºº") |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("确认æ¶é´") |
| | | private Date confirmDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_metrics_copy") |
| | | @ApiModel(value = "DeviceMetricsCopy对象", description = "è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç®") |
| | | public class DeviceMetricsCopy implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è®¾å¤æ ¡å - æ ¡åè®°å½id") |
| | | private Integer deviceMetricsId; |
| | | |
| | | @ApiModelProperty("计éåæ°") |
| | | private String measurementParameter; |
| | | |
| | | @ApiModelProperty("éç¨èå´") |
| | | private String rangeOfMeasurement; |
| | | |
| | | @ApiModelProperty("æå¤§å
许误差") |
| | | private String maxPermissibleError; |
| | | |
| | | @ApiModelProperty("å¤å®æ å") |
| | | private String judgmentCriteria; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | private String createdBy; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | private LocalDateTime creationTime; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ ¡å") |
| | | private String isCalibration; |
| | | |
| | | @ApiModelProperty("å¤å®ç»æ") |
| | | private String result; |
| | | |
| | | @ApiModelProperty("åé¡¹ç»æè¯´æ") |
| | | private String singleResultStatement; |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_record") |
| | | @ApiModel(value = "DeviceRecord对象", description = "cnas设å¤ä½¿ç¨è®°å½è¡¨") |
| | | public class DeviceRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("订åid") |
| | | private Integer insOrderId; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("温度") |
| | | private String temperature; |
| | | |
| | | @ApiModelProperty("湿度") |
| | | private String humidity; |
| | | |
| | | @ApiModelProperty("使ç¨å0å¼å¸¸1è¯å¥½") |
| | | private Integer useBefore; |
| | | |
| | | @ApiModelProperty("使ç¨å0å¼å¸¸1è¯å¥½") |
| | | private Integer useAfter; |
| | | |
| | | @ApiModelProperty("å¼å¸¸æ
åµ") |
| | | private String abnormal; |
| | | |
| | | @ApiModelProperty("使ç¨äººid") |
| | | private Integer usePersonId; |
| | | |
| | | @ApiModelProperty("使ç¨äºº") |
| | | private String usePerson; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("使ç¨å¼å§æ¥æ") |
| | | private LocalDateTime useStartDate; |
| | | |
| | | @ApiModelProperty("使ç¨ç»ææ¥æ") |
| | | private LocalDateTime useEndDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_scrapped") |
| | | @ApiModel(value = "DeviceScrapped对象", description = "è®¾å¤æ¥åºç³è¯·è¡¨") |
| | | public class DeviceScrapped { |
| | | |
| | | @TableId(value = "scrapped_id", type = IdType.AUTO) |
| | | private Integer scrappedId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("é
ä»¶") |
| | | private String parts; |
| | | |
| | | @ApiModelProperty("æ¥åºçç±") |
| | | private String reasonsForScrap; |
| | | |
| | | @ApiModelProperty("ç³è¯·äººid") |
| | | private Integer applicantUserId; |
| | | |
| | | @ApiModelProperty("ç³è¯·äºº") |
| | | private String applicantUser; |
| | | |
| | | @ApiModelProperty("ç³è¯·æ¶é´") |
| | | private LocalDate applicantDate; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººæè§") |
| | | private String departmentHeadOpinion; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººid") |
| | | private Integer departmentHeadUserId; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äºº") |
| | | private String departmentHeadUser; |
| | | |
| | | @ApiModelProperty("é¨é¨è´è´£äººå¡«åæ¶é´") |
| | | private LocalDate departmentHeadDate; |
| | | |
| | | @ApiModelProperty("计é室æè§") |
| | | private String meteringRoomOpinion; |
| | | |
| | | @ApiModelProperty("计é室人id") |
| | | private Integer meteringRoomUserId; |
| | | |
| | | @ApiModelProperty("计é室人") |
| | | private String meteringRoomUser; |
| | | |
| | | @ApiModelProperty("计éå®¤äººå¡«åæ¶é´") |
| | | private LocalDate meteringRoomDate; |
| | | |
| | | @ApiModelProperty("æ¹å人æè§") |
| | | private String approverOpinion; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer approverUserId; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String approverUser; |
| | | |
| | | @ApiModelProperty("æ¹åäººå¡«åæ¶é´") |
| | | private LocalDate approverDate; |
| | | |
| | | @ApiModelProperty("æ¯å¦ç»æ,0: æªç»æ, 1:ç»æ") |
| | | private Integer isFinish; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(exist = false,select = false) |
| | | @ApiModelProperty("æµç¨, 0:æ¥åºç³è¯·, 1ç³è¯·é¨é¨è´è´£äººæè§, 2:计é室æè§, 3:æ¹å人") |
| | | private Integer flowType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_state") |
| | | @ApiModel(value = "DeviceState对象", description = "设å¤åç¨/å¯ç¨") |
| | | public class DeviceState implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("设å¤åç¨å¯ç¨id") |
| | | @TableId(value = "state_id", type = IdType.AUTO) |
| | | private Integer stateId; |
| | | |
| | | @ApiModelProperty("æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("0é
ä»¶") |
| | | private String accessoryPart; |
| | | |
| | | @ApiModelProperty("0设å¤ç¶æ") |
| | | private String deviceStatus; |
| | | |
| | | @ApiModelProperty("0åç¨å¯ç¨çç±") |
| | | private String reason; |
| | | |
| | | @ApiModelProperty("0ä¸ç¯è责任人") |
| | | private String submitNextPesponsible; |
| | | |
| | | @ApiModelProperty("0æä½äºº") |
| | | private String submitOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("0æ¥æ") |
| | | private LocalDateTime submitDate; |
| | | |
| | | @ApiModelProperty("1é¨é¨è´è´£äººæè§") |
| | | private String departmentReviewOpinion; |
| | | |
| | | @ApiModelProperty("1ä¸ç¯è责任人") |
| | | private String departmentNextPesponsible; |
| | | |
| | | @ApiModelProperty("1æä½äºº") |
| | | private String departmentOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("1æ¥æ") |
| | | private LocalDateTime departmentDate; |
| | | |
| | | @ApiModelProperty("2计é室æè§") |
| | | private String measuringRoomReviewOpinion; |
| | | |
| | | @ApiModelProperty("2ä¸ç¯è责任人") |
| | | private String measuringRoomNextPesponsible; |
| | | |
| | | @ApiModelProperty("2æä½äºº") |
| | | private String measuringRoomOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("2æ¥æ") |
| | | private LocalDateTime measuringRoomDate; |
| | | |
| | | @ApiModelProperty("3æ¹åæè§") |
| | | private String approvalOpinion; |
| | | |
| | | @ApiModelProperty("3ä¸ç¯è责任人") |
| | | private String approvalNextPesponsible; |
| | | |
| | | @ApiModelProperty("3æä½äºº") |
| | | private String approvalOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("3æ¥æ") |
| | | private LocalDateTime approvalDate; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ApiModelProperty("设å¤Id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å½åç¯èè´è´£äºº") |
| | | private String currentResponsible; |
| | | |
| | | @ApiModelProperty("æäº¤äºº") |
| | | @ExcelProperty(value = "æäº¤äºº") |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("æäº¤æ¥æ") |
| | | @ExcelProperty(value = "æäº¤æ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_traceability_management") |
| | | @ApiModel(value = "DeviceTraceabilityManagement对象", description = "设å¤é弿º¯æºè®¡å表") |
| | | public class DeviceTraceabilityManagement { |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡åid") |
| | | @TableId(value = "traceability_management_id", type = IdType.AUTO) |
| | | private Integer traceabilityManagementId; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("计ååç§°") |
| | | private String planName; |
| | | |
| | | @ApiModelProperty("计å年份") |
| | | private String planYear; |
| | | |
| | | @ApiModelProperty("ç¼å¶äººid") |
| | | private Integer compilerId; |
| | | |
| | | @ApiModelProperty("ç¼å¶äºº") |
| | | private String compiler; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¶é´") |
| | | private LocalDateTime datePreparation; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ç¶æï¼0æªå®¡æ ¸ï¼1å®¡æ ¸") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äººid") |
| | | private Integer auditId; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸äºº") |
| | | private String audit; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸æ¥æ") |
| | | private LocalDateTime auditDate; |
| | | |
| | | @ApiModelProperty("å®¡æ ¸ä¿¡æ¯") |
| | | private String auditRemark; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:58 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_traceability_management_details") |
| | | @ApiModel(value = "DeviceTraceabilityManagementDetails对象", description = "设å¤é弿º¯æºè®¡å详æ
表") |
| | | public class DeviceTraceabilityManagementDetails implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡å详æ
id") |
| | | @TableId(value = "traceability_management_detail_id", type = IdType.AUTO) |
| | | private Integer traceabilityManagementDetailId; |
| | | |
| | | @ApiModelProperty("设å¤é弿º¯æºè®¡åid") |
| | | private Integer traceabilityManagementId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("ææ¯ææ åæ°") |
| | | private String technicalIndexParameters; |
| | | |
| | | @ApiModelProperty("ææ¯ææ è¦æ±") |
| | | private String technicalRequirements; |
| | | |
| | | @ApiModelProperty("æ£å®å¨æ") |
| | | private String verificationCycle; |
| | | |
| | | @ApiModelProperty("æ£å®åä½") |
| | | private String verificationUnit; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("åå»ºæ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | |
| | | @Data |
| | | @TableName(value = "device_documents") |
| | | public class Document implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主é®ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * ææ¡£ç±»åï¼æä¸¾ï¼ |
| | | */ |
| | | private String documentType; |
| | | |
| | | /** |
| | | * åç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * çæ¬å· |
| | | */ |
| | | private String version; |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | private Integer quantity; |
| | | |
| | | /** |
| | | * é¡µæ° |
| | | */ |
| | | private Integer pageCount; |
| | | |
| | | /** |
| | | * æä¾å |
| | | */ |
| | | private String provider; |
| | | |
| | | /** |
| | | * æä¾æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime provideDate; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String comments; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime createdAt; |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updatedAt; |
| | | |
| | | private int deviceId; |
| | | |
| | | @ApiModelProperty("èµäº§ç¼å·") |
| | | private String number; |
| | | |
| | | @ApiModelProperty("åå§æä»¶åç§°") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-éªæ¶æ ¸æ¥ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:19 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_incident_acceptance_check") |
| | | @ApiModel(value = "IncidentAcceptanceCheck对象", description = "设å¤éªæ¶-éªæ¶æ ¸æ¥") |
| | | public class IncidentAcceptanceCheck implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer acceptanceCheckId; |
| | | |
| | | @ApiModelProperty("ä»ªå¨æ¨¡å") |
| | | private String instrumentModule; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥åæ°") |
| | | private String verificationParameter; |
| | | |
| | | @ApiModelProperty("坿¥æ¶é") |
| | | private String acceptableLimit; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥ç»æ") |
| | | private String verificationResult; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥ç»è®º") |
| | | private String verificationConclusion; |
| | | |
| | | @ApiModelProperty("设å¤éªæ¶ID") |
| | | private Integer incidentId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-æä»¶ç±»ç¡®è®¤ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:36 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_incident_file") |
| | | @ApiModel(value = "IncidentFile对象", description = "设å¤éªæ¶-æä»¶ç±»ç¡®è®¤") |
| | | public class IncidentFile implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer fileId; |
| | | |
| | | @ApiModelProperty("åºæåæ°") |
| | | private Integer expectedCopies; |
| | | |
| | | @ApiModelProperty("å®é
æ¶å°åæ°") |
| | | private Integer actualCopies; |
| | | |
| | | @ApiModelProperty("设å¤éªæ¶id") |
| | | private Integer incidentId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-å®è£
éªæ¶æ£æ¥ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:50 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_incident_install") |
| | | @ApiModel(value = "IncidentInstall对象", description = "设å¤éªæ¶-å®è£
éªæ¶æ£æ¥") |
| | | public class IncidentInstall implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer installId; |
| | | |
| | | @ApiModelProperty("项ç®") |
| | | private String installationProject; |
| | | |
| | | @ApiModelProperty("å®è£
æ
åµ") |
| | | private String installationSituation; |
| | | |
| | | @ApiModelProperty("å®è£
宿") |
| | | private String installationCompleted; |
| | | |
| | | @ApiModelProperty("设å¤éªæ¶") |
| | | private Integer incidentId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶æ·»å éªæ¶å段表 |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 03:54:49 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_incident_report") |
| | | @ApiModel(value = "IncidentReport对象", description = "设å¤éªæ¶æ·»å éªæ¶å段表") |
| | | public class IncidentReport implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ExcelProperty(value = "æµç¨ç¼å·") |
| | | @ApiModelProperty("æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("åºåå·") |
| | | private String serialNumber; |
| | | |
| | | @ApiModelProperty("设å¤ç±»å«") |
| | | private String deviceClass; |
| | | |
| | | @ApiModelProperty("å¼ç®±åæ£æ¥å¤å
è£
ææ ç ´æ") |
| | | private String checkOuterPackaging; |
| | | |
| | | @ApiModelProperty("åæä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææä»¶åç§°") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("设å¤å¼ç®±éªæ¶ç»è®º") |
| | | private String unpackingAcceptanceConclusion; |
| | | |
| | | @ApiModelProperty("1æäº¤ ä¸ç¯èè´è´£äººåç§°") |
| | | private String submitNextPesponsible; |
| | | |
| | | @ApiModelProperty("1æäº¤ æäº¤å¤æ³¨") |
| | | private String submitRemarks; |
| | | |
| | | @ApiModelProperty("1æäº¤ æäº¤æä½äºº") |
| | | private String submitOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("1æäº¤ æäº¤æ¥æ") |
| | | private LocalDateTime submitDate; |
| | | |
| | | @ApiModelProperty("2å¼ç®±éªæ¶å¤æ ¸ 夿 ¸æè§") |
| | | private String unpackingReviewOpinion; |
| | | |
| | | @ApiModelProperty("2å¼ç®±éªæ¶å¤æ ¸ ä¸ç¯èè´è´£äºº") |
| | | private String unpackingNextPesponsible; |
| | | |
| | | @ApiModelProperty("2å¼ç®±éªæ¶å¤æ ¸ æä½äºº") |
| | | private String unpackingOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("2å¼ç®±éªæ¶å¤æ ¸ æ¥æ") |
| | | private LocalDateTime unpackingDate; |
| | | |
| | | @ApiModelProperty("3å®è£
ä½ç½®") |
| | | private String installLocation; |
| | | |
| | | @ApiModelProperty("3å®è£
夿³¨") |
| | | private String installRemarks; |
| | | |
| | | @ApiModelProperty("3å®è£
ä¸ç¯èè´è´£äºº") |
| | | private String installNextPesponsible; |
| | | |
| | | @ApiModelProperty("3å®è£
æä½äºº") |
| | | private String installOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("3å®è£
æ¥æ") |
| | | private LocalDateTime installDate; |
| | | |
| | | @ApiModelProperty("4å®è£
éªæ¶å¤æ ¸æè§") |
| | | private String installationAcceptanceCompoundOpinion; |
| | | |
| | | @ApiModelProperty("4å®è£
éªæ¶ä¸ç¯èè´è´£äºº") |
| | | private String installationAcceptanceNextPesponsible; |
| | | |
| | | @ApiModelProperty("4å®è£
éªæ¶æä½äºº") |
| | | private String installationAcceptanceOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("4å®è£
éªæ¶æ¥æ") |
| | | private LocalDateTime installationAcceptanceDate; |
| | | |
| | | @ApiModelProperty("5éªæ¶æ ¸æ¥ 设å¤å¼ç®±éªæ¶ç»è®º") |
| | | private String acceptanceCheckUnpackingConclusion; |
| | | |
| | | @ApiModelProperty("5éªæ¶æ ¸æ¥ ä¸ç¯èè´è´£äºº") |
| | | private String acceptanceCheckNextPesponsible; |
| | | |
| | | @ApiModelProperty("5éªæ¶æ ¸æ¥ æä½äºº") |
| | | private String acceptanceCheckOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("5éªæ¶æ ¸æ¥ æ¥æ") |
| | | private LocalDateTime acceptanceCheckDate; |
| | | |
| | | @ApiModelProperty("6éªæ¶æ ¸æ¥å®¡æ ¸ å®¡æ ¸æè§") |
| | | private String acceptanceAuditAuditOpinion; |
| | | |
| | | @ApiModelProperty("6éªæ¶æ ¸æ¥å®¡æ ¸ æä½äºº") |
| | | private String acceptanceAuditOperatingPersonnel; |
| | | |
| | | @ApiModelProperty("6éªæ¶æ ¸æ¥å®¡æ ¸ æ¥æ") |
| | | private LocalDateTime acceptanceAuditDate; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | private String currentState; |
| | | |
| | | @ApiModelProperty(value = "åå»ºæ¥æ / æäº¤æ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å½åè´è´£äºº") |
| | | private String currentResponsible; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-å¤ä»¶ç¡®è®¤ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:42:06 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_incident_spare_parts") |
| | | @ApiModel(value = "IncidentSpareParts对象", description = "设å¤éªæ¶-å¤ä»¶ç¡®è®¤") |
| | | public class IncidentSpareParts implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer sparePartsId; |
| | | |
| | | @ApiModelProperty("åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("æ°é") |
| | | private Integer number; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String note; |
| | | |
| | | @ApiModelProperty("设å¤éªæ¶ID") |
| | | private Integer incidentId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_instruction") |
| | | @ApiModel(value = "Instruction对象", description = "ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨") |
| | | public class Instruction implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç³è¯·ç¼å·") |
| | | private String applicationNumber; |
| | | |
| | | @ApiModelProperty("ç³è¯·é¨é¨") |
| | | private String applicationDepartment; |
| | | |
| | | @ApiModelProperty("责任人") |
| | | private String personLiable; |
| | | |
| | | @ApiModelProperty("åæ§ç³è¯·è¯´æ") |
| | | private String controlledApplicationDescription; |
| | | |
| | | @ApiModelProperty("ç³»ç»çæåç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çæåç§°") |
| | | private String fileSystemName; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:43:32 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_operation_instruction") |
| | | @ApiModel(value = "OperationInstruction对象", description = "è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å") |
| | | public class OperationInstruction { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("设å¤ä¸»é®id") |
| | | private String deviceId; |
| | | |
| | | @ApiModelProperty("æä»¶ç±»å") |
| | | private String documentType; |
| | | |
| | | @ApiModelProperty("ææ¡£ç¼å·") |
| | | private String documentNumber; |
| | | |
| | | @ApiModelProperty("æä»¶çæ¬") |
| | | private String documentVersion; |
| | | |
| | | @ApiModelProperty("ä½è
") |
| | | private String author; |
| | | |
| | | @ApiModelProperty("æäº¤æ¥æ") |
| | | private LocalDate submitDate; |
| | | |
| | | @ApiModelProperty("ææ¡£è¯´æ") |
| | | private String documentNote; |
| | | |
| | | @ApiModelProperty("ç³»ç»çæåç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çæåç§°") |
| | | private String fileSystemName; |
| | | |
| | | @ApiModelProperty("ä½ä¸æå¯¼ä¹¦id") |
| | | private Integer instructionId; |
| | | |
| | | @ApiModelProperty("ä¸ä¼ 人id") |
| | | private Integer uploader; |
| | | |
| | | @ApiModelProperty("审æ¹äººid") |
| | | private Integer approverId; |
| | | |
| | | @ApiModelProperty("审æ¹ç¶æ") |
| | | private Boolean status; |
| | | |
| | | @ApiModelProperty("çææ¶é´") |
| | | private LocalDateTime entryIntoForceTime; |
| | | |
| | | @ApiModelProperty("ä¸ä¼ æ¶é´") |
| | | private LocalDateTime uploadTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°äººid") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * èµæºé¢å®æ°å»ºé¢å®è¡¨ |
| | | * </p> |
| | | * |
| | | * @author baomidou |
| | | * @since 2024-09-14 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_reservation") |
| | | public class Reservation implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设å¤id |
| | | */ |
| | | private Integer deviceId; |
| | | |
| | | /** |
| | | * é¢å®è®¾å¤ |
| | | */ |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | private String customerName; |
| | | |
| | | /** |
| | | * é¢å®æ¶é´ |
| | | */ |
| | | |
| | | private String reservationTime; |
| | | |
| | | /** |
| | | * å
·ä½æ¶é´ |
| | | */ |
| | | private String specificTime; |
| | | |
| | | |
| | | |
| | | /** |
| | | * è系人 |
| | | */ |
| | | private String linkPerson; |
| | | |
| | | /** |
| | | * èç³»çµè¯ |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * æµç¨ç¼å· |
| | | */ |
| | | private String deviceNumber; |
| | | |
| | | /** |
| | | * é¢å®è¯´æ |
| | | */ |
| | | private String reservationSpecification; |
| | | |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime createDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptanceFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤)é件表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:26 |
| | | */ |
| | | public interface DeviceAcceptanceFileService extends IService<DeviceAcceptanceFile> { |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptance; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | public interface DeviceAcceptanceService extends IService<DeviceAcceptance> { |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å表 |
| | | * @param page |
| | | * @param deviceAcceptance |
| | | * @return |
| | | */ |
| | | IPage<DeviceAcceptance> pageDeviceAcceptance(Page page, DeviceAcceptance deviceAcceptance); |
| | | |
| | | |
| | | boolean uploadDeviceAcceptanceFile(Integer acceptanceId, MultipartFile file); |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å¯¼åº |
| | | * @param acceptanceId 设å¤éªæ¶id |
| | | * @param response ååºä½ |
| | | * @return |
| | | */ |
| | | void exportDeviceAcceptance(Integer acceptanceId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceAccidentReport; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | public interface DeviceAccidentReportService extends IService<DeviceAccidentReport> { |
| | | |
| | | /** |
| | | * 设å¤äºæ
æ¥åå表 |
| | | * @param page |
| | | * @param deviceAccidentReport |
| | | * @return |
| | | */ |
| | | IPage<DeviceAccidentReport> pageDeviceAccidentReport(Page page, DeviceAccidentReport deviceAccidentReport); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äºæ
æ¥å |
| | | * @param deviceAccidentReport |
| | | * @return |
| | | */ |
| | | boolean addDeviceAccidentReport(DeviceAccidentReport deviceAccidentReport); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤äºæ
æ¥å |
| | | * @param accidentReportId 设å¤äºæ
æ¥åid |
| | | * @param response ååº |
| | | */ |
| | | void exportDeviceAccidentReport(Integer accidentReportId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceBorrow; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | public interface DeviceBorrowService extends IService<DeviceBorrow> { |
| | | |
| | | Map<String,Object> deviceBorrowPage(Page page, DeviceBorrow deviceBorrow); |
| | | |
| | | int saveDeviceBorrow(DeviceBorrow deviceBorrow); |
| | | |
| | | DeviceBorrow getDeviceBorrow(Integer id); |
| | | |
| | | List<DeviceBorrow> getDeviceBorrowBydeviceId(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceBreakdownMaintenance; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | public interface DeviceBreakdownMaintenanceService extends IService<DeviceBreakdownMaintenance> { |
| | | |
| | | /** |
| | | * è®¾å¤æ
éç»´ä¿®å表 |
| | | * @param page |
| | | * @param deviceBreakdownMaintenance |
| | | * @return |
| | | */ |
| | | IPage<DeviceBreakdownMaintenance> pageDeviceBreakdownMaintenance(Page page, DeviceBreakdownMaintenance deviceBreakdownMaintenance); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ
éç»´ä¿® |
| | | * @param deviceBreakdownMaintenance |
| | | * @return |
| | | */ |
| | | boolean addDeviceBreakdownMaintenance(DeviceBreakdownMaintenance deviceBreakdownMaintenance); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ
éç»´ä¿® |
| | | * @param maintenanceId è®¾å¤æ
éç»´ä¿®id |
| | | * @param response ååº |
| | | */ |
| | | void exportDeviceBreakdownMaintenance(Integer maintenanceId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:29 |
| | | */ |
| | | public interface DeviceCalibrationPlanDetailService extends IService<DeviceCalibrationPlanDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceCalibrationPlanDto; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlan; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | public interface DeviceCalibrationPlanService extends IService<DeviceCalibrationPlan> { |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¡å计å |
| | | * @param calibrationPlanDto |
| | | * @return |
| | | */ |
| | | boolean addDeviceCalibrationPlan(DeviceCalibrationPlanDto calibrationPlanDto); |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¡å计å |
| | | * @param file |
| | | * @return |
| | | */ |
| | | boolean importDeviceCalibrationPlan(MultipartFile file, String planYear); |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡åè®¡åæ¹å |
| | | * @param DeviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | boolean ratifyDeviceCalibrationPlan(DeviceCalibrationPlan DeviceCalibrationPlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå表 |
| | | * @param page |
| | | * @param DeviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | IPage<DeviceCalibrationPlanDto> pageDeviceCalibrationPlan(Page page, DeviceCalibrationPlan DeviceCalibrationPlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计å详æ
å表 |
| | | * @param page |
| | | * @param DeviceCalibrationPlanDetails |
| | | * @return |
| | | */ |
| | | IPage<DeviceCalibrationPlanDetail> pageDeviceCalibrationPlanDetail(Page page, DeviceCalibrationPlanDetail DeviceCalibrationPlanDetails); |
| | | |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¡å计å |
| | | * |
| | | * @param DeviceCalibrationPlanId |
| | | * @param response |
| | | */ |
| | | void exportDeviceCalibrationPlanDetail(Integer DeviceCalibrationPlanId, HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceCheck; |
| | | |
| | | public interface DeviceCheckService extends IService<DeviceCheck> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:16 |
| | | */ |
| | | public interface DeviceExaminePlanDetailsService extends IService<DeviceExaminePlanDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceExaminePlanDto; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlan; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | public interface DeviceExaminePlanService extends IService<DeviceExaminePlan> { |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¸æ¥è®¡å |
| | | * @param examinePlanDto |
| | | * @return |
| | | */ |
| | | boolean addDeviceExaminePlan(DeviceExaminePlanDto examinePlanDto); |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¸æ¥è®¡å |
| | | * @param file |
| | | * @return |
| | | */ |
| | | boolean importDeviceExaminePlan(MultipartFile file); |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åæ¹å |
| | | * @param DeviceExaminePlan |
| | | * @return |
| | | */ |
| | | boolean ratifyDeviceExaminePlan(DeviceExaminePlan DeviceExaminePlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå表 |
| | | * @param page |
| | | * @param DeviceExaminePlan |
| | | * @return |
| | | */ |
| | | IPage<DeviceExaminePlanDto> pageDeviceExaminePlan(Page page, DeviceExaminePlan DeviceExaminePlan); |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
å表 |
| | | * @param page |
| | | * @param DeviceExaminePlanDetails |
| | | * @return |
| | | */ |
| | | IPage<DeviceExaminePlanDetails> pageDeviceExaminePlanDetail(Page page, DeviceExaminePlanDetails DeviceExaminePlanDetails); |
| | | |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¸æ¥è®¡å |
| | | * @param deviceExaminePlanId è®¾å¤æ ¸æ¥è®¡åid |
| | | * @param response ååº |
| | | */ |
| | | void exportDeviceExaminePlanDetail(Integer deviceExaminePlanId, HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrastDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:57 |
| | | */ |
| | | public interface DeviceExamineRecordContrastDetailsService extends IService<DeviceExamineRecordContrastDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordContrastDto; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrast; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:43 |
| | | */ |
| | | public interface DeviceExamineRecordContrastService extends IService<DeviceExamineRecordContrast> { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordContrastDto getExamineRecordContrast(Integer planDetailsId); |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | * |
| | | */ |
| | | boolean addExamineRecordContrast(DeviceExamineRecordContrastDto deviceExamineRecordContrastDto); |
| | | |
| | | /** |
| | | * å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | boolean reviewExamineRecordContrast(DeviceExamineRecordContrastDto deviceExamineRecordContrastDto); |
| | | |
| | | /** |
| | | * 导åºå®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * |
| | | * @param recordId å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½id |
| | | * @param response |
| | | * @return |
| | | */ |
| | | void exportReviewExamineRecordContrast(Integer recordId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:15:11 |
| | | */ |
| | | public interface DeviceExamineRecordDetailService extends IService<DeviceExamineRecordDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordDto; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecord; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:28 |
| | | */ |
| | | public interface DeviceExamineRecordService extends IService<DeviceExamineRecord> { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | DeviceExamineRecordDto getExamineRecord(Integer planDetailsId); |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | boolean addExamineRecord(DeviceExamineRecordDto deviceExamineRecordDto); |
| | | |
| | | /** |
| | | * 夿 ¸æ ¸æ¥è®°å½ |
| | | * @return |
| | | */ |
| | | boolean reviewExamineRecord(DeviceExamineRecordDto deviceExamineRecordDto); |
| | | |
| | | /** |
| | | * 导åºå¤æ ¸æ ¸æ¥è®°å½ |
| | | * @param planDetailsId |
| | | * @param response ååº |
| | | */ |
| | | void exportReviewExamineRecordDetail(Integer planDetailsId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceExternalApply; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | public interface DeviceExternalApplyService extends IService<DeviceExternalApply> { |
| | | |
| | | /** |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·å表 |
| | | * @param page |
| | | * @param deviceExternalApply |
| | | * @return |
| | | */ |
| | | IPage<DeviceExternalApply> pageDeviceExternalApply(Page page, DeviceExternalApply deviceExternalApply); |
| | | |
| | | /** |
| | | * æ°å¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @param deviceExternalApply |
| | | * @return |
| | | */ |
| | | boolean addDeviceExternalApply(DeviceExternalApply deviceExternalApply); |
| | | |
| | | /** |
| | | * 导åºå©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * |
| | | * @param externalApplyId å¤é¨è®¾å¤ç³è¯·id |
| | | * @param response |
| | | */ |
| | | void exportDeviceExternalApply(Integer externalApplyId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceFaultOneDto; |
| | | import com.yuanchu.mom.pojo.DeviceFaultOne; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 02:03:29 |
| | | */ |
| | | public interface DeviceFaultOneService extends IService<DeviceFaultOne> { |
| | | |
| | | IPage<DeviceFaultOneDto> deviceFaultOnePage(Integer deviceId, Page page, String processNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceFault; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface DeviceFaultService extends IService<DeviceFault> { |
| | | Map<String,Object> findByDeviceId(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecordDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:27:32 |
| | | */ |
| | | public interface DeviceInspectionRecordDetailsService extends IService<DeviceInspectionRecordDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceInspectionRecordDto; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecord; |
| | | import com.yuanchu.mom.vo.Result; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ç¹æ£è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | public interface DeviceInspectionRecordService extends IService<DeviceInspectionRecord> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | * @param page |
| | | */ |
| | | Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(IPage page, DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£è¯¦æ
|
| | | * @param inspectionRecordId |
| | | * @return |
| | | */ |
| | | Result getDeviceInspectionRecord(Integer inspectionRecordId); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | Result addDeviceInspectionRecord(DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ç¹æ£è®°å½ |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | Result updateInspectionRecordAndDetails(DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ç¹æ£è®°å½ |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | Result deleteDeviceInspectionRecordOrDetails(DeviceInspectionRecordDto deviceInspectionRecord); |
| | | |
| | | /** |
| | | * 夿 ¸ç¹æ£è®°å½ |
| | | * @param deviceExamineRecordDto |
| | | * @return |
| | | */ |
| | | Result reviewDeviceInspectionRecord(DeviceInspectionRecordDto deviceExamineRecordDto); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecordId 设å¤ç¹æ£è®°å½id |
| | | * @param response |
| | | */ |
| | | Result exportDeviceInspectionRecord(Integer deviceInspectionRecordId, HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlanDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:11:46 |
| | | */ |
| | | public interface DeviceMaintenancePlanDetailsService extends IService<DeviceMaintenancePlanDetails> { |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceMaintenancePlanDto; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlan; |
| | | import com.yuanchu.mom.vo.Result; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | public interface DeviceMaintenancePlanService extends IService<DeviceMaintenancePlan> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * @param page å½å页 |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | * @return |
| | | */ |
| | | Result<IPage<DeviceMaintenancePlan>> selectDeviceMaintenancePlanByPage(IPage page, DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | Result addMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | Result updateMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | Result deleteMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | * @param response ååº |
| | | */ |
| | | Result exportDeviceMaintenancePlanDto(Integer maintenancePlanId, HttpServletResponse response); |
| | | |
| | | /** |
| | | * æ¥ç设å¤ä¿å
»è®¡å详æ
|
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | * @return |
| | | */ |
| | | Result<DeviceMaintenancePlanDto> getMaintenancePlanDetail(Integer maintenancePlanId); |
| | | |
| | | /** |
| | | * å®¡æ ¸è®¾å¤ä¿å
»è®¡åç¶æ |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | * @return |
| | | */ |
| | | Result reviewMaintenancePlanStatus(DeviceMaintenancePlanDto deviceMaintenancePlanDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.excel.DeviceMaintenanceExport; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenance; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | public interface DeviceMaintenanceService extends IService<DeviceMaintenance> { |
| | | IPage<DeviceMaintenance> getDeviceMaintenancePage(Page page, Integer deviceId, String deviceNumber); |
| | | |
| | | List<DeviceMaintenanceExport> deviceMaintenanceExport(Integer deviceId); |
| | | |
| | | /** |
| | | * 导åºWord设å¤ç»´æ¤è®°å½ |
| | | * |
| | | * @param deviceId |
| | | * @param response |
| | | */ |
| | | void exportMaintenanceRecord(Integer deviceId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceMetricRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | public interface DeviceMetricRecordService extends IService<DeviceMetricRecord> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceMetricsCopy; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | public interface DeviceMetricsCopyService extends IService<DeviceMetricsCopy> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceRecordDto; |
| | | import com.yuanchu.mom.pojo.DeviceRecord; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | public interface DeviceRecordService extends IService<DeviceRecord> { |
| | | |
| | | IPage<DeviceRecordDto> deviceRecordPage(Integer deviceId, Page page, String sampleCode, String managementNumber); |
| | | |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä½¿ç¨è®°å½ |
| | | * |
| | | * @param deviceId |
| | | * @param response |
| | | */ |
| | | void exportUseRecord(Integer deviceId, String exportDate, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceScrapped; |
| | | import com.yuanchu.mom.vo.Result; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | public interface DeviceScrappedService extends IService<DeviceScrapped> { |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * @param page |
| | | * @param deviceScrapped |
| | | * @return |
| | | */ |
| | | IPage<DeviceScrapped> pageDeviceScrapped(Page page, DeviceScrapped deviceScrapped); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ¥åºç³è¯· |
| | | * @param deviceScrapped |
| | | * @return |
| | | */ |
| | | boolean addDeviceScrapped(DeviceScrapped deviceScrapped); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤æ¥åºç³è¯· |
| | | * @param scrappedId è®¾å¤æ¥åºç³è¯·id |
| | | * @return |
| | | */ |
| | | Result exportDeviceScrapped(Integer scrappedId, HttpServletResponse response); |
| | | |
| | | } |
| | |
| | | |
| | | List<User> selectUserList(); |
| | | |
| | | Map<String, Object> selectDeviceParameter(Page page, DeviceDto itemParameter); |
| | | Map<String, Object> selectDeviceParameter(Page page, DeviceDto itemParameter,Boolean laboratoryNameIsNull); |
| | | |
| | | int addDeviceParameter(Device itemParameter); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceStateDto; |
| | | import com.yuanchu.mom.pojo.DeviceState; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | public interface DeviceStateService extends IService<DeviceState> { |
| | | |
| | | IPage<DeviceStateDto> getDeviceStatePage(Integer deviceId, Page page, String processNumber); |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç¶æ |
| | | * |
| | | * @param deviceId |
| | | * @param processNumber |
| | | * @param response |
| | | */ |
| | | void exportDeviceStatus(Integer deviceId, String processNumber, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagementDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:58 |
| | | */ |
| | | public interface DeviceTraceabilityManagementDetailsService extends IService<DeviceTraceabilityManagementDetails> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceTraceabilityManagementDto; |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagement; |
| | | import com.yuanchu.mom.vo.Result; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | public interface DeviceTraceabilityManagementService extends IService<DeviceTraceabilityManagement> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢é弿º¯æºè®¡å |
| | | * @param page å页忰 |
| | | * @param itemParameter é弿º¯æºè®¡å |
| | | * @return |
| | | */ |
| | | Result<IPage<DeviceTraceabilityManagement>> selectDeviceTraceabilityManagementByPage(IPage page, DeviceTraceabilityManagementDto itemParameter); |
| | | |
| | | /** |
| | | * æ°å¢é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | Result addTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * ä¿®æ¹é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | Result updateTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * å é¤é弿º¯æºè®¡å |
| | | * @param deviceTraceabilityManagementDto é弿º¯æºè®¡å |
| | | */ |
| | | Result deleteTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢é弿º¯æºè®¡å详æ
|
| | | */ |
| | | Result<DeviceTraceabilityManagementDto> getTraceabilityManagementDetail(Integer traceabilityManagementId); |
| | | |
| | | /** |
| | | * é弿º¯æºè®¡åå®¡æ ¸ç¶æä¿®æ¹ |
| | | */ |
| | | Result reviewTraceabilityManagementStatus(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto); |
| | | |
| | | /** |
| | | * é弿º¯æºè®¡åå¯¼åº |
| | | */ |
| | | Result exportDeviceTraceabilityManagementDto(Integer traceabilityManagementId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.Document; |
| | | |
| | | public interface DocumentService extends IService<Document> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceLease; |
| | | |
| | | public interface IDeviceLeaseService extends IService<DeviceLease> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceLog; |
| | | |
| | | public interface IDeviceLogService extends IService<DeviceLog> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.DeviceMetric; |
| | | |
| | | public interface IDeviceMetricService extends IService<DeviceMetric> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.IncidentAcceptanceCheck; |
| | | |
| | | public interface IncidentAcceptanceCheckService extends IService<IncidentAcceptanceCheck> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.IncidentFile; |
| | | |
| | | public interface IncidentFileService extends IService<IncidentFile> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.IncidentInstall; |
| | | |
| | | public interface IncidentInstallService extends IService<IncidentInstall> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.IncidentReportAddDto; |
| | | import com.yuanchu.mom.excel.IncidentReportExport; |
| | | import com.yuanchu.mom.pojo.IncidentReport; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶æ·»å éªæ¶å段表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 03:54:49 |
| | | */ |
| | | public interface IncidentReportService extends IService<IncidentReport> { |
| | | |
| | | void saveIncidentReportData(IncidentReportAddDto incidentReportAddDto); |
| | | |
| | | IPage<IncidentReportAddDto> getByDeviceId(Integer deviceId, Page page, String processNumber); |
| | | |
| | | void deleteIncidentReport(Integer id); |
| | | |
| | | IncidentReportAddDto getShowIncidentReport(Integer id); |
| | | |
| | | void deleteIncidentReportAll(Integer sparePartsId, Integer fileId, Integer installId, Integer acceptanceCheckId); |
| | | |
| | | List<IncidentReportExport> incidentReportExport(Integer deviceId); |
| | | |
| | | /** |
| | | * 导åºéªæ¶æ¥å |
| | | * @param deviceId 设å¤id |
| | | * @param processNumber æµç¨å· |
| | | * @param response ååºWordææ¡£ |
| | | */ |
| | | void acceptanceCertificateExport(Integer deviceId, String processNumber, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.IncidentSpareParts; |
| | | |
| | | public interface IncidentSparePartsService extends IService<IncidentSpareParts> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.InstructionDto; |
| | | import com.yuanchu.mom.dto.OperationInstructionDto; |
| | | import com.yuanchu.mom.pojo.Instruction; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | public interface InstructionService extends IService<Instruction> { |
| | | |
| | | IPage<Instruction> pageByPageQueryOfHomeworkInstructions(Page page, OperationInstructionDto operationInstructionDto); |
| | | |
| | | void newHomeworkGuidebookAdded(InstructionDto instructionDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.OperationInstruction; |
| | | import com.yuanchu.mom.vo.OperationInstructionVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:43:32 |
| | | */ |
| | | public interface OperationInstructionService extends IService<OperationInstruction> { |
| | | |
| | | List<OperationInstructionVo> homeworkGuidebookEditor(Integer instructionId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import org.springframework.ui.Model; |
| | | |
| | | public interface QrShowService { |
| | | |
| | | void transformModelByType(Model model,String code,String type); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.dto.ReservationDto; |
| | | import com.yuanchu.mom.pojo.Reservation; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * èµæºé¢å®æ°å»ºé¢å®è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author baomidou |
| | | * @since 2024-09-14 |
| | | */ |
| | | public interface ReservationService extends IService<Reservation> { |
| | | |
| | | Map<String, Object> selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull, String starttime, String endtime); |
| | | |
| | | List<ReservationDto> selectReservationParameterPage( String deviceId, String reservationTime, String specificTime); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceAcceptanceFileMapper; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptanceFile; |
| | | import com.yuanchu.mom.service.DeviceAcceptanceFileService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤)é件表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:26 |
| | | */ |
| | | @Service |
| | | public class DeviceAcceptanceFileServiceImpl extends ServiceImpl<DeviceAcceptanceFileMapper, DeviceAcceptanceFile> implements DeviceAcceptanceFileService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.DeviceAcceptanceFileMapper; |
| | | import com.yuanchu.mom.mapper.DeviceAcceptanceMapper; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptance; |
| | | import com.yuanchu.mom.pojo.DeviceAcceptanceFile; |
| | | import com.yuanchu.mom.service.DeviceAcceptanceService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶(è£
å¤) æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 01:45:14 |
| | | */ |
| | | @Service |
| | | public class DeviceAcceptanceServiceImpl extends ServiceImpl<DeviceAcceptanceMapper, DeviceAcceptance> implements DeviceAcceptanceService { |
| | | |
| | | @Resource |
| | | private DeviceAcceptanceFileMapper deviceAcceptanceFileMapper; |
| | | |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å表 |
| | | * @param page |
| | | * @param deviceAcceptance |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceAcceptance> pageDeviceAcceptance(Page page, DeviceAcceptance deviceAcceptance) { |
| | | return baseMapper.pageDeviceAcceptance(page, QueryWrappers.queryWrappers(deviceAcceptance)); |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶éä»¶ |
| | | * @param acceptanceId |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean uploadDeviceAcceptanceFile(Integer acceptanceId, MultipartFile file) { |
| | | if (acceptanceId == null) { |
| | | throw new ErrorException("缺å°éªæ¶id"); |
| | | } |
| | | |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | String filename = file.getOriginalFilename(); |
| | | String contentType = file.getContentType(); |
| | | DeviceAcceptanceFile acceptanceFile = new DeviceAcceptanceFile(); |
| | | acceptanceFile.setAcceptanceId(acceptanceId); |
| | | acceptanceFile.setFileName(filename); |
| | | if (contentType != null && contentType.startsWith("image/")) { |
| | | // æ¯å¾ç |
| | | path = imgUrl; |
| | | acceptanceFile.setType(1); |
| | | } else { |
| | | // æ¯æä»¶ |
| | | path = wordUrl; |
| | | acceptanceFile.setType(2); |
| | | } |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | acceptanceFile.setFileUrl(pathName); |
| | | deviceAcceptanceFileMapper.insert(acceptanceFile); |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 设å¤éªæ¶å¯¼åº |
| | | * @param acceptanceId 设å¤éªæ¶id |
| | | * @param response ååºä½ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void exportDeviceAcceptance(Integer acceptanceId, HttpServletResponse response) { |
| | | DeviceAcceptance deviceAcceptance = baseMapper.selectById(acceptanceId); |
| | | if (deviceAcceptance == null) { |
| | | throw new ErrorException("设å¤éªæ¶ä¸åå¨"); |
| | | } |
| | | Device device = null; |
| | | if (deviceAcceptance.getDeviceId() != null) { |
| | | device = deviceMapper.selectById(deviceAcceptance.getDeviceId()); |
| | | } |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/acceptance-certificate.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceInspectionRecordDetailsList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | Device finalDevice = device; |
| | | String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceAcceptance", deviceAcceptance); |
| | | put("device", finalDevice); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | deviceName+ "éªæ¶å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceAccidentReportDto; |
| | | import com.yuanchu.mom.mapper.DeviceAccidentReportMapper; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.DeviceAccidentReport; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceAccidentReportService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤äºæ
æ¥åå æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 06:31:12 |
| | | */ |
| | | @Service |
| | | public class DeviceAccidentReportServiceImpl extends ServiceImpl<DeviceAccidentReportMapper, DeviceAccidentReport> implements DeviceAccidentReportService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | @Resource |
| | | private DeviceMapper deivceMapper; |
| | | |
| | | /** |
| | | * 设å¤äºæ
æ¥åå表 |
| | | * @param page |
| | | * @param deviceAccidentReport |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceAccidentReport> pageDeviceAccidentReport(Page page, DeviceAccidentReport deviceAccidentReport) { |
| | | return baseMapper.pageDeviceAccidentReport(page, QueryWrappers.queryWrappers(deviceAccidentReport)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äºæ
æ¥å |
| | | * @param deviceAccidentReport |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceAccidentReport(DeviceAccidentReport deviceAccidentReport) { |
| | | DeviceAccidentReport accidentReport = new DeviceAccidentReport(); |
| | | User user = userMapper.selectById(getLook.selectPowerByMethodAndUserId(null).get("userId")); |
| | | switch (deviceAccidentReport.getFlowType()) { |
| | | case 0: |
| | | // æ¥å |
| | | BeanUtils.copyProperties(deviceAccidentReport, accidentReport); |
| | | accidentReport.setDescriptionOfAccident(deviceAccidentReport.getDescriptionOfAccident()); |
| | | accidentReport.setReportUserId(user.getId()); |
| | | accidentReport.setReportUser(user.getName()); |
| | | accidentReport.setReportDate(LocalDate.now()); |
| | | |
| | | // è¯ä¼°äººä¿¡æ¯ |
| | | User assessorUser = userMapper.selectById(deviceAccidentReport.getAssessorUserId()); |
| | | accidentReport.setAssessorUserId(assessorUser.getId()); |
| | | accidentReport.setAssessorUser(assessorUser.getName()); |
| | | |
| | | baseMapper.insert(accidentReport); |
| | | break; |
| | | case 1: |
| | | accidentReport.setAccidentReportId(deviceAccidentReport.getAccidentReportId()); |
| | | // è¯ä¼° |
| | | accidentReport.setAssessorOpinion(deviceAccidentReport.getAssessorOpinion()); |
| | | accidentReport.setAssessorDate(LocalDate.now()); |
| | | |
| | | // é¨é¨è´è´£äºº |
| | | User departmentHeadUser = userMapper.selectById(deviceAccidentReport.getDepartmentHeadUserId()); |
| | | accidentReport.setDepartmentHeadUserId(departmentHeadUser.getId()); |
| | | accidentReport.setDepartmentHeadUser(departmentHeadUser.getName()); |
| | | |
| | | baseMapper.updateById(accidentReport); |
| | | |
| | | break; |
| | | case 2: |
| | | accidentReport.setAccidentReportId(deviceAccidentReport.getAccidentReportId()); |
| | | // é¨é¨è´è´£äººæè§ |
| | | accidentReport.setDepartmentHeadOpinion(deviceAccidentReport.getDepartmentHeadOpinion()); |
| | | accidentReport.setDepartmentHeadDate(LocalDate.now()); |
| | | |
| | | // ææ¯è´è´£äººä¿¡æ¯ |
| | | User technicalDirectorUser = userMapper.selectById(deviceAccidentReport.getTechnicalDirectorUserId()); |
| | | accidentReport.setTechnicalDirectorUserId(technicalDirectorUser.getId()); |
| | | accidentReport.setTechnicalDirectorUser(technicalDirectorUser.getName()); |
| | | |
| | | baseMapper.updateById(accidentReport); |
| | | |
| | | break; |
| | | case 3: |
| | | accidentReport.setAccidentReportId(deviceAccidentReport.getAccidentReportId()); |
| | | // ææ¯è´è´£äººæè§ |
| | | accidentReport.setTechnicalDirectorOpinion(deviceAccidentReport.getTechnicalDirectorOpinion()); |
| | | accidentReport.setTechnicalDirectorDate(LocalDate.now()); |
| | | |
| | | // ä¸»ä»»ä¿¡æ¯ |
| | | User directorHeadUser = userMapper.selectById(deviceAccidentReport.getDirectorHeadUserId()); |
| | | accidentReport.setDirectorHeadUserId(directorHeadUser.getId()); |
| | | accidentReport.setDirectorHeadUser(directorHeadUser.getName()); |
| | | |
| | | baseMapper.updateById(accidentReport); |
| | | |
| | | break; |
| | | case 4: |
| | | accidentReport.setAccidentReportId(deviceAccidentReport.getAccidentReportId()); |
| | | // 主任æè§ |
| | | accidentReport.setDirectorHeadOpinion(deviceAccidentReport.getDirectorHeadOpinion()); |
| | | accidentReport.setDirectorHeadDate(LocalDate.now()); |
| | | |
| | | accidentReport.setIsFinish(1); |
| | | baseMapper.updateById(accidentReport); |
| | | break; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤äºæ
æ¥å |
| | | * @param accidentReportId 设å¤äºæ
æ¥åid |
| | | * @param response ååº |
| | | */ |
| | | @Override |
| | | public void exportDeviceAccidentReport(Integer accidentReportId, HttpServletResponse response) { |
| | | // æ¥è¯¢äºæ
æ¥å |
| | | DeviceAccidentReportDto deviceAccidentReport = baseMapper.selectDeviceAccidentReportById(accidentReportId); |
| | | |
| | | Device device = deivceMapper.selectById(deviceAccidentReport.getDeviceId()); |
| | | device = device == null ? new Device() : device; |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-accident-report.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | Device finalDevice = device; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceAccidentReport", deviceAccidentReport); |
| | | put("device", finalDevice); |
| | | // æ¥å人ç¾å |
| | | put("reportUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getReportUserId())); |
| | | // è¯ä¼°äººç¾å |
| | | put("assessorUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getAssessorUserId())); |
| | | // é¨é¨è´è´£äººç¾å |
| | | put("departmentHeadUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getDepartmentHeadUserId())); |
| | | // ææ¯è´è´£äººç¾å |
| | | put("technicalDirectorUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getTechnicalDirectorUserId())); |
| | | // 主任ç¾å |
| | | put("directorHeadUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getDepartmentHeadUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName(); |
| | | String fileName = URLEncoder.encode( |
| | | deviceName + "设å¤äºæ
æ¥åå", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.mapper.DeviceBorrowMapper; |
| | | import com.yuanchu.mom.mapper.DeviceLogMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.DeviceBorrow; |
| | | import com.yuanchu.mom.pojo.DeviceLog; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceBorrowService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceBorrowServiceImpl extends ServiceImpl<DeviceBorrowMapper, DeviceBorrow> implements DeviceBorrowService { |
| | | |
| | | @Resource |
| | | DeviceBorrowMapper deviceBorrowMapper; |
| | | |
| | | @Resource |
| | | DeviceLogMapper deviceLogMapper; |
| | | |
| | | @Resource |
| | | GetLook getLook; |
| | | |
| | | @Resource |
| | | UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceBorrow> numberGenerator; |
| | | |
| | | @Override |
| | | public Map<String, Object> deviceBorrowPage(Page page, DeviceBorrow deviceBorrow) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(DeviceBorrow.class)); |
| | | IPage<DeviceBorrow> iPage = deviceBorrowMapper.deviceBorrowPage(page, QueryWrappers.queryWrappers(deviceBorrow)); |
| | | map.put("body", iPage); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int saveDeviceBorrow(DeviceBorrow deviceBorrow) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | //æ°å¢çæ¶åæ·»å æ°å»ºæµç¨ |
| | | if (ObjectUtils.isEmpty(deviceBorrow.getId())) { |
| | | deviceBorrow.setSubmitUser(user.getName()); |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "DG-TC-23FM " + month + "-" + year + month, DeviceBorrow::getProcessNumber); |
| | | deviceBorrow.setProcessNumber(processNumber); |
| | | deviceBorrowMapper.insert(deviceBorrow); |
| | | DeviceLog deviceLog = new DeviceLog(); |
| | | deviceLog.setOperator(user.getName()); |
| | | deviceLog.setOperationTime(LocalDateTime.now()); |
| | | deviceLog.setOperationType("æ°å»º"); |
| | | deviceLog.setOperationContent("æ°å»ºæµç¨"); |
| | | deviceLog.setRelevanceForm("device_borrow"); |
| | | deviceLog.setRelevanceId(deviceBorrow.getId()); |
| | | deviceLogMapper.insert(deviceLog); |
| | | } else { |
| | | DeviceBorrow borrow = deviceBorrowMapper.selectById(deviceBorrow.getId()); |
| | | deviceBorrowMapper.updateById(deviceBorrow); |
| | | //éè¿æè
驳åå¢å æµç¨è·è¸ª |
| | | if (deviceBorrow.getNowState().equals("å
³é")) { |
| | | DeviceLog deviceLog = new DeviceLog(); |
| | | deviceLog.setOperator(user.getName()); |
| | | deviceLog.setOperationTime(LocalDateTime.now()); |
| | | deviceLog.setOperationType("æ¥æ¶éè¿"); |
| | | deviceLog.setRelevanceForm("device_borrow"); |
| | | deviceLog.setRelevanceId(deviceBorrow.getId()); |
| | | deviceLogMapper.insert(deviceLog); |
| | | } |
| | | else if (deviceBorrow.getNowState().equals("æäº¤") && borrow.getNowState().equals("æ¥æ¶")) { |
| | | DeviceLog deviceLog = new DeviceLog(); |
| | | deviceLog.setOperator(user.getName()); |
| | | deviceLog.setOperationTime(LocalDateTime.now()); |
| | | deviceLog.setOperationType("æ¥æ¶é©³å"); |
| | | deviceLog.setRelevanceForm("device_borrow"); |
| | | deviceLog.setRelevanceId(deviceBorrow.getId()); |
| | | deviceLogMapper.insert(deviceLog); |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public DeviceBorrow getDeviceBorrow(Integer id) { |
| | | List<DeviceLog> deviceLogs = deviceLogMapper.selectList(Wrappers.<DeviceLog>lambdaQuery() |
| | | .eq(DeviceLog::getRelevanceForm, "device_borrow") |
| | | .eq(DeviceLog::getRelevanceId, id)); |
| | | DeviceBorrow deviceBorrow = deviceBorrowMapper.selectById(id); |
| | | deviceBorrow.setDeviceLogs(deviceLogs); |
| | | return deviceBorrow; |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceBorrow> getDeviceBorrowBydeviceId(Integer deviceId) { |
| | | return deviceBorrowMapper.getDeviceBorrowBydeviceId(deviceId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.mapper.DeviceBreakdownMaintenanceMapper; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.DeviceBreakdownMaintenance; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceBreakdownMaintenanceService; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é维修表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 04:50:57 |
| | | */ |
| | | @Service |
| | | public class DeviceBreakdownMaintenanceServiceImpl extends ServiceImpl<DeviceBreakdownMaintenanceMapper, DeviceBreakdownMaintenance> implements DeviceBreakdownMaintenanceService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private DeviceMapper deivceMapper; |
| | | |
| | | /** |
| | | * è®¾å¤æ
éç»´ä¿®å表 |
| | | * @param page |
| | | * @param deviceBreakdownMaintenance |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceBreakdownMaintenance> pageDeviceBreakdownMaintenance(Page page, DeviceBreakdownMaintenance deviceBreakdownMaintenance) { |
| | | return baseMapper.pageDeviceBreakdownMaintenance(page, QueryWrappers.queryWrappers(deviceBreakdownMaintenance)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ
éç»´ä¿® |
| | | * @param deviceBreakdownMaintenance |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceBreakdownMaintenance(DeviceBreakdownMaintenance deviceBreakdownMaintenance) { |
| | | DeviceBreakdownMaintenance breakdownMaintenance = new DeviceBreakdownMaintenance(); |
| | | //å½åç»å½ç¨æ· |
| | | User user = userMapper.selectById(getLook.selectPowerByMethodAndUserId(null).get("userId")); |
| | | |
| | | switch (deviceBreakdownMaintenance.getFlowType()) { |
| | | case 0: |
| | | BeanUtils.copyProperties(deviceBreakdownMaintenance, breakdownMaintenance); |
| | | // ç³è¯· |
| | | breakdownMaintenance.setDamageOrMalfunction(deviceBreakdownMaintenance.getDamageOrMalfunction()); |
| | | breakdownMaintenance.setApplicantUserId(user.getId()); |
| | | breakdownMaintenance.setApplicantUser(user.getName()); |
| | | breakdownMaintenance.setRepairDate(deviceBreakdownMaintenance.getRepairDate()); |
| | | |
| | | // å¤çäººä¿¡æ¯ |
| | | User departmentHeadUser = userMapper.selectById(deviceBreakdownMaintenance.getDepartmentHeadUserId()); |
| | | breakdownMaintenance.setApplicantUserId(departmentHeadUser.getId()); |
| | | breakdownMaintenance.setApplicantUser(departmentHeadUser.getName()); |
| | | |
| | | baseMapper.insert(breakdownMaintenance); |
| | | break; |
| | | case 1: |
| | | breakdownMaintenance.setMaintenanceId(deviceBreakdownMaintenance.getMaintenanceId()); |
| | | // ç³è¯·é¨é¨è´è´£äººæè§ |
| | | breakdownMaintenance.setDepartmentHeadOpinion(deviceBreakdownMaintenance.getDepartmentHeadOpinion()); |
| | | breakdownMaintenance.setDepartmentHeadDate(LocalDate.now()); |
| | | |
| | | baseMapper.updateById(breakdownMaintenance); |
| | | break; |
| | | case 2: |
| | | breakdownMaintenance.setMaintenanceId(deviceBreakdownMaintenance.getMaintenanceId()); |
| | | // 计é室æè§ |
| | | breakdownMaintenance.setMaintenanceRecord(deviceBreakdownMaintenance.getMaintenanceRecord()); |
| | | breakdownMaintenance.setMaintenanceUser(deviceBreakdownMaintenance.getMaintenanceUser()); |
| | | breakdownMaintenance.setMaintenanceDate(deviceBreakdownMaintenance.getMaintenanceDate()); |
| | | |
| | | breakdownMaintenance.setIsFinish(1); |
| | | |
| | | baseMapper.updateById(breakdownMaintenance); |
| | | break; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ
éç»´ä¿® |
| | | * @param maintenanceId è®¾å¤æ
éç»´ä¿®id |
| | | * @param response ååº |
| | | */ |
| | | @Override |
| | | public void exportDeviceBreakdownMaintenance(Integer maintenanceId, HttpServletResponse response) { |
| | | // æ¥è¯¢å¤é¨è®¾å¤ç³è¯· |
| | | DeviceBreakdownMaintenance deviceBreakdownMaintenance = baseMapper.selectById(maintenanceId); |
| | | |
| | | Device device = null; |
| | | if (deviceBreakdownMaintenance.getDeviceId() != null) { |
| | | device = deivceMapper.selectById(deviceBreakdownMaintenance.getDeviceId()); |
| | | device = device == null ? new Device() : device; |
| | | } |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-breakdown-maintenance.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | Device finalDevice = device; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceBreakdownMaintenance", deviceBreakdownMaintenance); |
| | | put("device", finalDevice); |
| | | // ç³è¯·äººç¾å |
| | | put("applicantUrl", UserUtils.getFinalUserSignatureUrl(deviceBreakdownMaintenance.getApplicantUserId())); |
| | | // é¨é¨è´è´£äººç¾å |
| | | put("headUrl", UserUtils.getFinalUserSignatureUrl(deviceBreakdownMaintenance.getDepartmentHeadUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName(); |
| | | String fileName = URLEncoder.encode( |
| | | deviceName + "è®¾å¤æ
éç»´ä¿®ç³è¯·è¡¨", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceCalibrationPlanDetailMapper; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail; |
| | | import com.yuanchu.mom.service.DeviceCalibrationPlanDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:29 |
| | | */ |
| | | @Service |
| | | public class DeviceCalibrationPlanDetailServiceImpl extends ServiceImpl<DeviceCalibrationPlanDetailMapper, DeviceCalibrationPlanDetail> implements DeviceCalibrationPlanDetailService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceCalibrationPlanDetailDto; |
| | | import com.yuanchu.mom.dto.DeviceCalibrationPlanDto; |
| | | import com.yuanchu.mom.excel.upload.DeviceCalibrationPlanDetailUpload; |
| | | import com.yuanchu.mom.mapper.DeviceCalibrationPlanDetailMapper; |
| | | import com.yuanchu.mom.mapper.DeviceCalibrationPlanMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlan; |
| | | import com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail; |
| | | import com.yuanchu.mom.service.DeviceCalibrationPlanDetailService; |
| | | import com.yuanchu.mom.service.DeviceCalibrationPlanService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å计å主表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 03:58:17 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceCalibrationPlanServiceImpl extends ServiceImpl<DeviceCalibrationPlanMapper, DeviceCalibrationPlan> implements DeviceCalibrationPlanService { |
| | | |
| | | @Resource |
| | | private DeviceCalibrationPlanDetailMapper deviceCalibrationPlanDetailMapper; |
| | | @Resource |
| | | private DeviceCalibrationPlanDetailService deviceCalibrationPlanDetailService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¡å计å |
| | | * @param calibrationPlanDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceCalibrationPlan(DeviceCalibrationPlanDto calibrationPlanDto) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // ç¼å¶æ¥æ |
| | | calibrationPlanDto.setWriteUserId(userId); |
| | | calibrationPlanDto.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.insert(calibrationPlanDto); |
| | | |
| | | // æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(calibrationPlanDto.getCalibrationPlanDetailList())) { |
| | | for (DeviceCalibrationPlanDetail calibrationPlanDetail : calibrationPlanDto.getCalibrationPlanDetailList()) { |
| | | calibrationPlanDetail.setPlanId(calibrationPlanDto.getPlanId()); |
| | | } |
| | | deviceCalibrationPlanDetailService.saveBatch(calibrationPlanDto.getCalibrationPlanDetailList()); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¡å计å |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean importDeviceCalibrationPlan(MultipartFile file, String planYear) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // æä»¶åç§° |
| | | String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")); |
| | | DeviceCalibrationPlan calibrationPlan = new DeviceCalibrationPlan(); |
| | | calibrationPlan.setPlanName(fileName); |
| | | calibrationPlan.setPlanYear(planYear); |
| | | calibrationPlan.setWriteUserId(userId); |
| | | calibrationPlan.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.insert(calibrationPlan); |
| | | |
| | | List<DeviceCalibrationPlanDetail> detailsUploadList = new ArrayList<>(); |
| | | // 导å
¥éä»¶å
容 |
| | | try { |
| | | // excelè§£æ |
| | | EasyExcel.read(file.getInputStream(), DeviceCalibrationPlanDetailUpload.class, new AnalysisEventListener<DeviceCalibrationPlanDetailUpload>() { |
| | | @Override |
| | | public void invoke(DeviceCalibrationPlanDetailUpload detailsUpload, AnalysisContext analysisContext) { |
| | | // 夿æ¯å¦ä¸ºç©º |
| | | if (StringUtils.isNotBlank(detailsUpload.getDeviceName()) && |
| | | StringUtils.isNotBlank(detailsUpload.getDeviceNumber())) { |
| | | // 对象å¤å¶ |
| | | DeviceCalibrationPlanDetail calibrationPlanDetail = new DeviceCalibrationPlanDetail(); |
| | | BeanUtils.copyProperties(detailsUpload, calibrationPlanDetail); |
| | | // æ ¼å¼è¯æè¿æ£å®æ¶é´åæ¬å¹´è®¡åæ ¡åæ¶é´ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd"); |
| | | calibrationPlanDetail.setLastDate(LocalDate.parse(detailsUpload.getLastDate(), formatter)); |
| | | calibrationPlanDetail.setPlanDate(LocalDate.parse(detailsUpload.getLastDate(), formatter)); |
| | | |
| | | calibrationPlanDetail.setPlanId(calibrationPlan.getPlanId()); |
| | | detailsUploadList.add(calibrationPlanDetail); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | |
| | | } |
| | | }).sheet().doRead(); |
| | | deviceCalibrationPlanDetailService.saveBatch(detailsUploadList); |
| | | |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡åè®¡åæ¹å |
| | | * @param deviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean ratifyDeviceCalibrationPlan(DeviceCalibrationPlan deviceCalibrationPlan) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | baseMapper.update(null, Wrappers.<DeviceCalibrationPlan>lambdaUpdate() |
| | | .eq(DeviceCalibrationPlan::getPlanId, deviceCalibrationPlan.getPlanId()) |
| | | .set(DeviceCalibrationPlan::getRatifyUserId, userId) |
| | | .set(DeviceCalibrationPlan::getRatifyRemark, deviceCalibrationPlan.getRatifyRemark()) |
| | | .set(DeviceCalibrationPlan::getRatifyStatus, deviceCalibrationPlan.getRatifyStatus()) |
| | | .set(DeviceCalibrationPlan::getRatifyTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计åå表 |
| | | * @param page |
| | | * @param deviceCalibrationPlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceCalibrationPlanDto> pageDeviceCalibrationPlan(Page page, DeviceCalibrationPlan deviceCalibrationPlan) { |
| | | return baseMapper.pageDeviceCalibrationPlan(page, QueryWrappers.queryWrappers(deviceCalibrationPlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¡å计å详æ
å表 |
| | | * @param page |
| | | * @param deviceCalibrationPlanDetails |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceCalibrationPlanDetail> pageDeviceCalibrationPlanDetail(Page page, DeviceCalibrationPlanDetail deviceCalibrationPlanDetails) { |
| | | if (deviceCalibrationPlanDetails.getPlanId() == null) { |
| | | return new Page(); |
| | | } |
| | | return deviceCalibrationPlanDetailMapper.pageDeviceCalibrationPlanDetail(page, QueryWrappers.queryWrappers(deviceCalibrationPlanDetails)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¡å计å |
| | | * @param deviceCalibrationPlanId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportDeviceCalibrationPlanDetail(Integer deviceCalibrationPlanId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤æ ¡å计å |
| | | DeviceCalibrationPlan deviceCalibrationPlan = baseMapper.selectById(deviceCalibrationPlanId); |
| | | DeviceCalibrationPlanDto deviceCalibrationPlanDto = new DeviceCalibrationPlanDto(); |
| | | BeanUtils.copyProperties(deviceCalibrationPlan, deviceCalibrationPlanDto); |
| | | // 设置ç¼å¶åæ¹åæ¶é´æ ¼å¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | deviceCalibrationPlanDto.setWriteTimeStr(deviceCalibrationPlan.getWriteTime() == null ? null : deviceCalibrationPlan.getWriteTime().format(formatter)); |
| | | deviceCalibrationPlanDto.setRatifyTimeStr(deviceCalibrationPlan.getRatifyTime() == null ? null : deviceCalibrationPlan.getRatifyTime().format(formatter)); |
| | | |
| | | // æ¥è¯¢è®¾å¤æ ¡å计å详æ
|
| | | List<DeviceCalibrationPlanDetail> deviceCalibrationPlanDetailList = deviceCalibrationPlanDetailMapper.selectList(Wrappers.<DeviceCalibrationPlanDetail>lambdaQuery().eq(DeviceCalibrationPlanDetail::getPlanId, deviceCalibrationPlanId)); |
| | | // 设置åºå· å æ¶é´ |
| | | ArrayList<DeviceCalibrationPlanDetailDto> deviceCalibrationPlanDetailDtoList = new ArrayList<>(); |
| | | deviceCalibrationPlanDetailList.forEach(deviceCalibrationPlanDetail -> { |
| | | DeviceCalibrationPlanDetailDto deviceCalibrationPlanDetailDto = new DeviceCalibrationPlanDetailDto(); |
| | | BeanUtils.copyProperties(deviceCalibrationPlanDetail, deviceCalibrationPlanDetailDto); |
| | | deviceCalibrationPlanDetailDto.setIndex(deviceCalibrationPlanDetailList.indexOf(deviceCalibrationPlanDetail) + 1); |
| | | deviceCalibrationPlanDetailDto.setLastDateStr((deviceCalibrationPlanDetail.getLastDate().format(formatter))); |
| | | deviceCalibrationPlanDetailDto.setPlanDateStr((deviceCalibrationPlanDetail.getPlanDate().format(formatter))); |
| | | deviceCalibrationPlanDetailDtoList.add(deviceCalibrationPlanDetailDto); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-calibration-plan.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceCalibrationPlanDetailDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceCalibrationPlan", deviceCalibrationPlanDto); |
| | | put("deviceCalibrationPlanDetailDtoList", deviceCalibrationPlanDetailDtoList); |
| | | //è·åç¼å¶äººçç¾åå°å |
| | | put("organizationUrl", UserUtils.getFinalUserSignatureUrl(deviceCalibrationPlan.getRatifyUserId())); |
| | | //è·åæ¹å人çç¾åå°å |
| | | put("approvedUrl", UserUtils.getFinalUserSignatureUrl(deviceCalibrationPlan.getWriteUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "è®¾å¤æ ¡å计å表", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceCheckMapper; |
| | | import com.yuanchu.mom.pojo.DeviceCheck; |
| | | import com.yuanchu.mom.service.DeviceCheckService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DeviceCheckServiceImpl extends ServiceImpl<DeviceCheckMapper, DeviceCheck> implements DeviceCheckService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceExaminePlanDetailsMapper; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | import com.yuanchu.mom.service.DeviceExaminePlanDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:16 |
| | | */ |
| | | @Service |
| | | public class DeviceExaminePlanDetailsServiceImpl extends ServiceImpl<DeviceExaminePlanDetailsMapper, DeviceExaminePlanDetails> implements DeviceExaminePlanDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceExaminePlanDetailsDto; |
| | | import com.yuanchu.mom.dto.DeviceExaminePlanDto; |
| | | import com.yuanchu.mom.excel.upload.DeviceExaminePlanUpload; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.DeviceExaminePlanDetailsMapper; |
| | | import com.yuanchu.mom.mapper.DeviceExaminePlanMapper; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlan; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceExaminePlanDetailsService; |
| | | import com.yuanchu.mom.service.DeviceExaminePlanService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®¡å主表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:04 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceExaminePlanServiceImpl extends ServiceImpl<DeviceExaminePlanMapper, DeviceExaminePlan> implements DeviceExaminePlanService { |
| | | |
| | | @Resource |
| | | private DeviceExaminePlanDetailsMapper deviceExaminePlanDetailsMapper; |
| | | @Resource |
| | | private DeviceExaminePlanDetailsService deviceExaminePlanDetailsService; |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ ¸æ¥è®¡å |
| | | * @param examinePlanDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceExaminePlan(DeviceExaminePlanDto examinePlanDto) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // æä»¶åç§° |
| | | examinePlanDto.setWriteUserId(userId); |
| | | examinePlanDto.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.insert(examinePlanDto); |
| | | |
| | | // æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(examinePlanDto.getExaminePlanDetailsList())) { |
| | | for (DeviceExaminePlanDetails deviceExaminePlanDetails : examinePlanDto.getExaminePlanDetailsList()) { |
| | | deviceExaminePlanDetails.setPlanId(examinePlanDto.getPlanId()); |
| | | } |
| | | deviceExaminePlanDetailsService.saveBatch(examinePlanDto.getExaminePlanDetailsList()); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è®¾å¤æ ¸æ¥è®¡å |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean importDeviceExaminePlan(MultipartFile file) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // æä»¶åç§° |
| | | String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")); |
| | | DeviceExaminePlan examinePlan = new DeviceExaminePlan(); |
| | | examinePlan.setPlanName(fileName); |
| | | examinePlan.setWriteUserId(userId); |
| | | examinePlan.setWriteTime(LocalDateTime.now()); |
| | | baseMapper.insert(examinePlan); |
| | | |
| | | List<DeviceExaminePlanDetails> examinePlanDetails = new ArrayList<>(); |
| | | // 导å
¥éä»¶å
容 |
| | | try { |
| | | // excelè§£æ |
| | | EasyExcel.read(file.getInputStream(), DeviceExaminePlanUpload.class, new AnalysisEventListener<DeviceExaminePlanUpload>() { |
| | | @Override |
| | | public void invoke(DeviceExaminePlanUpload detailsUpload, AnalysisContext analysisContext) { |
| | | // 夿æ¯å¦ä¸ºç©º |
| | | if (StringUtils.isNotBlank(detailsUpload.getDeviceName()) && |
| | | StringUtils.isNotBlank(detailsUpload.getDeviceNumber())) { |
| | | // 对象å¤å¶ |
| | | DeviceExaminePlanDetails planDetails = new DeviceExaminePlanDetails(); |
| | | BeanUtils.copyProperties(detailsUpload, planDetails); |
| | | |
| | | planDetails.setPlanId(examinePlan.getPlanId()); |
| | | examinePlanDetails.add(planDetails); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | |
| | | } |
| | | }).sheet().doRead(); |
| | | for (DeviceExaminePlanDetails examinePlanDetail : examinePlanDetails) { |
| | | Device device = deviceMapper.selectOne(Wrappers.<Device>lambdaQuery() |
| | | .eq(Device::getManagementNumber, examinePlanDetail.getDeviceNumber().trim())); |
| | | if (device == null) { |
| | | throw new ErrorException("设å¤ç¼å·" + examinePlanDetail.getDeviceNumber() + "æªæ¥è¯¢å°è®¾å¤, è¯·éæ°å¯¼å
¥"); |
| | | } |
| | | User user = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, examinePlanDetail.getCheckChargerUser())); |
| | | if (user == null) { |
| | | throw new ErrorException("设å¤ç¼å·" + examinePlanDetail.getDeviceNumber() + "æªæ¥è¯¢å°æ ¸æ¥äºº"); |
| | | } |
| | | examinePlanDetail.setDeviceId(device.getId()); |
| | | examinePlanDetail.setCheckChargerUserId(user.getId()); |
| | | } |
| | | |
| | | deviceExaminePlanDetailsService.saveBatch(examinePlanDetails); |
| | | |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åæ¹å |
| | | * @param deviceExaminePlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean ratifyDeviceExaminePlan(DeviceExaminePlan deviceExaminePlan) { |
| | | // å½åç»å½ç¨æ· |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | baseMapper.update(null, Wrappers.<DeviceExaminePlan>lambdaUpdate() |
| | | .eq(DeviceExaminePlan::getPlanId, deviceExaminePlan.getPlanId()) |
| | | .set(DeviceExaminePlan::getRatifyUserId, userId) |
| | | .set(DeviceExaminePlan::getRatifyRemark, deviceExaminePlan.getRatifyRemark()) |
| | | .set(DeviceExaminePlan::getRatifyStatus, deviceExaminePlan.getRatifyStatus()) |
| | | .set(DeviceExaminePlan::getRatifyTime, LocalDateTime.now()) |
| | | ); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡åå表 |
| | | * @param page |
| | | * @param deviceExaminePlan |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceExaminePlanDto> pageDeviceExaminePlan(Page page, DeviceExaminePlan deviceExaminePlan) { |
| | | return baseMapper.deviceExaminePlanDetailsMapper(page, QueryWrappers.queryWrappers(deviceExaminePlan)); |
| | | } |
| | | |
| | | /** |
| | | * è®¾å¤æ ¸æ¥è®¡å详æ
å表 |
| | | * @param page |
| | | * @param deviceExaminePlanDetails |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceExaminePlanDetails> pageDeviceExaminePlanDetail(Page page, DeviceExaminePlanDetails deviceExaminePlanDetails) { |
| | | if (deviceExaminePlanDetails.getPlanId() == null) { |
| | | return new Page(); |
| | | } |
| | | return deviceExaminePlanDetailsMapper.pageDeviceExaminePlanDetail(page, QueryWrappers.queryWrappers(deviceExaminePlanDetails)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ ¸æ¥è®¡å |
| | | * @param deviceExaminePlanId è®¾å¤æ ¸æ¥è®¡åid |
| | | * @param response ååºä½ |
| | | */ |
| | | @Override |
| | | public void exportDeviceExaminePlanDetail(Integer deviceExaminePlanId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å |
| | | DeviceExaminePlanDto deviceExaminePlanDto = baseMapper.selectExamineExaminePlanDto(deviceExaminePlanId); |
| | | |
| | | // æ¥è¯¢è®¾å¤æ ¸æ¥è®¡å详æ
|
| | | List<DeviceExaminePlanDetails> deviceExaminePlanDetailsList = deviceExaminePlanDetailsMapper.selectList(Wrappers.<DeviceExaminePlanDetails>lambdaQuery().eq(DeviceExaminePlanDetails::getPlanId, deviceExaminePlanId)); |
| | | // 设置åºå· |
| | | ArrayList<DeviceExaminePlanDetailsDto> deviceExaminePlanDetailsDtoList = new ArrayList<>(); |
| | | deviceExaminePlanDetailsList.forEach(deviceExamineRecordContrastDetail -> { |
| | | DeviceExaminePlanDetailsDto deviceExaminePlanDetailsDto = new DeviceExaminePlanDetailsDto(); |
| | | BeanUtils.copyProperties(deviceExamineRecordContrastDetail, deviceExaminePlanDetailsDto); |
| | | deviceExaminePlanDetailsDto.setIndex(deviceExaminePlanDetailsList.indexOf(deviceExamineRecordContrastDetail) + 1); |
| | | deviceExaminePlanDetailsDtoList.add(deviceExaminePlanDetailsDto); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/examine-plan-detail.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceExaminePlanDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceExaminePlan", deviceExaminePlanDto); |
| | | put("deviceExaminePlanDetailsDtoList", deviceExaminePlanDetailsDtoList); |
| | | //è·åæ ¸æ¥äººçç¾åå°å |
| | | put("writeUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExaminePlanDto.getWriteUserId())); |
| | | //è·å审æ¥äººçç¾åå°å |
| | | put("reviewUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExaminePlanDto.getRatifyUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "è®¾å¤æ ¸æ¥è®¡å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceExamineRecordContrastDetailsMapper; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrastDetails; |
| | | import com.yuanchu.mom.service.DeviceExamineRecordContrastDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¯¦æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:57 |
| | | */ |
| | | @Service |
| | | public class DeviceExamineRecordContrastDetailsServiceImpl extends ServiceImpl<DeviceExamineRecordContrastDetailsMapper, DeviceExamineRecordContrastDetails> implements DeviceExamineRecordContrastDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordContrastDetailsDto; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordContrastDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.DeviceExaminePlanDetailsMapper; |
| | | import com.yuanchu.mom.mapper.DeviceExamineRecordContrastMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.DeviceExaminePlanDetails; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrast; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordContrastDetails; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceExamineRecordContrastDetailsService; |
| | | import com.yuanchu.mom.service.DeviceExamineRecordContrastService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½å¯¹æ¯è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:43 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceExamineRecordContrastServiceImpl extends ServiceImpl<DeviceExamineRecordContrastMapper, DeviceExamineRecordContrast> implements DeviceExamineRecordContrastService { |
| | | |
| | | @Resource |
| | | private DeviceExamineRecordContrastDetailsService deviceExamineRecordContrastDetailsService; |
| | | @Resource |
| | | private DeviceExaminePlanDetailsMapper deviceExaminePlanDetailsMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DeviceExamineRecordContrastDto getExamineRecordContrast(Integer planDetailsId) { |
| | | DeviceExamineRecordContrastDto contrastDto = baseMapper.getExamineRecordContrast(planDetailsId); |
| | | // 夿æ¯å¦ä¸ºç©º |
| | | if (contrastDto == null) { |
| | | contrastDto = new DeviceExamineRecordContrastDto(); |
| | | // æ¥è¯¢è®¾å¤è¯¦æ
|
| | | DeviceExaminePlanDetails deviceExaminePlanDetails = deviceExaminePlanDetailsMapper.selectById(planDetailsId); |
| | | contrastDto.setPlanDetailsId(deviceExaminePlanDetails.getPlanDetailsId()); |
| | | |
| | | } else { |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<DeviceExamineRecordContrastDetails> list = deviceExamineRecordContrastDetailsService.list(Wrappers.<DeviceExamineRecordContrastDetails>lambdaQuery() |
| | | .eq(DeviceExamineRecordContrastDetails::getRecordContrastId, contrastDto.getRecordContrastId())); |
| | | contrastDto.setRecordContrastDetailsList(list); |
| | | } |
| | | |
| | | return contrastDto; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addExamineRecordContrast(DeviceExamineRecordContrastDto dto) { |
| | | if (dto.getPlanDetailsId() == null) { |
| | | throw new ErrorException("缺å°è®¡å详ç»ä¿¡æ¯id"); |
| | | } |
| | | if (dto.getRecordContrastId() == null) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | dto.setCheckerUserId(userId); |
| | | dto.setCheckerUser(user.getName()); |
| | | |
| | | // æ¥è¯¢å®¡æ¥äººid |
| | | if (dto.getReviewUserId() != null) { |
| | | User reviewUser = userMapper.selectById(dto.getReviewUserId()); |
| | | dto.setReviewUser(reviewUser.getName()); |
| | | } |
| | | } |
| | | this.saveOrUpdate(dto); |
| | | |
| | | // å é¤å
¨é¨è¯¦æ
|
| | | deviceExamineRecordContrastDetailsService.remove(Wrappers.<DeviceExamineRecordContrastDetails>lambdaQuery() |
| | | .eq(DeviceExamineRecordContrastDetails::getRecordContrastId, dto.getRecordContrastId())); |
| | | //æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(dto.getRecordContrastDetailsList())) { |
| | | for (DeviceExamineRecordContrastDetails details : dto.getRecordContrastDetailsList()) { |
| | | details.setRecordContrastId(dto.getRecordContrastId()); |
| | | } |
| | | deviceExamineRecordContrastDetailsService.saveBatch(dto.getRecordContrastDetailsList()); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean reviewExamineRecordContrast(DeviceExamineRecordContrastDto dto) { |
| | | if (dto.getPlanDetailsId() == null) { |
| | | throw new ErrorException("缺å°è®¡å详ç»ä¿¡æ¯id"); |
| | | } |
| | | LambdaUpdateWrapper<DeviceExamineRecordContrast> wrapper = Wrappers.<DeviceExamineRecordContrast>lambdaUpdate() |
| | | .eq(DeviceExamineRecordContrast::getPlanDetailsId, dto.getPlanDetailsId()) |
| | | .set(DeviceExamineRecordContrast::getReviewStatus, dto.getReviewStatus()) |
| | | .set(DeviceExamineRecordContrast::getReviewRemark, dto.getReviewRemark()) |
| | | .set(DeviceExamineRecordContrast::getReviewTime, LocalDateTime.now()); |
| | | // 为0æ¸
é¤å®¡æ ¸äºº |
| | | if (dto.getReviewStatus().equals(0)) { |
| | | wrapper.set(DeviceExamineRecordContrast::getReviewUserId, null) |
| | | .set(DeviceExamineRecordContrast::getReviewUser, null); |
| | | } |
| | | |
| | | this.update(wrapper); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½ |
| | | * |
| | | * @param planDetailsId 详æ
id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportReviewExamineRecordContrast(Integer planDetailsId, HttpServletResponse response) { |
| | | // æ¥è¯¢å¯¹æ¯è®°å½ |
| | | DeviceExamineRecordContrastDto deviceExamineRecordContrast = baseMapper.selectExamineRecordContrastDto(planDetailsId); |
| | | |
| | | // æ¥è¯¢å¯¹æ¯è®°å½è¯¦æ
|
| | | List<DeviceExamineRecordContrastDetails> deviceExamineRecordContrastDetailList = deviceExamineRecordContrastDetailsService.list(Wrappers.<DeviceExamineRecordContrastDetails>lambdaQuery().eq(DeviceExamineRecordContrastDetails::getRecordContrastId, deviceExamineRecordContrast.getRecordContrastId())); |
| | | // 设置åºå· |
| | | ArrayList<DeviceExamineRecordContrastDetailsDto> deviceExamineRecordContrastDetailsDtoList = new ArrayList<>(); |
| | | deviceExamineRecordContrastDetailList.forEach(deviceExamineRecordContrastDetail -> { |
| | | DeviceExamineRecordContrastDetailsDto deviceExamineRecordContrastDetailsDto = new DeviceExamineRecordContrastDetailsDto(); |
| | | BeanUtils.copyProperties(deviceExamineRecordContrastDetail, deviceExamineRecordContrastDetailsDto); |
| | | deviceExamineRecordContrastDetailsDto.setIndex(deviceExamineRecordContrastDetailList.indexOf(deviceExamineRecordContrastDetail) + 1); |
| | | deviceExamineRecordContrastDetailsDtoList.add(deviceExamineRecordContrastDetailsDto); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/review-examine-record-contrast.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceExamineRecordContrastDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceExamineRecordContrast", deviceExamineRecordContrast); |
| | | put("deviceExamineRecordContrastDetailsDtoList", deviceExamineRecordContrastDetailsDtoList); |
| | | //è·åæ ¸æ¥äººçç¾åå°å |
| | | put("checkerUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExamineRecordContrast.getCheckerUserId())); |
| | | //è·å审æ¥äººçç¾åå°å |
| | | put("reviewUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExamineRecordContrast.getReviewUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "å®¡æ ¸æ ¸æ¥å¯¹æ¯è®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceExamineRecordDetailMapper; |
| | | import com.yuanchu.mom.pojo.DeviceExamineRecordDetail; |
| | | import com.yuanchu.mom.service.DeviceExamineRecordDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¯¦æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:15:11 |
| | | */ |
| | | @Service |
| | | public class DeviceExamineRecordDetailServiceImpl extends ServiceImpl<DeviceExamineRecordDetailMapper, DeviceExamineRecordDetail> implements DeviceExamineRecordDetailService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceExamineRecordDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.DeviceExaminePlanDetailsMapper; |
| | | import com.yuanchu.mom.mapper.DeviceExamineRecordMapper; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.DeviceExamineRecordDetailService; |
| | | import com.yuanchu.mom.service.DeviceExamineRecordService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¸æ¥è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 07:14:28 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceExamineRecordServiceImpl extends ServiceImpl<DeviceExamineRecordMapper, DeviceExamineRecord> implements DeviceExamineRecordService { |
| | | |
| | | @Resource |
| | | private DeviceExamineRecordDetailService deviceExamineRecordDetailService; |
| | | @Resource |
| | | private DeviceExaminePlanDetailsMapper deviceExaminePlanDetailsMapper; |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ ¸æ¥è®°å½ |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DeviceExamineRecordDto getExamineRecord(Integer planDetailsId) { |
| | | DeviceExamineRecordDto deviceExamineRecord = baseMapper.getExamineRecord(planDetailsId); |
| | | |
| | | // 夿æ¯å¦ä¸ºç©º |
| | | if (deviceExamineRecord == null) { |
| | | deviceExamineRecord = new DeviceExamineRecordDto(); |
| | | // æ¥è¯¢è®¾å¤è¯¦æ
|
| | | DeviceExaminePlanDetails deviceExaminePlanDetails = deviceExaminePlanDetailsMapper.selectById(planDetailsId); |
| | | Device device = deviceMapper.selectById(deviceExaminePlanDetails.getDeviceId()); |
| | | if (device != null) { |
| | | deviceExamineRecord.setDeviceName(device.getDeviceName()); |
| | | deviceExamineRecord.setDeviceNumber(device.getManagementNumber()); |
| | | deviceExamineRecord.setPlanDetailsId(deviceExaminePlanDetails.getPlanDetailsId()); |
| | | } |
| | | } else { |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<DeviceExamineRecordDetail> list = deviceExamineRecordDetailService.list(Wrappers.<DeviceExamineRecordDetail>lambdaQuery() |
| | | .eq(DeviceExamineRecordDetail::getRecordId, deviceExamineRecord.getRecordId())); |
| | | deviceExamineRecord.setRecordDetailList(list); |
| | | } |
| | | |
| | | return deviceExamineRecord; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ ¸æ¥è®°å½ |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addExamineRecord(DeviceExamineRecordDto deviceExamineRecordDto) { |
| | | if (deviceExamineRecordDto.getPlanDetailsId() == null) { |
| | | throw new ErrorException("缺å°è®¡å详ç»ä¿¡æ¯id"); |
| | | } |
| | | if (deviceExamineRecordDto.getRecordId() == null) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | deviceExamineRecordDto.setCheckerUserId(userId); |
| | | deviceExamineRecordDto.setCheckerUser(user.getName()); |
| | | |
| | | // æ¥è¯¢å®¡æ¥äººid |
| | | if (deviceExamineRecordDto.getReviewUserId() != null) { |
| | | User reviewUser = userMapper.selectById(deviceExamineRecordDto.getReviewUserId()); |
| | | deviceExamineRecordDto.setReviewUser(reviewUser.getName()); |
| | | } |
| | | |
| | | } |
| | | this.saveOrUpdate(deviceExamineRecordDto); |
| | | |
| | | // å é¤å
¨é¨è¯¦æ
|
| | | deviceExamineRecordDetailService.remove(Wrappers.<DeviceExamineRecordDetail>lambdaQuery() |
| | | .eq(DeviceExamineRecordDetail::getRecordId, deviceExamineRecordDto.getRecordId())); |
| | | //æ·»å 详æ
|
| | | if (CollectionUtils.isNotEmpty(deviceExamineRecordDto.getRecordDetailList())) { |
| | | for (DeviceExamineRecordDetail deviceExamineRecordDetail : deviceExamineRecordDto.getRecordDetailList()) { |
| | | deviceExamineRecordDetail.setRecordId(deviceExamineRecordDto.getRecordId()); |
| | | } |
| | | deviceExamineRecordDetailService.saveBatch(deviceExamineRecordDto.getRecordDetailList()); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 夿 ¸æ ¸æ¥è®°å½ |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean reviewExamineRecord(DeviceExamineRecordDto dto) { |
| | | if (dto.getPlanDetailsId() == null) { |
| | | throw new ErrorException("缺å°è®¡å详ç»ä¿¡æ¯id"); |
| | | } |
| | | LambdaUpdateWrapper<DeviceExamineRecord> wrapper = Wrappers.<DeviceExamineRecord>lambdaUpdate() |
| | | .eq(DeviceExamineRecord::getPlanDetailsId, dto.getPlanDetailsId()) |
| | | .set(DeviceExamineRecord::getReviewStatus, dto.getReviewStatus()) |
| | | .set(DeviceExamineRecord::getReviewRemark, dto.getReviewRemark()); |
| | | |
| | | // 为0æ¸
é¤å®¡æ ¸äºº |
| | | if (dto.getReviewStatus().equals(0)) { |
| | | wrapper.set(DeviceExamineRecord::getReviewUserId, null) |
| | | .set(DeviceExamineRecord::getReviewUser, null); |
| | | } |
| | | |
| | | this.update(wrapper); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå¤æ ¸æ ¸æ¥è®°å½ |
| | | * |
| | | * @param planDetailsId 夿 ¸æ ¸æ¥è®°å½id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void exportReviewExamineRecordDetail(Integer planDetailsId, HttpServletResponse response) { |
| | | // æ¥è¯¢å¤æ ¸æ ¸æ¥è®°å½ |
| | | DeviceExamineRecordDto deviceExamineRecordDto = baseMapper.selectReviewExamineRecordDto(planDetailsId); |
| | | |
| | | // æ¥è¯¢å¤æ ¸æ ¸æ¥è®°å½è¯¦æ
|
| | | List<DeviceExamineRecordDetail> deviceExamineRecordDetailList = deviceExamineRecordDetailService.list(Wrappers.<DeviceExamineRecordDetail>lambdaQuery().eq(DeviceExamineRecordDetail::getRecordId, deviceExamineRecordDto.getRecordId())); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/examine-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceExamineRecordDetailList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceExamineRecordDto", deviceExamineRecordDto); |
| | | put("deviceExamineRecordDetailList", deviceExamineRecordDetailList); |
| | | //è·åæ ¸æ¥äººçç¾åå°å |
| | | put("checkerUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExamineRecordDto.getCheckerUserId())); |
| | | //è·å审æ¥äººçç¾åå°å |
| | | put("reviewUserUrl", UserUtils.getFinalUserSignatureUrl(deviceExamineRecordDto.getReviewUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String deviceName = StringUtils.isNotEmpty(deviceExamineRecordDto.getDeviceName()) ? deviceExamineRecordDto.getDeviceName() : ""; |
| | | String fileName = URLEncoder.encode( |
| | | deviceName+ "æ ¸æ¥è®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.mapper.DeviceExternalApplyMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.DeviceExternalApply; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceExternalApplyService; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 10:28:43 |
| | | */ |
| | | @Service |
| | | public class DeviceExternalApplyServiceImpl extends ServiceImpl<DeviceExternalApplyMapper, DeviceExternalApply> implements DeviceExternalApplyService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | /** |
| | | * å©ç¨å¤é¨è®¾å¤ç³è¯·å表 |
| | | * @param page |
| | | * @param deviceExternalApply |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceExternalApply> pageDeviceExternalApply(Page page, DeviceExternalApply deviceExternalApply) { |
| | | return baseMapper.pageDeviceExternalApply(page, QueryWrappers.queryWrappers(deviceExternalApply)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢å©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * @param deviceExternalApply |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceExternalApply(DeviceExternalApply deviceExternalApply) { |
| | | DeviceExternalApply apply = new DeviceExternalApply(); |
| | | // å½åç»å½ç¨æ·ä¿¡æ¯åé¨é¨ |
| | | User user = userMapper.selectById(getLook.selectPowerByMethodAndUserId(null).get("userId")); |
| | | switch (deviceExternalApply.getFlowType()) { |
| | | case 0: |
| | | BeanUtils.copyProperties(deviceExternalApply, apply); |
| | | // ç³è¯· |
| | | apply.setUseReason(deviceExternalApply.getUseReason()); |
| | | apply.setApplicantUserId(user.getId()); |
| | | apply.setApplicantUser(user.getName()); |
| | | apply.setApplicantDate(LocalDate.now()); |
| | | |
| | | // å¤çäººä¿¡æ¯ |
| | | User departmentHeadUser = userMapper.selectById(deviceExternalApply.getDepartmentHeadUserId()); |
| | | apply.setApplicantUserId(departmentHeadUser.getId()); |
| | | apply.setApplicantUser(departmentHeadUser.getName()); |
| | | |
| | | baseMapper.insert(apply); |
| | | break; |
| | | case 1: |
| | | apply.setExternalApplyId(deviceExternalApply.getExternalApplyId()); |
| | | // ç³è¯·é¨é¨è´è´£äººæè§ |
| | | apply.setDepartmentHeadOpinion(deviceExternalApply.getDepartmentHeadOpinion()); |
| | | apply.setDepartmentHeadDate(LocalDate.now()); |
| | | |
| | | // 计éå®¤ä¿¡æ¯ |
| | | User meteringRoomUser = userMapper.selectById(deviceExternalApply.getMeteringRoomUserId()); |
| | | apply.setMeteringRoomUserId(meteringRoomUser.getId()); |
| | | apply.setMeteringRoomUser(meteringRoomUser.getName()); |
| | | |
| | | baseMapper.updateById(apply); |
| | | break; |
| | | case 2: |
| | | apply.setExternalApplyId(deviceExternalApply.getExternalApplyId()); |
| | | // 计é室æè§ |
| | | apply.setMeteringRoomOpinion(deviceExternalApply.getMeteringRoomOpinion()); |
| | | apply.setMeteringRoomDate(LocalDate.now()); |
| | | |
| | | // æ¹åäººä¿¡æ¯ |
| | | User approverUser = userMapper.selectById(deviceExternalApply.getApproverUserId()); |
| | | apply.setApproverUserId(approverUser.getId()); |
| | | apply.setApproverUser(approverUser.getName()); |
| | | |
| | | baseMapper.updateById(apply); |
| | | break; |
| | | case 3: |
| | | apply.setExternalApplyId(deviceExternalApply.getExternalApplyId()); |
| | | //æ¹å人 |
| | | apply.setApproverOpinion(deviceExternalApply.getApproverOpinion()); |
| | | apply.setApproverDate(LocalDate.now()); |
| | | |
| | | apply.setIsFinish(1); |
| | | baseMapper.updateById(apply); |
| | | break; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå©ç¨å¤é¨è®¾å¤ç³è¯· |
| | | * |
| | | * @param externalApplyId å¤é¨è®¾å¤ç³è¯·id |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportDeviceExternalApply(Integer externalApplyId, HttpServletResponse response) { |
| | | // æ¥è¯¢å¤é¨è®¾å¤ç³è¯· |
| | | DeviceExternalApply deviceAccidentReport = baseMapper.selectDeviceExternalById(externalApplyId); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-external-apply.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceAccidentReport", deviceAccidentReport); |
| | | // ç³è¯·äººç¾å |
| | | put("applicantUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getApplicantUserId())); |
| | | // é¨é¨è´è´£äººç¾å |
| | | put("departmentHeadUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getDepartmentHeadUserId())); |
| | | // 计é室人ç¾å |
| | | put("meteringRoomUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getMeteringRoomUserId())); |
| | | // æ¹å人ç¾å |
| | | put("approverUserUrl", UserUtils.getFinalUserSignatureUrl(deviceAccidentReport.getApproverUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "å©ç¨å¤é¨è®¾å¤ç³è¯·", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.yuanchu.mom.dto.DeviceFaultOneDto; |
| | | import com.yuanchu.mom.mapper.DeviceFaultOneMapper; |
| | | import com.yuanchu.mom.pojo.DeviceFaultOne; |
| | | import com.yuanchu.mom.service.DeviceFaultOneService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 02:03:29 |
| | | */ |
| | | @Service |
| | | public class DeviceFaultOneServiceImpl extends ServiceImpl<DeviceFaultOneMapper, DeviceFaultOne> implements DeviceFaultOneService { |
| | | |
| | | @Override |
| | | public IPage<DeviceFaultOneDto> deviceFaultOnePage(Integer deviceId, Page page, String processNumber) { |
| | | return baseMapper.deviceFaultOnePage(deviceId, page, processNumber); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.DeviceFaultService; |
| | | import com.yuanchu.mom.service.EnumService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class DeviceFaultServiceImpl extends ServiceImpl<DeviceFaultMapper, DeviceFault> implements DeviceFaultService { |
| | | |
| | | @Autowired |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Autowired |
| | | private QrShowServiceImpl qrShowService; |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | |
| | | @Autowired |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | @Autowired |
| | | private DeviceFaultOneMapper deviceFaultOneMapper; |
| | | |
| | | @Autowired |
| | | private EnumService enumService; |
| | | |
| | | @Override |
| | | public Map<String,Object> findByDeviceId(Integer deviceId) { |
| | | Map<String,Object> map = new HashMap<>(); |
| | | if(Objects.isNull(deviceId)){ |
| | | return map; |
| | | } |
| | | //æ¥è¯¢è®¾å¤ä¸»è¡¨ä¿¡æ¯ |
| | | Device device = deviceMapper.selectById(deviceId); |
| | | if(!Objects.isNull(device)){ |
| | | //æ¥è¯¢è®¾å¤æ ¡åä¿¡æ¯ |
| | | DeviceMetricRecord calibrate = qrShowService.getDeviceMetricRecord(device.getId(), "calibrate"); |
| | | //æ¥è¯¢è®¾å¤æ ¸æ¥ä¿¡æ¯ |
| | | DeviceMetricRecord examine = qrShowService.getDeviceMetricRecord(device.getId(), "examine"); |
| | | //æ¥è¯¢è®¾å¤ç»´æ¤è®°å½ |
| | | DeviceMaintenance deviceMaintenance = Optional.ofNullable(deviceMaintenanceMapper.selectOne(Wrappers.<DeviceMaintenance>lambdaQuery() |
| | | .eq(DeviceMaintenance::getDeviceId, device.getId()) |
| | | .orderByDesc(DeviceMaintenance::getId) |
| | | .last("limit 1"))).orElse(new DeviceMaintenance()); |
| | | //æ¥è¯¢è®¾å¤æ
éä¿¡æ¯ |
| | | List<DeviceFaultOne> deviceFaultOneList = Optional.ofNullable(deviceFaultOneMapper.selectList(Wrappers.<DeviceFaultOne>lambdaQuery() |
| | | .eq(DeviceFaultOne::getDeviceId, device.getId()) |
| | | .orderByDesc(DeviceFaultOne::getId))).orElse(new ArrayList<>()); |
| | | //æ¥è¯¢è®¾å¤ç¶æåå
¸ |
| | | List<Enums> deviceStatus = enumService.selectEnumByCategory("设å¤ç¶æ"); |
| | | Enums findEnum = deviceStatus.stream().filter(e-> Integer.parseInt(e.getValue()) ==device.getDeviceStatus()).findFirst().orElse(new Enums()); |
| | | map.put("progress",qrShowService.calcDeviceNextCheckRatio(calibrate.getCalibrationDate(),calibrate.getNextCalibrationDate()));//è·ç¦»ä¸æ¬¡æ ¡åæ¥æç天æ°ç¾åæ¯ |
| | | map.put("deviceName",device.getDeviceName());//设å¤åç§° |
| | | map.put("deviceCode",device.getManagementNumber());//设å¤ç¼å· |
| | | map.put("usedYears",qrShowService.calcUsedYears(device.getActivationDate()));//å¯ç¨æ¶é¿(å¹´) |
| | | map.put("deviceStatus",findEnum.getLabel());//设å¤è¿è¡ç¶æ |
| | | map.put("faultCount",deviceFaultOneList.size());//æ
鿬¡æ° |
| | | String faultDate = !deviceFaultOneList.isEmpty() ?qrShowService.formatDate(deviceFaultOneList.get(0).getFaultDate(),"yyyy-MM-dd"):""; |
| | | map.put("faultDate",faultDate);//æè¿æ
鿥æ |
| | | map.put("lastCalibrationDate",qrShowService.formatDate(calibrate.getCalibrationDate(),"yyyy-MM-dd"));//æè¿æ ¡åæ¥æ |
| | | map.put("nextCalibrationDate",qrShowService.formatDate(calibrate.getNextCalibrationDate(),"yyyy-MM-dd"));//䏿¬¡æ ¡åæ¥æ |
| | | String calibrateStatus = "0yes".equals(calibrate.getStatus())?"åæ ¼":"1no".equals(calibrate.getStatus())?"ä¸åæ ¼":"å
¶ä»"; |
| | | map.put("calibrateStatus",Objects.isNull(calibrate.getCalibrationDate())?"":calibrateStatus);//æ ¡åæ»ç»è®º |
| | | map.put("lastExamineDate",examine.getCalibrationDate());//æè¿æ ¸æ¥æ¥æ |
| | | map.put("nextExamineDate",examine.getNextCalibrationDate());//䏿¬¡æ ¸æ¥æ¥æ |
| | | String examineStatus = "0yes".equals(examine.getStatus())?"åæ ¼":"1no".equals(examine.getStatus())?"ä¸åæ ¼":"å
¶ä»"; |
| | | map.put("examineStatus",Objects.isNull(examine.getCalibrationDate())?"":examineStatus);//æ ¸æ¥æ»ç»è®º |
| | | map.put("maintenanceDate",deviceMaintenance.getDate());//æè¿ç»´æ¤æ¥æ |
| | | map.put("nextMaintenanceDate",deviceMaintenance.getNextDate());//䏿¬¡ç»´æ¤æ¥æ |
| | | String maintenanceType = ""; |
| | | if(!Objects.isNull(deviceMaintenance.getMaintenanceType())){ |
| | | maintenanceType = 0==deviceMaintenance.getMaintenanceType()?"使ç¨åç»´æ¤":"使ç¨åç»´æ¤"; |
| | | } |
| | | map.put("maintenanceType",maintenanceType);//ç»´æ¤æ»ç»è®º |
| | | //æµéé¡¹ç® |
| | | String insProduct = ""; |
| | | if(StringUtils.isNotBlank(device.getInsProductIds())){ |
| | | String[] ids = device.getInsProductIds().split(","); |
| | | List<StructureItemParameter> parameters = structureItemParameterMapper.selectBatchIds(Arrays.asList(ids)); |
| | | List<String> itemList = parameters.stream().map(StructureItemParameter::getInspectionItem).distinct().collect(Collectors.toList()); |
| | | insProduct = String.join(",",itemList); |
| | | } |
| | | map.put("insProduct",insProduct);//æµéé¡¹ç® |
| | | } |
| | | return map; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceInspectionRecordDetailsMapper; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecordDetails; |
| | | import com.yuanchu.mom.service.DeviceInspectionRecordDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:27:32 |
| | | */ |
| | | @Service |
| | | public class DeviceInspectionRecordDetailsServiceImpl extends ServiceImpl<DeviceInspectionRecordDetailsMapper, DeviceInspectionRecordDetails> implements DeviceInspectionRecordDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceInspectionRecordDto; |
| | | import com.yuanchu.mom.mapper.DeviceInspectionRecordMapper; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecord; |
| | | import com.yuanchu.mom.pojo.DeviceInspectionRecordDetails; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceInspectionRecordDetailsService; |
| | | import com.yuanchu.mom.service.DeviceInspectionRecordService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ç¹æ£è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 04:25:14 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeviceInspectionRecordServiceImpl extends ServiceImpl<DeviceInspectionRecordMapper, DeviceInspectionRecord> implements DeviceInspectionRecordService { |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private DeviceInspectionRecordDetailsService deviceInspectionRecordDetailsService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param page å½å页ç |
| | | */ |
| | | @Override |
| | | public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(IPage page, DeviceInspectionRecordDto deviceInspectionRecordDto) { |
| | | IPage<DeviceInspectionRecord> iPage = baseMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceInspectionRecordDto)); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£è¯¦æ
|
| | | * @param inspectionRecordId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result getDeviceInspectionRecord(Integer inspectionRecordId) { |
| | | DeviceInspectionRecord deviceInspectionRecord = baseMapper.selectById(inspectionRecordId); |
| | | DeviceInspectionRecordDto dto = new DeviceInspectionRecordDto(); |
| | | BeanUtils.copyProperties(deviceInspectionRecord, dto); |
| | | List<DeviceInspectionRecordDetails> list = deviceInspectionRecordDetailsService.list(Wrappers.<DeviceInspectionRecordDetails>lambdaQuery().eq(DeviceInspectionRecordDetails::getInspectionRecordId, inspectionRecordId)); |
| | | dto.setDetails(list); |
| | | return Result.success(dto); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result addDeviceInspectionRecord(DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | deviceInspectionRecord.setRecorderId(userId); |
| | | deviceInspectionRecord.setRecorder(user.getName()); |
| | | |
| | | // æ¥è¯¢å¤æ ¸äººid |
| | | if (deviceInspectionRecord.getReviewerId() != null) { |
| | | User reviewUser = userMapper.selectById(deviceInspectionRecord.getReviewerId()); |
| | | deviceInspectionRecord.setReviewer(reviewUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceInspectionRecord); |
| | | if (CollectionUtils.isNotEmpty(deviceInspectionRecord.getDetails())) { |
| | | for (DeviceInspectionRecordDetails detail : deviceInspectionRecord.getDetails()) { |
| | | detail.setInspectionRecordId(deviceInspectionRecord.getInspectionRecordId()); |
| | | } |
| | | deviceInspectionRecordDetailsService.saveBatch( deviceInspectionRecord.getDetails()); |
| | | } |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | @Override |
| | | public Result updateInspectionRecordAndDetails(DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | // æ¥è¯¢å¤æ ¸äººid |
| | | if (deviceInspectionRecord.getReviewerId() != null) { |
| | | User reviewUser = userMapper.selectById(deviceInspectionRecord.getReviewerId()); |
| | | deviceInspectionRecord.setReviewer(reviewUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceInspectionRecord); |
| | | deviceInspectionRecordDetailsService.remove(Wrappers.<DeviceInspectionRecordDetails>lambdaQuery().eq(DeviceInspectionRecordDetails::getInspectionRecordId, deviceInspectionRecord.getInspectionRecordId())); |
| | | if (CollectionUtils.isNotEmpty(deviceInspectionRecord.getDetails())) { |
| | | for (DeviceInspectionRecordDetails detail : deviceInspectionRecord.getDetails()) { |
| | | detail.setInspectionRecordId(deviceInspectionRecord.getInspectionRecordId()); |
| | | } |
| | | deviceInspectionRecordDetailsService.saveBatch( deviceInspectionRecord.getDetails()); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecord 设å¤ç¹æ£è®°å½ |
| | | */ |
| | | @Override |
| | | public Result deleteDeviceInspectionRecordOrDetails(DeviceInspectionRecordDto deviceInspectionRecord) { |
| | | this.removeById(deviceInspectionRecord); |
| | | deviceInspectionRecordDetailsService.remove(Wrappers.<DeviceInspectionRecordDetails>lambdaQuery().eq(DeviceInspectionRecordDetails::getInspectionRecordId, deviceInspectionRecord.getInspectionRecordId())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 夿 ¸ç¹æ£è®°å½ |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result reviewDeviceInspectionRecord(DeviceInspectionRecordDto dto) { |
| | | LambdaUpdateWrapper<DeviceInspectionRecord> wrapper = Wrappers.<DeviceInspectionRecord>lambdaUpdate() |
| | | .eq(DeviceInspectionRecord::getInspectionRecordId, dto.getInspectionRecordId()) |
| | | .set(DeviceInspectionRecord::getStatus, dto.getStatus()) |
| | | .set(DeviceInspectionRecord::getReviewerRemark, dto.getReviewerRemark()); |
| | | |
| | | // 为0æ¸
é¤å®¡æ ¸äºº |
| | | if (dto.getStatus().equals(0)) { |
| | | wrapper.set(DeviceInspectionRecord::getReviewerId, null) |
| | | .set(DeviceInspectionRecord::getReviewer, null); |
| | | } |
| | | this.update(wrapper); |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ç¹æ£è®°å½ |
| | | * |
| | | * @param deviceInspectionRecordId 设å¤ç¹æ£è®°å½id |
| | | * @param response ååº |
| | | */ |
| | | @Override |
| | | public Result exportDeviceInspectionRecord(Integer deviceInspectionRecordId, HttpServletResponse response) { |
| | | DeviceInspectionRecord deviceInspectionRecord = baseMapper.selectById(deviceInspectionRecordId); |
| | | DeviceInspectionRecordDto deviceInspectionRecordDto = new DeviceInspectionRecordDto(); |
| | | BeanUtils.copyProperties(deviceInspectionRecord, deviceInspectionRecordDto); |
| | | DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | deviceInspectionRecordDto.setTestDateString(deviceInspectionRecord.getTestDate() == null ? null : deviceInspectionRecord.getTestDate().format(dateFormatter)); |
| | | |
| | | List<DeviceInspectionRecordDetails> deviceInspectionRecordDetailsList = deviceInspectionRecordDetailsService.list(Wrappers.<DeviceInspectionRecordDetails>lambdaQuery().eq(DeviceInspectionRecordDetails::getInspectionRecordId, deviceInspectionRecordId)); |
| | | |
| | | Integer deviceId = deviceInspectionRecord.getDeviceId(); |
| | | |
| | | Device device = deviceMapper.selectById(deviceId); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-inspection-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceInspectionRecordDetailsList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceInspectionRecord", deviceInspectionRecordDto); |
| | | put("deviceInspectionRecordDetailsList", deviceInspectionRecordDetailsList); |
| | | put("device", device); |
| | | put("recorderUrl", UserUtils.getFinalUserSignatureUrl(deviceInspectionRecordDto.getRecorderId())); |
| | | put("reviewerUrl", UserUtils.getFinalUserSignatureUrl(deviceInspectionRecordDto.getReviewerId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | device.getDeviceName() + "ç¹æ£è®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceLeaseMapper; |
| | | import com.yuanchu.mom.pojo.DeviceLease; |
| | | import com.yuanchu.mom.service.IDeviceLeaseService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DeviceLeaseServiceImpl extends ServiceImpl<DeviceLeaseMapper, DeviceLease> implements IDeviceLeaseService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceLogMapper; |
| | | import com.yuanchu.mom.pojo.DeviceLog; |
| | | import com.yuanchu.mom.service.IDeviceLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogMapper, DeviceLog> implements IDeviceLogService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.excel.DeviceMaintenanceExport; |
| | | import com.yuanchu.mom.mapper.DeviceMaintenanceMapper; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenance; |
| | | import com.yuanchu.mom.service.DeviceMaintenanceService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class DeviceMaintenanceImpl extends ServiceImpl<DeviceMaintenanceMapper, DeviceMaintenance> implements DeviceMaintenanceService { |
| | | @Resource |
| | | DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceMaintenance> getDeviceMaintenancePage(Page page, Integer deviceId, String deviceNumber) { |
| | | return baseMapper.selectPage(page, Wrappers.<DeviceMaintenance>lambdaQuery() |
| | | .eq(DeviceMaintenance::getDeviceId, deviceId) |
| | | .like(DeviceMaintenance::getDeviceNumber, deviceNumber)); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceMaintenanceExport> deviceMaintenanceExport(Integer deviceId) { |
| | | return baseMapper.deviceMaintenanceExport(deviceId); |
| | | } |
| | | |
| | | @Override |
| | | public void exportMaintenanceRecord(Integer deviceId, HttpServletResponse response) { |
| | | // æ¥è¯¢cnas设å¤ç»´ä¿®è®°å½ |
| | | List<DeviceMaintenance> deviceMaintenanceList = baseMapper.selectList(Wrappers.<DeviceMaintenance>lambdaQuery() |
| | | .eq(DeviceMaintenance::getDeviceId, deviceId) |
| | | .select(DeviceMaintenance::getDate, |
| | | DeviceMaintenance::getDeviceNumber, |
| | | DeviceMaintenance::getDeviceName, |
| | | DeviceMaintenance::getManagementNumber, |
| | | DeviceMaintenance::getContent, |
| | | DeviceMaintenance::getName, |
| | | DeviceMaintenance::getComments)); |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/maintenance-records.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceMaintenanceList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | // è·åè®¾å¤ åç§° å ç¼å· |
| | | DeviceMaintenance deviceMaintenance = deviceMaintenanceList.get(0); |
| | | String deviceName = deviceMaintenance.getDeviceName(); |
| | | String managementNumber = deviceMaintenance.getManagementNumber(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceMaintenanceList", deviceMaintenanceList); |
| | | put("deviceName", deviceName); |
| | | put("managementNumber", managementNumber); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "设å¤ç»´æ¤ä¿å
»è®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | // @Override |
| | | // public List<DeviceMaintenance> getDeviceMaintenanceParam() { |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // map.put("head",PrintChina.printChina(DeviceMaintenance.class)); |
| | | // IPage<DeviceMaintenance> iPage = deviceMaintenanceMapper.getDeviceMaintenanceParam(page, QueryWrappers.queryWrappers(itemParameter)); |
| | | // map.put("body",page); |
| | | // return deviceMaintenanceMapper.getDeviceMaintenanceParam(); |
| | | // } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceMaintenancePlanDetailsMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlanDetails; |
| | | import com.yuanchu.mom.service.DeviceMaintenancePlanDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:11:46 |
| | | */ |
| | | @Service |
| | | public class DeviceMaintenancePlanDetailsServiceImpl extends ServiceImpl<DeviceMaintenancePlanDetailsMapper, DeviceMaintenancePlanDetails> implements DeviceMaintenancePlanDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceMaintenancePlanDetailsDto; |
| | | import com.yuanchu.mom.dto.DeviceMaintenancePlanDto; |
| | | import com.yuanchu.mom.mapper.DeviceMaintenancePlanDetailsMapper; |
| | | import com.yuanchu.mom.mapper.DeviceMaintenancePlanMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlan; |
| | | import com.yuanchu.mom.pojo.DeviceMaintenancePlanDetails; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceMaintenancePlanDetailsService; |
| | | import com.yuanchu.mom.service.DeviceMaintenancePlanService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤ä¿å
»è®¡å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-16 06:10:52 |
| | | */ |
| | | @Service |
| | | public class DeviceMaintenancePlanServiceImpl extends ServiceImpl<DeviceMaintenancePlanMapper, DeviceMaintenancePlan> implements DeviceMaintenancePlanService { |
| | | |
| | | @Resource |
| | | private DeviceMaintenancePlanDetailsService deviceMaintenancePlanDetailsService; |
| | | |
| | | @Resource |
| | | private DeviceMaintenancePlanDetailsMapper deviceMaintenancePlanDetailsMapper; |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param page |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result<IPage<DeviceMaintenancePlan>> selectDeviceMaintenancePlanByPage(IPage page, DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | IPage<DeviceMaintenancePlan> iPage = baseMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceMaintenancePlanDto)); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public Result addMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | deviceMaintenancePlanDto.setCompilerId(userId); |
| | | deviceMaintenancePlanDto.setCompiler(user.getName()); |
| | | deviceMaintenancePlanDto.setDatePreparation(LocalDateTime.now()); |
| | | |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceMaintenancePlanDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceMaintenancePlanDto.getAuditId()); |
| | | deviceMaintenancePlanDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceMaintenancePlanDto); |
| | | |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceMaintenancePlanDetailsDto> deviceMaintenancePlanDetails = deviceMaintenancePlanDto.getDeviceMaintenancePlanDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceMaintenancePlanDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceMaintenancePlanDetails> collect = deviceMaintenancePlanDetails.stream().map(deviceMaintenancePlanDetail -> { // éå详æ
|
| | | deviceMaintenancePlanDetail.setDeviceId(deviceMaintenancePlanDto.getDeviceId()); // 设å¤ID |
| | | deviceMaintenancePlanDetail.setMaintenancePlanId(deviceMaintenancePlanDto.getMaintenancePlanId()); // ä¿å
»è®¡åID |
| | | DeviceMaintenancePlanDetails planDetails = new DeviceMaintenancePlanDetails(); |
| | | BeanUtils.copyProperties(deviceMaintenancePlanDetail, planDetails); |
| | | return planDetails; |
| | | }).collect(Collectors.toList()); |
| | | deviceMaintenancePlanDetailsService.saveBatch(collect); |
| | | } |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤ä¿å
»è®¡å |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public Result updateMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceMaintenancePlanDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceMaintenancePlanDto.getAuditId()); |
| | | deviceMaintenancePlanDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceMaintenancePlanDto); |
| | | |
| | | // å é¤åæ¬ç详æ
|
| | | deviceMaintenancePlanDetailsService.remove(Wrappers.<DeviceMaintenancePlanDetails>lambdaQuery().eq(DeviceMaintenancePlanDetails::getMaintenancePlanId, deviceMaintenancePlanDto.getMaintenancePlanId())); |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceMaintenancePlanDetailsDto> deviceMaintenancePlanDetails = deviceMaintenancePlanDto.getDeviceMaintenancePlanDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceMaintenancePlanDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceMaintenancePlanDetails> collect = deviceMaintenancePlanDetails.stream().map(deviceMaintenancePlanDetail -> { // éå详æ
|
| | | deviceMaintenancePlanDetail.setDeviceId(deviceMaintenancePlanDto.getDeviceId()); // 设å¤ID |
| | | deviceMaintenancePlanDetail.setMaintenancePlanId(deviceMaintenancePlanDto.getMaintenancePlanId()); // ä¿å
»è®¡åID |
| | | DeviceMaintenancePlanDetails planDetails = new DeviceMaintenancePlanDetails(); |
| | | BeanUtils.copyProperties(deviceMaintenancePlanDetail, planDetails); |
| | | return planDetails; |
| | | }).collect(Collectors.toList()); |
| | | deviceMaintenancePlanDetailsService.saveBatch(collect); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public Result deleteMaintenancePlan(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | this.removeById(deviceMaintenancePlanDto); |
| | | deviceMaintenancePlanDetailsService.remove(Wrappers.<DeviceMaintenancePlanDetails>lambdaQuery().eq(DeviceMaintenancePlanDetails::getMaintenancePlanId, deviceMaintenancePlanDto.getMaintenancePlanId())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | * @param response ååº |
| | | */ |
| | | @Override |
| | | public Result exportDeviceMaintenancePlanDto(Integer maintenancePlanId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | DeviceMaintenancePlanDto deviceMaintenancePlan = baseMapper.selectMaintenancePlanById(maintenancePlanId); |
| | | |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | List<DeviceMaintenancePlanDetailsDto> deviceMaintenancePlanDetailsDtoList = deviceMaintenancePlanDetailsMapper.deviceInspectionRecordDetailsList(maintenancePlanId); |
| | | // 设置åºå· |
| | | deviceMaintenancePlanDetailsDtoList.forEach(deviceInspectionRecordDetails -> { |
| | | deviceInspectionRecordDetails.setIndex(deviceMaintenancePlanDetailsDtoList.indexOf(deviceInspectionRecordDetails) + 1); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/maintenance-plan.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceMaintenancePlanDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceMaintenancePlan", deviceMaintenancePlan); |
| | | put("deviceMaintenancePlanDetailsDtoList", deviceMaintenancePlanDetailsDtoList); |
| | | // ç¼å¶äººç¾åå°å |
| | | put("compilerUrl", UserUtils.getFinalUserSignatureUrl(deviceMaintenancePlan.getCompilerId())); |
| | | // å®¡æ ¸äººç¾åå°å |
| | | put("auditUrl", UserUtils.getFinalUserSignatureUrl(deviceMaintenancePlan.getAuditId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "设å¤ä¿å
»è®¡å表", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | * |
| | | * @param maintenancePlanId 设å¤ä¿å
»è®¡åid |
| | | */ |
| | | @Override |
| | | public Result<DeviceMaintenancePlanDto> getMaintenancePlanDetail(Integer maintenancePlanId) { |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | DeviceMaintenancePlan deviceMaintenancePlan = baseMapper.selectById(maintenancePlanId); |
| | | // æ¥è¯¢è¯¦æ
|
| | | DeviceMaintenancePlanDto deviceMaintenancePlanDto = new DeviceMaintenancePlanDto(); |
| | | BeanUtils.copyProperties(deviceMaintenancePlan, deviceMaintenancePlanDto); |
| | | deviceMaintenancePlanDto.setDeviceMaintenancePlanDetails(deviceMaintenancePlanDetailsMapper.deviceInspectionRecordDetailsList(maintenancePlanId)); |
| | | return Result.success(deviceMaintenancePlanDto); |
| | | } |
| | | |
| | | /** |
| | | * å®¡æ ¸è®¾å¤ä¿å
»è®¡å |
| | | * |
| | | * @param deviceMaintenancePlanDto 设å¤ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public Result reviewMaintenancePlanStatus(DeviceMaintenancePlanDto deviceMaintenancePlanDto) { |
| | | LambdaUpdateWrapper<DeviceMaintenancePlan> wrapper = Wrappers.<DeviceMaintenancePlan>lambdaUpdate() |
| | | .eq(DeviceMaintenancePlan::getMaintenancePlanId, deviceMaintenancePlanDto.getMaintenancePlanId()) |
| | | .set(DeviceMaintenancePlan::getStatus, deviceMaintenancePlanDto.getStatus()) // å®¡æ ¸ç¶æ |
| | | .set(DeviceMaintenancePlan::getAuditRemark, deviceMaintenancePlanDto.getAuditRemark());// å®¡æ ¸å¤æ³¨ |
| | | |
| | | // 为0æ¸
é¤å®¡æ ¸äºº |
| | | if (deviceMaintenancePlanDto.getStatus().equals(0)) { |
| | | wrapper.set(DeviceMaintenancePlan::getAuditId, null) |
| | | .set(DeviceMaintenancePlan::getAudit, null); |
| | | } |
| | | this.update(wrapper); // æ´æ° |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceMetricRecordMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMetricRecord; |
| | | import com.yuanchu.mom.service.DeviceMetricRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | @Service |
| | | public class DeviceMetricRecordServiceImpl extends ServiceImpl<DeviceMetricRecordMapper, DeviceMetricRecord> implements DeviceMetricRecordService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceMetricMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMetric; |
| | | import com.yuanchu.mom.service.IDeviceMetricService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DeviceMetricServiceImpl extends ServiceImpl<DeviceMetricMapper, DeviceMetric> implements IDeviceMetricService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceMetricsCopyMapper; |
| | | import com.yuanchu.mom.pojo.DeviceMetricsCopy; |
| | | import com.yuanchu.mom.service.DeviceMetricsCopyService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | @Service |
| | | public class DeviceMetricsCopyServiceImpl extends ServiceImpl<DeviceMetricsCopyMapper, DeviceMetricsCopy> implements DeviceMetricsCopyService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceRecordDto; |
| | | import com.yuanchu.mom.dto.DeviceRecordExportWord; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.DeviceRecordMapper; |
| | | import com.yuanchu.mom.mapper.LaboratoryMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.DeviceRecord; |
| | | import com.yuanchu.mom.service.DeviceRecordService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | @Service |
| | | public class DeviceRecordServiceImpl extends ServiceImpl<DeviceRecordMapper, DeviceRecord> implements DeviceRecordService { |
| | | @Resource |
| | | private LaboratoryMapper laboratoryMapper; |
| | | @Resource |
| | | private DeviceMapper deviceMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | @Override |
| | | public IPage<DeviceRecordDto> deviceRecordPage(Integer deviceId, Page page, String sampleCode, String managementNumber) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("deviceRecordPage"); |
| | | Integer userId = null; |
| | | if (map1.get("look") == 1) { |
| | | //个人 |
| | | userId = map1.get("userId"); |
| | | } |
| | | |
| | | return baseMapper.deviceRecordPage(deviceId, page, sampleCode, managementNumber, userId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void exportUseRecord(Integer deviceId, String exportDate, HttpServletResponse response) { |
| | | // æ¥è¯¢cnas设å¤ä½¿ç¨è®°å½ |
| | | List<DeviceRecord> deviceList = baseMapper.selectExportList(deviceId, exportDate); |
| | | // 设å¤ä¿¡æ¯ |
| | | Device device = deviceMapper.selectById(deviceId); |
| | | |
| | | |
| | | // æ¥è¯¢è®¾å¤å±äºåªä¸ªå®éªå®¤ |
| | | String laboratoryName = "è£
å¤çº¿ç¼å®éªå®¤"; |
| | | |
| | | // è¦æ å°å°wordæ°æ® |
| | | List<DeviceRecordExportWord> deviceExportList = new ArrayList<>(); |
| | | // deviceExportList èµå¼ |
| | | for (DeviceRecord deviceRecord : deviceList) { |
| | | // å¤çè®¾å¤ å¼å§ä½¿ç¨æ¶é´ å ç»ææ¶é´ |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | String operationDate = ""; |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); |
| | | if (deviceRecord.getUseStartDate() != null) { |
| | | startTime = deviceRecord.getUseStartDate().format(formatter); |
| | | endTime = deviceRecord.getUseEndDate().format(formatter); |
| | | String[] startTimeSplit = startTime.split(" "); |
| | | String[] endTimeSplit = endTime.split(" "); |
| | | startTime = startTimeSplit[1]; |
| | | if (startTimeSplit[0].equals(endTimeSplit[0])) { |
| | | endTime = endTimeSplit[1]; |
| | | } else { |
| | | endTime = endTimeSplit[0] + '\n' + endTimeSplit[1]; |
| | | } |
| | | DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy.M.d"); |
| | | operationDate = deviceRecord.getUseStartDate().format(formatter2); |
| | | } |
| | | // å¤ç使ç¨åå使ç¨å |
| | | String useBeforeString = deviceRecord.getUseBefore() == 0? "å¼å¸¸" : "è¯å¥½"; |
| | | String useAfterString = deviceRecord.getUseAfter() == 0 ? "å¼å¸¸" : "è¯å¥½"; |
| | | |
| | | DeviceRecordExportWord deviceRecordExportWord = new DeviceRecordExportWord(); |
| | | // è¿è¡èµå¼ |
| | | BeanUtils.copyProperties(deviceRecord, deviceRecordExportWord); |
| | | deviceRecordExportWord.setUseBeforeString(useBeforeString); // 使ç¨å |
| | | deviceRecordExportWord.setUseAfterString(useAfterString); // 使ç¨å |
| | | deviceRecordExportWord.setOperationDate(operationDate); // è®¾å¤æä½æ¥æ |
| | | deviceRecordExportWord.setUseStartDateString(startTime); // å¼å§æ¶é´ |
| | | deviceRecordExportWord.setUseEndDateString(endTime); // ç»ææ¶é´ |
| | | deviceExportList.add(deviceRecordExportWord); |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/use-record.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("useRecord", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | String deviceName = device.getDeviceName(); |
| | | String managementNumber = device.getManagementNumber(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("useRecord", deviceExportList); |
| | | put("deviceName", deviceName); |
| | | put("managementNumber", managementNumber); |
| | | put("laboratory", laboratoryName); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "仪å¨ä½¿ç¨è®°å½è¡¨", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | 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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceScrappedDto; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.DeviceScrappedMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.pojo.DeviceScrapped; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceScrappedService; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ¥åºç³è¯·è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-17 01:53:47 |
| | | */ |
| | | @Service |
| | | public class DeviceScrappedServiceImpl extends ServiceImpl<DeviceScrappedMapper, DeviceScrapped> implements DeviceScrappedService { |
| | | |
| | | @Resource |
| | | private DeviceMapper deivceMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | |
| | | /** |
| | | * è®¾å¤æ¥åºç³è¯·å表 |
| | | * |
| | | * @param deviceScrapped |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<DeviceScrapped> pageDeviceScrapped(Page page, DeviceScrapped deviceScrapped) { |
| | | return baseMapper.pageDeviceScrapped(page, QueryWrappers.queryWrappers(deviceScrapped)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤æ¥åºç³è¯· |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addDeviceScrapped(DeviceScrapped deviceScrapped) { |
| | | DeviceScrapped scrapped = new DeviceScrapped(); |
| | | // å½åç»å½ç¨æ·ä¿¡æ¯åé¨é¨ |
| | | User user = userMapper.selectById(getLook.selectPowerByMethodAndUserId(null).get("userId")); |
| | | switch (deviceScrapped.getFlowType()) { |
| | | case 0: |
| | | BeanUtils.copyProperties(deviceScrapped, scrapped); |
| | | // ç³è¯· |
| | | scrapped.setReasonsForScrap(deviceScrapped.getReasonsForScrap()); |
| | | scrapped.setApplicantUserId(user.getId()); |
| | | scrapped.setApplicantUser(user.getName()); |
| | | scrapped.setApplicantDate(LocalDate.now()); |
| | | |
| | | // å¤çäººä¿¡æ¯ |
| | | User departmentHeadUser = userMapper.selectById(deviceScrapped.getDepartmentHeadUserId()); |
| | | scrapped.setApplicantUserId(departmentHeadUser.getId()); |
| | | scrapped.setApplicantUser(departmentHeadUser.getName()); |
| | | |
| | | baseMapper.insert(scrapped); |
| | | break; |
| | | case 1: |
| | | scrapped.setScrappedId(deviceScrapped.getScrappedId()); |
| | | // ç³è¯·é¨é¨è´è´£äººæè§ |
| | | scrapped.setDepartmentHeadOpinion(deviceScrapped.getDepartmentHeadOpinion()); |
| | | scrapped.setDepartmentHeadDate(LocalDate.now()); |
| | | |
| | | // 计éå®¤ä¿¡æ¯ |
| | | User meteringRoomUser = userMapper.selectById(deviceScrapped.getMeteringRoomUserId()); |
| | | scrapped.setMeteringRoomUserId(meteringRoomUser.getId()); |
| | | scrapped.setMeteringRoomUser(meteringRoomUser.getName()); |
| | | |
| | | baseMapper.updateById(scrapped); |
| | | break; |
| | | case 2: |
| | | scrapped.setScrappedId(deviceScrapped.getScrappedId()); |
| | | // 计é室æè§ |
| | | scrapped.setMeteringRoomOpinion(deviceScrapped.getMeteringRoomOpinion()); |
| | | scrapped.setMeteringRoomDate(LocalDate.now()); |
| | | |
| | | // æ¹åäººä¿¡æ¯ |
| | | User approverUser = userMapper.selectById(deviceScrapped.getApproverUserId()); |
| | | scrapped.setApproverUserId(approverUser.getId()); |
| | | scrapped.setApproverUser(approverUser.getName()); |
| | | |
| | | baseMapper.updateById(scrapped); |
| | | break; |
| | | case 3: |
| | | scrapped.setScrappedId(deviceScrapped.getScrappedId()); |
| | | //æ¹å人 |
| | | scrapped.setApproverOpinion(deviceScrapped.getApproverOpinion()); |
| | | scrapped.setApproverDate(LocalDate.now()); |
| | | scrapped.setIsFinish(1); |
| | | baseMapper.updateById(scrapped); |
| | | break; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤æ¥åºç³è¯· |
| | | * |
| | | * @param scrappedId è®¾å¤æ¥åºç³è¯·id |
| | | * @param response ååº |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public Result<?> exportDeviceScrapped(Integer scrappedId, HttpServletResponse response) { |
| | | // æ¥è¯¢æ¥åºæ°æ® |
| | | DeviceScrappedDto deviceScrapped = baseMapper.selectDeviceScrappedById(scrappedId); |
| | | if (deviceScrapped == null) { |
| | | return Result.fail("è®¾å¤æ¥åºç³è¯·ä¸åå¨"); |
| | | } |
| | | Device device = null; |
| | | if (deviceScrapped.getDeviceId() != null) { |
| | | device = deivceMapper.selectById(deviceScrapped.getDeviceId()); |
| | | device = device == null ? new Device() : device; |
| | | } |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-scrapped.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | Device finalDevice = device; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceScrapped", deviceScrapped); |
| | | put("device", finalDevice); |
| | | // ç³è¯·äººç¾å |
| | | put("applicantUrl", UserUtils.getFinalUserSignatureUrl(deviceScrapped.getApplicantUserId())); |
| | | // é¨é¨è´è´£äººç¾å |
| | | put("headUrl", UserUtils.getFinalUserSignatureUrl(deviceScrapped.getDepartmentHeadUserId())); |
| | | // 计é室ç¾å |
| | | put("metrologyRoomUrl", UserUtils.getFinalUserSignatureUrl(deviceScrapped.getMeteringRoomUserId())); |
| | | // æ¹å人ç¾å |
| | | put("approverUrl", UserUtils.getFinalUserSignatureUrl(deviceScrapped.getApproverUserId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String deviceName = device.getDeviceName() == null ? "" : device.getDeviceName(); |
| | | String fileName = URLEncoder.encode( |
| | | deviceName + "è®¾å¤æ¥åºç³è¯·", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectDeviceParameter(Page page, DeviceDto itemParameter) { |
| | | public Map<String, Object> selectDeviceParameter(Page page, DeviceDto itemParameter,Boolean laboratoryNameIsNull) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(DeviceDto.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectDeviceParameter"); |
| | | if (map1.get("look") == 1) itemParameter.setCreateUser(map1.get("userId")); |
| | | IPage<DeviceDto> iPage = deviceMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(itemParameter)); |
| | | IPage<DeviceDto> iPage = deviceMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(itemParameter),laboratoryNameIsNull); |
| | | map.put("body", iPage); |
| | | return map; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.yuanchu.mom.dto.DeviceStateDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.DeviceStateMapper; |
| | | import com.yuanchu.mom.mapper.LaboratoryMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.DeviceState; |
| | | import com.yuanchu.mom.pojo.Laboratory; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceStateService; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | @Service |
| | | public class DeviceStateServiceImpl extends ServiceImpl<DeviceStateMapper, DeviceState> implements DeviceStateService { |
| | | |
| | | @Resource |
| | | private LaboratoryMapper laboratoryMapper; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<DeviceStateDto> getDeviceStatePage(Integer deviceId, Page page, String processNumber) { |
| | | return baseMapper.getDeviceStatePage(deviceId, page, processNumber); |
| | | } |
| | | |
| | | @Override |
| | | public void exportDeviceStatus(Integer deviceId, String processNumber, HttpServletResponse response) { |
| | | // æ ¹æ®æµç¨ç¼å· æ¥è¯¢cnas设å¤ç¶æ |
| | | DeviceStateDto deviceStateDto = baseMapper.getDeviceStatePage(deviceId,new Page<DeviceStateDto>(1,1), processNumber).getRecords().get(0); |
| | | |
| | | // 对æ¶é´è¿è¡ä¿®æ¹ |
| | | DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"); |
| | | deviceStateDto.setSubmitDateString(deviceStateDto.getSubmitDate() != null ? deviceStateDto.getSubmitDate().format(format) : " å¹´ æ æ¥"); |
| | | deviceStateDto.setDepartmentDateString(deviceStateDto.getDepartmentDate() != null? deviceStateDto.getDepartmentDate().format(format) : " å¹´ æ æ¥"); |
| | | deviceStateDto.setMeasuringRoomDateString(deviceStateDto.getMeasuringRoomDate() != null? deviceStateDto.getMeasuringRoomDate().format(format) : " å¹´ æ æ¥"); |
| | | deviceStateDto.setApprovalDateString(deviceStateDto.getApprovalDate() != null? deviceStateDto.getApprovalDate().format(format) : " å¹´ æ æ¥"); |
| | | |
| | | // æ¥è¯¢è®¾å¤å±äºåªä¸ªå®éªå®¤ |
| | | String laboratoryName; |
| | | String largeCategory = deviceStateDto.getLargeCategory(); |
| | | if (StringUtils.isNotBlank(largeCategory)) { |
| | | largeCategory = largeCategory.substring(0, 1); |
| | | Laboratory laboratory = laboratoryMapper.selectOne(Wrappers.<Laboratory>lambdaQuery() |
| | | .eq(Laboratory::getLaboratoryNumber, largeCategory) |
| | | .select(Laboratory::getLaboratoryName)); |
| | | laboratoryName = laboratory.getLaboratoryName(); |
| | | } else { |
| | | laboratoryName = ""; |
| | | } |
| | | |
| | | //todo: 设å¤ç¶ææ¥è¯¢ç¾åå°å ææ¶äººåæ¥è¯¢ |
| | | //è·åç³è¯·äººçç¾åå°å |
| | | String applicantUrl = null; |
| | | if (deviceStateDto.getSubmitOperatingPersonnel() != null) { |
| | | applicantUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, deviceStateDto.getSubmitOperatingPersonnel())) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(applicantUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ç³è¯·äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åé¨é¨è´è´£äººçç¾åå°å |
| | | String headOfDepartmentUrl = null; |
| | | if (deviceStateDto.getDepartmentNextPesponsible() != null) { |
| | | headOfDepartmentUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, deviceStateDto.getDepartmentNextPesponsible())) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(headOfDepartmentUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°é¨é¨è´è´£äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·å计é室夿µäººçç¾åå°å |
| | | String measurementRoomUrl = null; |
| | | if (deviceStateDto.getMeasuringRoomNextPesponsible() != null) { |
| | | measurementRoomUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, deviceStateDto.getMeasuringRoomNextPesponsible())) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(measurementRoomUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°è®¡é室夿µäººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | //è·åæ¹å人çç¾åå°å |
| | | String approvedUrl = null; |
| | | if (deviceStateDto.getApprovalNextPesponsible() != null) { |
| | | approvedUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, deviceStateDto.getApprovalNextPesponsible())) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(approvedUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/device-status.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | String finalApplicantUrl = applicantUrl; // ç³è¯·äººçç¾åå°å |
| | | String finalHeadOfDepartmentUrl = headOfDepartmentUrl; // é¨é¨è´è´£äººçç¾åå°å |
| | | String finalMeasurementRoomUrl = measurementRoomUrl; // 计é室夿µäººçç¾åå°å |
| | | String finalApprovedUrl = approvedUrl; // æ¹å人çç¾åå°å |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceStateDto", deviceStateDto); |
| | | put("submitOperatingPersonnelUrl", StringUtils.isNotBlank(finalApplicantUrl) ? Pictures.ofLocal(imgUrl + "/" + finalApplicantUrl).create() : null); |
| | | put("departmentNextPesponsibleUrl", StringUtils.isNotBlank(finalHeadOfDepartmentUrl) ? Pictures.ofLocal(imgUrl + "/" + finalHeadOfDepartmentUrl).create() : null); |
| | | put("measuringRoomNextPesponsibleUrl", StringUtils.isNotBlank(finalMeasurementRoomUrl) ? Pictures.ofLocal(imgUrl + "/" + finalMeasurementRoomUrl).create() : null); |
| | | put("approvalNextPesponsibleUrl", StringUtils.isNotBlank(finalApprovedUrl) ? Pictures.ofLocal(imgUrl + "/" + finalApprovedUrl).create() : null); |
| | | put("laboratory", laboratoryName); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "设å¤ç»´æ¤ä¿å
»è®°å½", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DeviceTraceabilityManagementDetailsMapper; |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagementDetails; |
| | | import com.yuanchu.mom.service.DeviceTraceabilityManagementDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å详æ
表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:58 |
| | | */ |
| | | @Service |
| | | public class DeviceTraceabilityManagementDetailsServiceImpl extends ServiceImpl<DeviceTraceabilityManagementDetailsMapper, DeviceTraceabilityManagementDetails> implements DeviceTraceabilityManagementDetailsService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.DeviceTraceabilityManagementDetailsDto; |
| | | import com.yuanchu.mom.dto.DeviceTraceabilityManagementDto; |
| | | import com.yuanchu.mom.mapper.DeviceTraceabilityManagementDetailsMapper; |
| | | import com.yuanchu.mom.mapper.DeviceTraceabilityManagementMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagement; |
| | | import com.yuanchu.mom.pojo.DeviceTraceabilityManagementDetails; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.DeviceTraceabilityManagementDetailsService; |
| | | import com.yuanchu.mom.service.DeviceTraceabilityManagementService; |
| | | import com.yuanchu.mom.utils.HackLoopTableRenderPolicy; |
| | | import com.yuanchu.mom.utils.UserUtils; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤é弿º¯æºè®¡å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-12-20 02:27:44 |
| | | */ |
| | | @Service |
| | | public class DeviceTraceabilityManagementServiceImpl extends ServiceImpl<DeviceTraceabilityManagementMapper, DeviceTraceabilityManagement> implements DeviceTraceabilityManagementService { |
| | | |
| | | @Resource |
| | | private DeviceTraceabilityManagementDetailsService deviceTraceabilityManagementDetailsService; |
| | | |
| | | @Resource |
| | | private DeviceTraceabilityManagementDetailsMapper deviceTraceabilityManagementDetailsMapper; |
| | | |
| | | @Resource |
| | | private GetLook getLook; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param page |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result<IPage<DeviceTraceabilityManagement>> selectDeviceTraceabilityManagementByPage(IPage page, DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | IPage<DeviceTraceabilityManagement> iPage = baseMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(deviceTraceabilityManagementDto)); |
| | | return Result.success(iPage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param deviceTraceabilityManagementDto 设å¤é弿º¯æºè®¡å |
| | | */ |
| | | @Override |
| | | public Result addTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | deviceTraceabilityManagementDto.setCompilerId(userId); |
| | | deviceTraceabilityManagementDto.setCompiler(user.getName()); |
| | | deviceTraceabilityManagementDto.setDatePreparation(LocalDateTime.now()); |
| | | |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceTraceabilityManagementDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceTraceabilityManagementDto.getAuditId()); |
| | | deviceTraceabilityManagementDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceTraceabilityManagementDto); |
| | | |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetails = deviceTraceabilityManagementDto.getDeviceTraceabilityManagementDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceTraceabilityManagementDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceTraceabilityManagementDetails> collect = deviceTraceabilityManagementDetails.stream().map(detailsDto -> { |
| | | detailsDto.setTraceabilityManagementId(deviceTraceabilityManagementDto.getTraceabilityManagementId()); // é弿º¯æºè®¡åID |
| | | DeviceTraceabilityManagementDetails details = new DeviceTraceabilityManagementDetails(); |
| | | BeanUtils.copyProperties(detailsDto, details); |
| | | return details; |
| | | }).collect(Collectors.toList()); |
| | | deviceTraceabilityManagementDetailsService.saveBatch(collect); |
| | | } |
| | | |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param deviceTraceabilityManagementDto 设å¤é弿º¯æºè®¡å |
| | | */ |
| | | @Override |
| | | public Result updateTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | // æ¥è¯¢å®¡æ ¸äººid |
| | | if (deviceTraceabilityManagementDto.getAuditId() != null) { |
| | | User auditUser = userMapper.selectById(deviceTraceabilityManagementDto.getAuditId()); |
| | | deviceTraceabilityManagementDto.setAudit(auditUser.getName()); |
| | | } |
| | | this.saveOrUpdate(deviceTraceabilityManagementDto); |
| | | |
| | | // å é¤åæ¬ç详æ
|
| | | deviceTraceabilityManagementDetailsService.remove(Wrappers.<DeviceTraceabilityManagementDetails>lambdaQuery().eq(DeviceTraceabilityManagementDetails::getTraceabilityManagementId, deviceTraceabilityManagementDto.getTraceabilityManagementId())); |
| | | // 详æ
èµå¼å¹¶ä¿å |
| | | List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetails = deviceTraceabilityManagementDto.getDeviceTraceabilityManagementDetails(); |
| | | if (CollectionUtils.isNotEmpty(deviceTraceabilityManagementDetails)) { // 详æ
ä¸ä¸ºç©º |
| | | List<DeviceTraceabilityManagementDetails> collect = deviceTraceabilityManagementDetails.stream().map(detailsDto -> { |
| | | detailsDto.setTraceabilityManagementId(deviceTraceabilityManagementDto.getTraceabilityManagementId()); // é弿º¯æºè®¡åID |
| | | DeviceTraceabilityManagementDetails details = new DeviceTraceabilityManagementDetails(); |
| | | BeanUtils.copyProperties(detailsDto, details); |
| | | return details; |
| | | }).collect(Collectors.toList()); |
| | | deviceTraceabilityManagementDetailsService.saveBatch(collect); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param deviceTraceabilityManagementDto 设å¤é弿º¯æºè®¡å |
| | | */ |
| | | @Override |
| | | public Result deleteTraceabilityManagement(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | this.removeById(deviceTraceabilityManagementDto); |
| | | deviceTraceabilityManagementDetailsService.remove(Wrappers.<DeviceTraceabilityManagementDetails>lambdaQuery().eq(DeviceTraceabilityManagementDetails::getTraceabilityManagementId, deviceTraceabilityManagementDto.getTraceabilityManagementId())); |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤é弿º¯æºè®¡å详æ
|
| | | * |
| | | * @param traceabilityManagementId 设å¤é弿º¯æºè®¡åid |
| | | */ |
| | | @Override |
| | | public Result<DeviceTraceabilityManagementDto> getTraceabilityManagementDetail(Integer traceabilityManagementId) { |
| | | // æ¥è¯¢è®¾å¤é弿º¯æºè®¡å |
| | | DeviceTraceabilityManagement deviceTraceabilityManagement = baseMapper.selectById(traceabilityManagementId); |
| | | // æ¥è¯¢è¯¦æ
|
| | | DeviceTraceabilityManagementDto deviceTraceabilityManagementDto = new DeviceTraceabilityManagementDto(); |
| | | BeanUtils.copyProperties(deviceTraceabilityManagement, deviceTraceabilityManagementDto); |
| | | deviceTraceabilityManagementDto.setDeviceTraceabilityManagementDetails(deviceTraceabilityManagementDetailsMapper.deviceTraceabilityManagementDetailsList(traceabilityManagementId)); |
| | | return Result.success(deviceTraceabilityManagementDto); |
| | | } |
| | | |
| | | /** |
| | | * å®¡æ ¸è®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param deviceTraceabilityManagementDto 设å¤é弿º¯æºè®¡å |
| | | */ |
| | | @Override |
| | | public Result reviewTraceabilityManagementStatus(DeviceTraceabilityManagementDto deviceTraceabilityManagementDto) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | User user = userMapper.selectById(userId); |
| | | |
| | | LambdaUpdateWrapper<DeviceTraceabilityManagement> wrapper = Wrappers.<DeviceTraceabilityManagement>lambdaUpdate() |
| | | .eq(DeviceTraceabilityManagement::getTraceabilityManagementId, deviceTraceabilityManagementDto.getTraceabilityManagementId()) |
| | | .set(DeviceTraceabilityManagement::getAuditDate, LocalDateTime.now()) |
| | | .set(DeviceTraceabilityManagement::getAuditId, user.getId()) |
| | | .set(DeviceTraceabilityManagement::getAudit, user.getName()) |
| | | .set(DeviceTraceabilityManagement::getStatus, deviceTraceabilityManagementDto.getStatus()) // å®¡æ ¸ç¶æ |
| | | .set(DeviceTraceabilityManagement::getAuditRemark, deviceTraceabilityManagementDto.getAuditRemark());// å®¡æ ¸å¤æ³¨ |
| | | |
| | | // 为0æ¸
é¤å®¡æ ¸äºº |
| | | if (deviceTraceabilityManagementDto.getStatus().equals(0)) { |
| | | wrapper.set(DeviceTraceabilityManagement::getAuditId, null) |
| | | .set(DeviceTraceabilityManagement::getAudit, null); |
| | | } |
| | | this.update(wrapper); // æ´æ° |
| | | return Result.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤é弿º¯æºè®¡å |
| | | * |
| | | * @param traceabilityManagementId 设å¤é弿º¯æºè®¡åid |
| | | */ |
| | | @Override |
| | | public Result exportDeviceTraceabilityManagementDto(Integer traceabilityManagementId, HttpServletResponse response) { |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å |
| | | DeviceTraceabilityManagementDto deviceTraceabilityManagement = baseMapper.selectDeviceTraceabilityManagementById(traceabilityManagementId); |
| | | |
| | | // æ¥è¯¢è®¾å¤ä¿å
»è®¡å详æ
|
| | | List<DeviceTraceabilityManagementDetailsDto> deviceTraceabilityManagementDetailsDtoList = deviceTraceabilityManagementDetailsMapper.deviceTraceabilityManagementDetailsList(traceabilityManagementId); |
| | | // 设置åºå· |
| | | deviceTraceabilityManagementDetailsDtoList.forEach(deviceTraceabilityManagementDetails -> { |
| | | deviceTraceabilityManagementDetails.setIndex(deviceTraceabilityManagementDetailsDtoList.indexOf(deviceTraceabilityManagementDetails) + 1); |
| | | }); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/traceability-management-details.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("deviceTraceabilityManagementDetailsDtoList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("deviceTraceabilityManagement", deviceTraceabilityManagement); |
| | | put("deviceTraceabilityManagementDetailsDtoList", deviceTraceabilityManagementDetailsDtoList); |
| | | // ç¼å¶äººç¾åå°å |
| | | put("compilerUrl", UserUtils.getFinalUserSignatureUrl(deviceTraceabilityManagement.getCompilerId())); |
| | | // å®¡æ ¸äººç¾åå°å |
| | | put("auditUrl", UserUtils.getFinalUserSignatureUrl(deviceTraceabilityManagement.getAuditId())); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String finalFileName = deviceTraceabilityManagement.getFileName() == null ? "" : deviceTraceabilityManagement.getFileName() + "_"; |
| | | String fileName = URLEncoder.encode( |
| | | finalFileName+ "设å¤é弿º¯æºè®¡å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.DocumentDao; |
| | | import com.yuanchu.mom.pojo.Document; |
| | | import com.yuanchu.mom.service.DocumentService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DocumentServiceImpl extends ServiceImpl<DocumentDao, Document> implements DocumentService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.IncidentAcceptanceCheckMapper; |
| | | import com.yuanchu.mom.pojo.IncidentAcceptanceCheck; |
| | | import com.yuanchu.mom.service.IncidentAcceptanceCheckService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IncidentAcceptanceCheckServiceImpl extends ServiceImpl<IncidentAcceptanceCheckMapper, IncidentAcceptanceCheck> implements IncidentAcceptanceCheckService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.IncidentFileMapper; |
| | | import com.yuanchu.mom.pojo.IncidentFile; |
| | | import com.yuanchu.mom.service.IncidentFileService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IncidentFileServiceImpl extends ServiceImpl<IncidentFileMapper, IncidentFile> implements IncidentFileService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.IncidentInstallMapper; |
| | | import com.yuanchu.mom.pojo.IncidentInstall; |
| | | import com.yuanchu.mom.service.IncidentInstallService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IncidentInstallServiceImpl extends ServiceImpl<IncidentInstallMapper, IncidentInstall> implements IncidentInstallService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.yuanchu.mom.dto.IncidentReportAddDto; |
| | | import com.yuanchu.mom.dto.IncidentReportExportWordDto; |
| | | import com.yuanchu.mom.excel.IncidentReportExport; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.IncidentReportMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.*; |
| | | import com.yuanchu.mom.service.*; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶æ·»å éªæ¶å段表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 03:54:49 |
| | | */ |
| | | @Service |
| | | //@AllArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class IncidentReportServiceImpl extends ServiceImpl<IncidentReportMapper, IncidentReport> implements IncidentReportService { |
| | | |
| | | private UserMapper userMapper; |
| | | private IncidentSparePartsService incidentSparePartsService; |
| | | private IncidentFileService incidentFileService; |
| | | private IncidentInstallService incidentInstallService; |
| | | private IncidentAcceptanceCheckService incidentAcceptanceCheckService; |
| | | |
| | | private final NumberGenerator<IncidentReport> numberGenerator; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | public IncidentReportServiceImpl(UserMapper userMapper, IncidentSparePartsService incidentSparePartsService, IncidentFileService incidentFileService, IncidentInstallService incidentInstallService, IncidentAcceptanceCheckService incidentAcceptanceCheckService, NumberGenerator<IncidentReport> numberGenerator) { |
| | | this.userMapper = userMapper; |
| | | this.incidentSparePartsService = incidentSparePartsService; |
| | | this.incidentFileService = incidentFileService; |
| | | this.incidentInstallService = incidentInstallService; |
| | | this.incidentAcceptanceCheckService = incidentAcceptanceCheckService; |
| | | this.numberGenerator = numberGenerator; |
| | | } |
| | | |
| | | @Override |
| | | public void saveIncidentReportData(IncidentReportAddDto incidentReportAddDto) { |
| | | if (ObjectUtils.isEmpty(incidentReportAddDto.getProcessNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "DG-TC-07FM " + month + "-" + year + month, IncidentReport::getProcessNumber); |
| | | incidentReportAddDto.setProcessNumber(processNumber); |
| | | } |
| | | this.saveOrUpdate(incidentReportAddDto); |
| | | // å¤ä»¶ç¡®è®¤List |
| | | if (ObjectUtils.isNotEmpty(incidentReportAddDto.getSparePartsConfirmationList())) { |
| | | incidentReportAddDto.getSparePartsConfirmationList().forEach(i -> i.setIncidentId(incidentReportAddDto.getId())); |
| | | incidentSparePartsService.saveOrUpdateBatch(incidentReportAddDto.getSparePartsConfirmationList()); |
| | | } |
| | | // æä»¶ç¡®è®¤List |
| | | if (ObjectUtils.isNotEmpty(incidentReportAddDto.getFileClassConfirmationList())) { |
| | | incidentReportAddDto.getFileClassConfirmationList().forEach(i -> i.setIncidentId(incidentReportAddDto.getId())); |
| | | incidentFileService.saveOrUpdateBatch(incidentReportAddDto.getFileClassConfirmationList()); |
| | | } |
| | | // å®è£
éªæ¶è®°å½ |
| | | if (ObjectUtils.isNotEmpty(incidentReportAddDto.getInstallationAcceptanceRecordList())) { |
| | | incidentReportAddDto.getInstallationAcceptanceRecordList().forEach(i -> i.setIncidentId(incidentReportAddDto.getId())); |
| | | incidentInstallService.saveOrUpdateBatch(incidentReportAddDto.getInstallationAcceptanceRecordList()); |
| | | } |
| | | // éªæ¶æ ¸æ¥è®°å½ |
| | | if (ObjectUtils.isNotEmpty(incidentReportAddDto.getAcceptanceCheckRecordList())) { |
| | | incidentReportAddDto.getAcceptanceCheckRecordList().forEach(i -> i.setIncidentId(incidentReportAddDto.getId())); |
| | | incidentAcceptanceCheckService.saveOrUpdateBatch(incidentReportAddDto.getAcceptanceCheckRecordList()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public IPage<IncidentReportAddDto> getByDeviceId(Integer deviceId, Page page, String processNumber) { |
| | | return baseMapper.getByDeviceId(page, deviceId, processNumber); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteIncidentReport(Integer id) { |
| | | baseMapper.deleteById(id); |
| | | incidentSparePartsService.remove(Wrappers.<IncidentSpareParts>lambdaQuery().eq(IncidentSpareParts::getIncidentId, id)); |
| | | incidentFileService.remove(Wrappers.<IncidentFile>lambdaQuery().eq(IncidentFile::getIncidentId, id)); |
| | | incidentInstallService.remove(Wrappers.<IncidentInstall>lambdaQuery().eq(IncidentInstall::getIncidentId, id)); |
| | | incidentAcceptanceCheckService.remove(Wrappers.<IncidentAcceptanceCheck>lambdaQuery().eq(IncidentAcceptanceCheck::getIncidentId, id)); |
| | | } |
| | | |
| | | @Override |
| | | public IncidentReportAddDto getShowIncidentReport(Integer id) { |
| | | return baseMapper.getShowIncidentReport(id); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteIncidentReportAll(Integer sparePartsId, Integer fileId, Integer installId, Integer acceptanceCheckId) { |
| | | if (ObjectUtils.isNotEmpty(sparePartsId)) { |
| | | incidentSparePartsService.removeById(sparePartsId); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(fileId)) { |
| | | incidentFileService.removeById(fileId); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(installId)) { |
| | | incidentInstallService.removeById(installId); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(acceptanceCheckId)) { |
| | | incidentAcceptanceCheckService.removeById(acceptanceCheckId); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<IncidentReportExport> incidentReportExport(Integer deviceId) { |
| | | return baseMapper.incidentReportExport(deviceId); |
| | | } |
| | | |
| | | /** |
| | | * 导åºéªæ¶æ¥å |
| | | * @param deviceId 设å¤id |
| | | * @param processNumber æµç¨å· |
| | | * @param response ååºWordææ¡£ |
| | | */ |
| | | @Override |
| | | public void acceptanceCertificateExport(Integer deviceId, String processNumber, HttpServletResponse response) { |
| | | IncidentReportExportWordDto incidentReport = baseMapper.acceptanceCertificateExport(deviceId, processNumber); |
| | | |
| | | String submitOperatingPersonnel = incidentReport.getSubmitOperatingPersonnel(); |
| | | |
| | | String operatingPersonnelNameUrl = null; |
| | | if (submitOperatingPersonnel != null) { |
| | | operatingPersonnelNameUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, submitOperatingPersonnel)) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(operatingPersonnelNameUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°ç³è¯·äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/word/incident-report.docx"); |
| | | Configure configure = Configure.builder() |
| | | .build(); |
| | | String fileOperatingPersonnelNameUrl = operatingPersonnelNameUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("incidentReport", incidentReport); |
| | | put("submitOperatingPersonnelUrl", StringUtils.isNotBlank(fileOperatingPersonnelNameUrl) ? Pictures.ofLocal( imgUrl + "/" + fileOperatingPersonnelNameUrl).create() : null); |
| | | }}); |
| | | |
| | | try { |
| | | response.setContentType("application/msword"); |
| | | String fileName = URLEncoder.encode( |
| | | "设å¤éªæ¶æ¥å", "UTF-8"); |
| | | response.setHeader("Content-disposition", |
| | | "attachment;filename=" + fileName + ".docx"); |
| | | OutputStream os = response.getOutputStream(); |
| | | template.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.IncidentSparePartsMapper; |
| | | import com.yuanchu.mom.pojo.IncidentSpareParts; |
| | | import com.yuanchu.mom.service.IncidentSparePartsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IncidentSparePartsServiceImpl extends ServiceImpl<IncidentSparePartsMapper, IncidentSpareParts> implements IncidentSparePartsService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.InstructionDto; |
| | | import com.yuanchu.mom.dto.OperationInstructionDto; |
| | | import com.yuanchu.mom.mapper.InstructionMapper; |
| | | import com.yuanchu.mom.numgen.NumberGenerator; |
| | | import com.yuanchu.mom.pojo.Instruction; |
| | | import com.yuanchu.mom.service.InstructionService; |
| | | import com.yuanchu.mom.service.OperationInstructionService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InstructionServiceImpl extends ServiceImpl<InstructionMapper, Instruction> implements InstructionService { |
| | | |
| | | @Autowired |
| | | private OperationInstructionService operationInstructionService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<Instruction> numberGenerator; |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @Override |
| | | public IPage<Instruction> pageByPageQueryOfHomeworkInstructions(Page page, OperationInstructionDto operationInstructionDto) { |
| | | return baseMapper.pageByPageQueryOfHomeworkInstructions(page, QueryWrappers.queryWrappers(operationInstructionDto)); |
| | | } |
| | | |
| | | @Override |
| | | public void newHomeworkGuidebookAdded(InstructionDto instructionDto) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null); |
| | | if (ObjectUtils.isEmpty(instructionDto.getApplicationNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | | String month = new SimpleDateFormat("MM", Locale.CHINESE).format(new Date()); |
| | | String day = new SimpleDateFormat("dd", Locale.CHINESE).format(new Date()); |
| | | String processNumber = numberGenerator.generateNumberWithPrefix(3, "WJSK" + year + month + day, Instruction::getApplicationNumber); |
| | | instructionDto.setApplicationNumber(processNumber); |
| | | } |
| | | saveOrUpdate(instructionDto); |
| | | if (ObjectUtils.isNotEmpty(instructionDto.getFeTempHumRecordList())) { |
| | | instructionDto.getFeTempHumRecordList().forEach(i -> { |
| | | i.setInstructionId(instructionDto.getId()); |
| | | i.setUploader(map1.get("userId")); |
| | | i.setUpdateTime(LocalDateTime.now()); |
| | | }); |
| | | operationInstructionService.saveOrUpdateBatch(instructionDto.getFeTempHumRecordList()); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.OperationInstructionMapper; |
| | | import com.yuanchu.mom.pojo.OperationInstruction; |
| | | import com.yuanchu.mom.service.OperationInstructionService; |
| | | import com.yuanchu.mom.vo.OperationInstructionVo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:43:32 |
| | | */ |
| | | @Service |
| | | public class OperationInstructionServiceImpl extends ServiceImpl<OperationInstructionMapper, OperationInstruction> implements OperationInstructionService { |
| | | |
| | | @Override |
| | | public List<OperationInstructionVo> homeworkGuidebookEditor(Integer instructionId) { |
| | | return baseMapper.homeworkGuidebookEditor(instructionId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.yuanchu.mom.mapper.*; |
| | | import com.yuanchu.mom.pojo.DeviceMetricRecord; |
| | | import com.yuanchu.mom.service.CustomService; |
| | | import com.yuanchu.mom.service.InsOrderService; |
| | | import com.yuanchu.mom.service.ProductService; |
| | | import com.yuanchu.mom.service.QrShowService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.ui.Model; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.Duration; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | @Service |
| | | public class QrShowServiceImpl implements QrShowService { |
| | | |
| | | @Autowired |
| | | private InsOrderService insOrderService; |
| | | |
| | | @Autowired |
| | | private ProductService productService; |
| | | |
| | | @Autowired |
| | | private CustomService customService; |
| | | |
| | | @Autowired |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | @Autowired |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Autowired |
| | | private DeviceMetricRecordMapper deviceMetricRecordMapper; |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | |
| | | @Autowired |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | | |
| | | private String getIp(){ |
| | | if(StringUtils.isNotBlank(active)){ |
| | | return "prod".equals(active)?"https://zttx-lims.ztt.cn:8021/lims/":"http://114.132.189.42:8001/"; |
| | | } |
| | | return "http://192.168.1.124:8001/lims/"; |
| | | } |
| | | |
| | | @Override |
| | | public void transformModelByType(Model model, String code, String type) { |
| | | // if(StringUtils.isNotBlank(type)){ |
| | | // switch (type){ |
| | | // case "word": |
| | | // InsOrder insOrder = insOrderService.getOne(Wrappers.<InsOrder>lambdaQuery() |
| | | // .eq(InsOrder::getEntrustCode, code)); |
| | | // Product product = productService.getOne(Wrappers.<Product>lambdaQuery() |
| | | // .eq(Product::getName, insOrder.getSample())); |
| | | // String insOrderModel = productService.getWordQrModel(insOrder.getId()); |
| | | // Custom company = customService.getOne(Wrappers.<Custom>lambdaQuery() |
| | | // .eq(Custom::getCompany, insOrder.getCompany())); |
| | | // String orderType = insOrderMapper.getEnumLabelByValue(insOrder.getOrderType()); |
| | | // String[] monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; |
| | | // model.addAttribute("entrustCode", code); |
| | | // model.addAttribute("productName",product.getName()); |
| | | // model.addAttribute("productNameEn",product.getNameEn()); |
| | | // model.addAttribute("insOrderModel", insOrderModel); |
| | | // model.addAttribute("company", company.getCompany()); |
| | | // model.addAttribute("companyEn", company.getCompanyEn()); |
| | | // model.addAttribute("getTime", insOrder.getExamineTime().format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | // String getTimeEn = monthNames[insOrder.getExamineTime().getMonthValue() - 1] + " " + insOrder.getExamineTime().getDayOfMonth() + ", " + insOrder.getExamineTime().getYear(); |
| | | // model.addAttribute("getTimeEn", getTimeEn); |
| | | // model.addAttribute("issuingDate", insOrder.getIssuingDate().format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | // String issuingDateEn = monthNames[insOrder.getIssuingDate().getMonthValue() - 1] + " " + insOrder.getIssuingDate().getDayOfMonth() + ", " + insOrder.getIssuingDate().getYear(); |
| | | // model.addAttribute("issuingDateEn", issuingDateEn); |
| | | // model.addAttribute("orderType", orderType); |
| | | // model.addAttribute("orderTypeEn", insOrder.getOrderType()); |
| | | // break; |
| | | // case "device": |
| | | // //æ¥è¯¢è®¾å¤ä¸»è¡¨ä¿¡æ¯ |
| | | // Device device = deviceMapper.selectOne(Wrappers.<Device>lambdaQuery().eq(Device::getManagementNumber, code)); |
| | | // if(!Objects.isNull(device)){ |
| | | // //æ¥è¯¢è®¾å¤æ ¡åä¿¡æ¯ |
| | | // DeviceMetricRecord calibrate = getDeviceMetricRecord(device.getId(), "calibrate"); |
| | | // //æ¥è¯¢è®¾å¤æ ¸æ¥ä¿¡æ¯ |
| | | // DeviceMetricRecord examine = getDeviceMetricRecord(device.getId(), "examine"); |
| | | // //æ¥è¯¢è®¾å¤ç»´æ¤è®°å½ |
| | | // DeviceMaintenance deviceMaintenance = Optional.ofNullable(deviceMaintenanceMapper.selectOne(Wrappers.<DeviceMaintenance>lambdaQuery() |
| | | // .eq(DeviceMaintenance::getDeviceId, device.getId()) |
| | | // .orderByDesc(DeviceMaintenance::getId) |
| | | // .last("limit 1"))).orElse(new DeviceMaintenance()); |
| | | // model.addAttribute("progress",calcDeviceNextCheckRatio(calibrate.getCalibrationDate(),calibrate.getNextCalibrationDate()));//è·ç¦»ä¸æ¬¡æ ¡åæ¥æç天æ°ç¾åæ¯ |
| | | // model.addAttribute("deviceName",device.getDeviceName());//设å¤åç§° |
| | | // model.addAttribute("deviceCode",device.getManagementNumber());//设å¤ç¼å· |
| | | // model.addAttribute("usedYears",calcUsedYears(device.getActivationDate()));//å¯ç¨æ¶é¿(å¹´) |
| | | // model.addAttribute("runStatus",device.getDeviceStatus());//设å¤è¿è¡ç¶æ |
| | | // model.addAttribute("lastCalibrationDate",formatDate(calibrate.getCalibrationDate(),"yyyy-MM-dd"));//æè¿æ ¡åæ¥æ |
| | | // model.addAttribute("nextCalibrationDate",formatDate(calibrate.getNextCalibrationDate(),"yyyy-MM-dd"));//䏿¬¡æ ¡åæ¥æ |
| | | // String calibrateStatus = "0yes".equals(calibrate.getStatus())?"åæ ¼":"1no".equals(calibrate.getStatus())?"ä¸åæ ¼":"å
¶ä»"; |
| | | // model.addAttribute("calibrateStatus",Objects.isNull(calibrate.getCalibrationDate())?"":calibrateStatus);//æ ¡åæ»ç»è®º |
| | | // model.addAttribute("lastExamineDate",formatDate(examine.getCalibrationDate(),"yyyy-MM-dd"));//æè¿æ ¸æ¥æ¥æ |
| | | // model.addAttribute("nextExamineDate",formatDate(examine.getNextCalibrationDate(),"yyyy-MM-dd"));//䏿¬¡æ ¸æ¥æ¥æ |
| | | // String examineStatus = "0yes".equals(examine.getStatus())?"åæ ¼":"1no".equals(examine.getStatus())?"ä¸åæ ¼":"å
¶ä»"; |
| | | // model.addAttribute("examineStatus",Objects.isNull(examine.getCalibrationDate())?"":examineStatus);//æ ¸æ¥æ»ç»è®º |
| | | // model.addAttribute("maintenanceDate",formatDate(deviceMaintenance.getDate(),"yyyy-MM-dd"));//æè¿ç»´æ¤æ¥æ |
| | | // model.addAttribute("nextMaintenanceDate",formatDate(deviceMaintenance.getNextDate(),"yyyy-MM-dd"));//䏿¬¡ç»´æ¤æ¥æ |
| | | // String maintenanceType = ""; |
| | | // if(!Objects.isNull(deviceMaintenance.getMaintenanceType())){ |
| | | // maintenanceType = 0==deviceMaintenance.getMaintenanceType()?"使ç¨åç»´æ¤":"使ç¨åç»´æ¤"; |
| | | // } |
| | | // model.addAttribute("maintenanceType",maintenanceType);//ç»´æ¤æ»ç»è®º |
| | | // //æµéé¡¹ç® |
| | | // String insProduct = ""; |
| | | // if(StringUtils.isNotBlank(device.getInsProductIds())){ |
| | | // String[] ids = device.getInsProductIds().split(","); |
| | | // List<StructureItemParameter> parameters = structureItemParameterMapper.selectBatchIds(Arrays.asList(ids)); |
| | | // List<String> itemList = parameters.stream().map(StructureItemParameter::getInspectionItem).distinct().collect(Collectors.toList()); |
| | | // insProduct = String.join(",",itemList); |
| | | // } |
| | | // model.addAttribute("insProduct",insProduct);//æµéé¡¹ç® |
| | | // model.addAttribute("fileName",calibrate.getSystemFileName()); |
| | | // model.addAttribute("downloadUrl",getIp()+"img/"+calibrate.getSystemFileName()); |
| | | // } |
| | | // break; |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | /** |
| | | * 计ç®å¯ç¨æ¶é¿ |
| | | * @param activationDate |
| | | * @return |
| | | */ |
| | | public double calcUsedYears(LocalDateTime activationDate) { |
| | | if(Objects.isNull(activationDate)){ |
| | | return 0; |
| | | } |
| | | BigDecimal defDays = BigDecimal.valueOf(365); |
| | | BigDecimal usedDays = BigDecimal.valueOf(Duration.between(activationDate,LocalDateTime.now()).toDays()); |
| | | return usedDays.divide(defDays,2,RoundingMode.HALF_UP).setScale(2,RoundingMode.HALF_UP).doubleValue(); |
| | | } |
| | | |
| | | /** |
| | | * 计ç®è·ç¦»ä¸æ¬¡æ ¡åæ¥æç天æ°ç¾åæ¯ |
| | | * @param startDate |
| | | * @param endDate |
| | | * @return |
| | | */ |
| | | public double calcDeviceNextCheckRatio(Date startDate, Date endDate){ |
| | | if(Objects.isNull(startDate) || Objects.isNull(endDate)){ |
| | | return 0; |
| | | } |
| | | LocalDateTime startLocalDate = startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); |
| | | LocalDateTime endLocalDate = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); |
| | | long totalDays = Duration.between(startLocalDate, endLocalDate).toDays(); |
| | | long usedDays = Duration.between(startLocalDate, LocalDateTime.now()).toDays(); |
| | | BigDecimal calcVal = BigDecimal.valueOf(usedDays).divide(BigDecimal.valueOf(totalDays),2,RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP); |
| | | if(calcVal.compareTo(BigDecimal.ZERO)<0){ |
| | | calcVal = BigDecimal.ZERO; |
| | | }else if(calcVal.compareTo(BigDecimal.valueOf(100))>0){ |
| | | calcVal = BigDecimal.valueOf(100); |
| | | } |
| | | return calcVal.doubleValue(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤æ ¡å/æ ¸æ¥è®°å½ |
| | | * @param deviceId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public DeviceMetricRecord getDeviceMetricRecord(int deviceId,String type){ |
| | | return Optional.ofNullable( |
| | | deviceMetricRecordMapper.selectOne(Wrappers.<DeviceMetricRecord>lambdaQuery() |
| | | .eq(DeviceMetricRecord::getDeviceId, deviceId) |
| | | .eq(DeviceMetricRecord::getType, type) |
| | | .orderByDesc(DeviceMetricRecord::getCreateTime) |
| | | .last("limit 1"))).orElse(new DeviceMetricRecord()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¼å¼åæ¥æ |
| | | * @return |
| | | */ |
| | | public String formatDate(Date date,String formatter){ |
| | | if(Objects.isNull(date)){ |
| | | return ""; |
| | | } |
| | | LocalDateTime localDateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); |
| | | return localDateTime.format(DateTimeFormatter.ofPattern(formatter)); |
| | | } |
| | | /** |
| | | * æ ¼å¼åæ¥æ |
| | | * @return |
| | | */ |
| | | public String formatDate(LocalDate date,String formatter){ |
| | | if(Objects.isNull(date)){ |
| | | return ""; |
| | | } |
| | | return date.format(DateTimeFormatter.ofPattern(formatter)); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.dto.ReservationDto; |
| | | import com.yuanchu.mom.mapper.DeviceMapper; |
| | | import com.yuanchu.mom.mapper.ReservationMapper; |
| | | import com.yuanchu.mom.pojo.Reservation; |
| | | import com.yuanchu.mom.service.DataConfigService; |
| | | import com.yuanchu.mom.service.ReservationService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * èµæºé¢å®æ°å»ºé¢å®è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author baomidou |
| | | * @since 2024-09-14 |
| | | */ |
| | | @Service |
| | | public class ReservationServiceImpl extends ServiceImpl<ReservationMapper, Reservation> implements ReservationService { |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @Autowired |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Autowired |
| | | private ReservationMapper reservationMapper; |
| | | |
| | | @Autowired |
| | | private DataConfigService dataConfigService; |
| | | |
| | | @Override |
| | | public Map<String, Object> selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull, String starttime, String endtime) { |
| | | ArrayList<String> dateTextList = new ArrayList<>(); |
| | | if (StringUtils.isNoneEmpty(starttime)&&StringUtils.isNoneEmpty(endtime)){ |
| | | LocalDate startDate = LocalDate.parse(starttime, DateTimeFormatter.ISO_LOCAL_DATE); |
| | | LocalDate endDate = LocalDate.parse(endtime, DateTimeFormatter.ISO_LOCAL_DATE); |
| | | while (!startDate.isAfter(endDate)) { |
| | | dateTextList.add(startDate.toString()); |
| | | startDate = startDate.plusDays(1); |
| | | } |
| | | } |
| | | LambdaQueryWrapper<Reservation> lambdaQueryWrapper=new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.between(Reservation::getReservationTime,starttime,endtime); |
| | | List<Reservation> reservations = reservationMapper.selectList(lambdaQueryWrapper); |
| | | HashMap dates = new HashMap<String, Integer>(); |
| | | |
| | | Map<Integer, List<Reservation>> deviceIdcollect = reservations.stream().collect(Collectors.groupingBy(Reservation::getDeviceId)); |
| | | for (Integer deviceId : deviceIdcollect.keySet()) { |
| | | List<Reservation> deviceIdList = deviceIdcollect.get(deviceId); |
| | | Map<String, List<Reservation>> collect = deviceIdList.stream().collect(Collectors.groupingBy(Reservation::getReservationTime)); |
| | | for (String date : collect.keySet()) { |
| | | List<Reservation> reservations1 = collect.get(date); |
| | | Map<String, List<Reservation>> collect1 = reservations1.stream().collect(Collectors.groupingBy(Reservation::getSpecificTime)); |
| | | for (String s : collect1.keySet()) { |
| | | if (!(dates.containsKey(deviceId + date + s))) { |
| | | dates.put(deviceId + date + s, collect1.get(s).size()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(DeviceDto.class)); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectDeviceParameter"); |
| | | if (map1.get("look") == 1) itemParameter.setCreateUser(map1.get("userId")); |
| | | IPage<DeviceDto> iPage = deviceMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(itemParameter), laboratoryNameIsNull); |
| | | List<DeviceDto> records = iPage.getRecords(); |
| | | ArrayList<JSONObject> datas = new ArrayList<>(); |
| | | |
| | | String [] dateArrays={"09:00-12:00","13:00-18:00", "18:00-22:00"}; |
| | | for (DeviceDto record : records) { |
| | | for (int i = 0; i < dateArrays.length; i++) { |
| | | String dateArray = dateArrays[i]; |
| | | JSONObject temp = JSON.parseObject(JSON.toJSONString(record)); |
| | | temp.put("time", dateArray); |
| | | JSONArray dataArray = new JSONArray(); |
| | | for (String date : dateTextList) { |
| | | JSONObject dateObject = new JSONObject(); |
| | | dateObject.put("date", date); |
| | | dateObject.put("value", dates.containsKey(record.getId()+date + dateArray) ? dates.get(record.getId()+date + dateArray) : 0); |
| | | dataArray.add(dateObject); |
| | | } |
| | | temp.put("dateList", dataArray); |
| | | datas.add(temp); |
| | | } |
| | | } |
| | | map.put("body", datas); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<ReservationDto> selectReservationParameterPage(String deviceId, String reservationTime, String specificTime) { |
| | | return reservationMapper.selectReservationParameterPage(Integer.parseInt(deviceId), reservationTime, specificTime); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.vo; |
| | | |
| | | import com.yuanchu.mom.pojo.OperationInstruction; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OperationInstructionVo extends OperationInstruction { |
| | | @ApiModelProperty("管çç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceAcceptanceFileMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceAcceptanceFile"> |
| | | <id column="acceptance_file_id" property="acceptanceFileId" /> |
| | | <result column="acceptance_id" property="acceptanceId" /> |
| | | <result column="type" property="type" /> |
| | | <result column="file_url" property="fileUrl" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceAcceptanceMapper"> |
| | | |
| | | <!-- 设å¤éªæ¶å表 --> |
| | | <select id="pageDeviceAcceptance" resultType="com.yuanchu.mom.pojo.DeviceAcceptance"> |
| | | select * from ( |
| | | select * |
| | | from device_acceptance |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceAccidentReportMapper"> |
| | | |
| | | <!-- 设å¤äºæ
æ¥åå表 --> |
| | | <select id="pageDeviceAccidentReport" resultType="com.yuanchu.mom.pojo.DeviceAccidentReport"> |
| | | select * from ( |
| | | select * |
| | | from device_accident_report |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceAccidentReportById" resultType="com.yuanchu.mom.dto.DeviceAccidentReportDto"> |
| | | select |
| | | d.*, |
| | | date_format(d.accident_date,'%Y-%m-%d') accidentDateStr, -- æ¶é´ |
| | | date_format(d.report_date,'%Y-%m-%d') reportDateStr, -- æ¥åäººå¡«åæ¶é´ |
| | | date_format(d.assessor_date,'%Y-%m-%d') assessorDateStr, -- è¯ä¼°äººå¡«åæ¶é´ |
| | | date_format(d.department_head_date,'%Y-%m-%d') departmentHeadDateStr, -- é¨é¨è´è´£äººå¡«åæ¶é´ |
| | | date_format(d.technical_director_date,'%Y-%m-%d') technicalDirectorDateStr, -- ææ¯è´è´£äººå¡«åæ¶é´ |
| | | date_format(d.director_head_date,'%Y-%m-%d') directorHeadDateStr -- ä¸»ä»»å¡«åæ¶é´ |
| | | from device_accident_report d |
| | | where d.accident_report_id = #{accidentReportId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceBorrowMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceBorrow"> |
| | | <id column="id" property="id"/> |
| | | <result column="process_number" property="processNumber"/> |
| | | <result column="device_id" property="deviceId"/> |
| | | <result column="unify_number" property="unifyNumber"/> |
| | | <result column="recipient_user" property="recipientUser"/> |
| | | <result column="recipient_state" property="recipientState"/> |
| | | <result column="recipient_time" property="recipientTime"/> |
| | | <result column="submit_user" property="submitUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="now_state" property="nowState"/> |
| | | <result column="now_user" property="nowUser"/> |
| | | <result column="url" property="url"/> |
| | | <result column="file_name" property="fileName"/> |
| | | <result column="next_user" property="nextUser"/> |
| | | <result column="submit_operation_user" property="submitOperationUser"/> |
| | | <result column="submit_operation_time" property="submitOperationTime"/> |
| | | <result column="reback_user" property="rebackUser"/> |
| | | <result column="reback_time" property="rebackTime"/> |
| | | <result column="receive_state" property="receiveState"/> |
| | | <result column="device_user" property="deviceUser"/> |
| | | <result column="note" property="note"/> |
| | | <result column="receive_operation_user" property="receiveOperationUser"/> |
| | | <result column="receive_operation_time" property="receiveOperationTime"/> |
| | | </resultMap> |
| | | <select id="deviceBorrowPage" resultType="com.yuanchu.mom.pojo.DeviceBorrow"> |
| | | select * from ( |
| | | select db.*,device_name |
| | | from device_borrow db |
| | | left join `center-lims`.device on db.device_id=device.id |
| | | )a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="getDeviceBorrowBydeviceId" resultType="com.yuanchu.mom.pojo.DeviceBorrow"> |
| | | select db.*,device_name |
| | | from device_borrow db |
| | | left join `center-lims`.device on db.device_id=device.id |
| | | where device_id=#{deviceId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceBreakdownMaintenanceMapper"> |
| | | |
| | | <!--è®¾å¤æ
éç»´ä¿®å表--> |
| | | <select id="pageDeviceBreakdownMaintenance" resultType="com.yuanchu.mom.pojo.DeviceBreakdownMaintenance"> |
| | | select * from ( |
| | | select * |
| | | from device_breakdown_maintenance |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceCalibrationPlanDetailMapper"> |
| | | |
| | | <!-- è®¾å¤æ ¡å计å详æ
å表 --> |
| | | <select id="pageDeviceCalibrationPlanDetail" resultType="com.yuanchu.mom.pojo.DeviceCalibrationPlanDetail"> |
| | | select * from ( |
| | | select * |
| | | from device_calibration_plan_detail |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceCalibrationPlanMapper"> |
| | | |
| | | <!-- è®¾å¤æ ¡å计åå表 --> |
| | | <select id="pageDeviceCalibrationPlan" resultType="com.yuanchu.mom.dto.DeviceCalibrationPlanDto"> |
| | | select * |
| | | from (select cqm.*, |
| | | u1.name write_name, |
| | | u3.name ratify_name |
| | | from device_calibration_plan cqm |
| | | left join user u1 on u1.id = cqm.write_user_id |
| | | left join user u3 on u3.id = cqm.ratify_user_id |
| | | order by cqm.create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceExaminePlanDetailsMapper"> |
| | | |
| | | |
| | | <!--è®¾å¤æ ¸æ¥è®¡å详æ
å表--> |
| | | <select id="pageDeviceExaminePlanDetail" resultType="com.yuanchu.mom.pojo.DeviceExaminePlanDetails"> |
| | | select * from ( |
| | | select * |
| | | from device_examine_plan_details |
| | | order by check_time asc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceExaminePlanMapper"> |
| | | |
| | | <!-- è®¾å¤æ ¸æ¥è®¡åå表 --> |
| | | <select id="deviceExaminePlanDetailsMapper" resultType="com.yuanchu.mom.dto.DeviceExaminePlanDto"> |
| | | select * |
| | | from (select cqm.*, |
| | | u1.name write_name, |
| | | u3.name ratify_name |
| | | from device_examine_plan cqm |
| | | left join user u1 on u1.id = cqm.write_user_id |
| | | left join user u3 on u3.id = cqm.ratify_user_id |
| | | order by cqm.create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectExamineExaminePlanDto" resultType="com.yuanchu.mom.dto.DeviceExaminePlanDto"> |
| | | select |
| | | cqm.*, |
| | | date_format(cqm.write_time, '%Y-%m-%d') writeTimeStr, |
| | | date_format(cqm.ratify_time, '%Y-%m-%d') ratifyTimeStr, |
| | | date_format(cqm.create_time, '%Y') year, |
| | | u1.name write_name, |
| | | u3.name ratify_name |
| | | from device_examine_plan cqm |
| | | left join user u1 on u1.id = cqm.write_user_id |
| | | left join user u3 on u3.id = cqm.ratify_user_id |
| | | where cqm.plan_id = #{deviceExaminePlanId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceExamineRecordContrastDetailsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceExamineRecordContrastDetails"> |
| | | <id column="record_contrast_details_id" property="recordContrastDetailsId" /> |
| | | <result column="record_contrast_id" property="recordContrastId" /> |
| | | <result column="check_items" property="checkItems" /> |
| | | <result column="indication_a" property="indicationA" /> |
| | | <result column="indication_b" property="indicationB" /> |
| | | <result column="indication_c" property="indicationC" /> |
| | | <result column="d_value" property="dValue" /> |
| | | <result column="deviation" property="deviation" /> |
| | | <result column="determine" property="determine" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceExamineRecordContrastMapper"> |
| | | |
| | | <!-- æ¥è¯¢æ ¸æ¥å¯¹æ¯è®°å½ --> |
| | | <select id="getExamineRecordContrast" resultType="com.yuanchu.mom.dto.DeviceExamineRecordContrastDto"> |
| | | select derc.*, |
| | | d1.device_name aDeviceName, |
| | | d1.management_number aDeviceNumber, |
| | | d2.device_name bDeviceName, |
| | | d2.management_number bDeviceNumber, |
| | | d3.device_name cDeviceName, |
| | | d3.management_number cDeviceNumber |
| | | from device_examine_record_contrast derc |
| | | left join device d1 on d1.id = derc.a_device_id |
| | | left join device d2 on d2.id = derc.a_device_id |
| | | left join device d3 on d3.id = derc.a_device_id |
| | | where derc.plan_details_id = #{planDetailsId} |
| | | </select> |
| | | <select id="selectExamineRecordContrastDto" |
| | | resultType="com.yuanchu.mom.dto.DeviceExamineRecordContrastDto"> |
| | | select derc.*, |
| | | d1.device_name aDeviceName, |
| | | d1.management_number aDeviceNumber, |
| | | d2.device_name bDeviceName, |
| | | d2.management_number bDeviceNumber, |
| | | d3.device_name cDeviceName, |
| | | d3.management_number cDeviceNumber, |
| | | DATE_FORMAT(derc.create_time, '%Y-%m-%d') checkerTimeStr, |
| | | DATE_FORMAT(derc.review_time, '%Y-%m-%d') reviewTimeStr, |
| | | d1.storage_point labName |
| | | from device_examine_record_contrast derc |
| | | left join device d1 on d1.id = derc.a_device_id |
| | | left join device d2 on d2.id = derc.a_device_id |
| | | left join device d3 on d3.id = derc.a_device_id |
| | | where derc.plan_details_id = #{planDetailsId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceExamineRecordDetailMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceExamineRecordDetail"> |
| | | <id column="record_detail_id" property="recordDetailId" /> |
| | | <result column="record_id" property="recordId" /> |
| | | <result column="data_value1" property="dataValue1" /> |
| | | <result column="data_value2" property="dataValue2" /> |
| | | <result column="data_value3" property="dataValue3" /> |
| | | <result column="data_value4" property="dataValue4" /> |
| | | <result column="data_value5" property="dataValue5" /> |
| | | <result column="data_value6" property="dataValue6" /> |
| | | <result column="data_value7" property="dataValue7" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceExamineRecordMapper"> |
| | | |
| | | <select id="getExamineRecord" resultType="com.yuanchu.mom.dto.DeviceExamineRecordDto"> |
| | | select der.*, |
| | | d.device_name, |
| | | d.management_number deviceNumber |
| | | from device_examine_record der |
| | | left join device_examine_plan_details depd on depd.plan_details_id = der.plan_details_id |
| | | left join device d on d.id = depd.device_id |
| | | where der.plan_details_id = #{planDetailsId} |
| | | </select> |
| | | <select id="selectReviewExamineRecordDto" resultType="com.yuanchu.mom.dto.DeviceExamineRecordDto"> |
| | | select der.*, |
| | | Date_Format(der.update_time, '%Y-%m-%d') updateTimeStr, |
| | | d.device_name, |
| | | d.management_number deviceNumber |
| | | from device_examine_record der |
| | | left join device_examine_plan_details depd on depd.plan_details_id = der.plan_details_id |
| | | left join device d on d.id = depd.device_id |
| | | where der.plan_details_id = #{planDetailsId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceExternalApplyMapper"> |
| | | |
| | | <!--å©ç¨å¤é¨è®¾å¤ç³è¯·å表--> |
| | | <select id="pageDeviceExternalApply" resultType="com.yuanchu.mom.pojo.DeviceExternalApply"> |
| | | select * from ( |
| | | select * |
| | | from device_external_apply |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceExternalById" resultType="com.yuanchu.mom.pojo.DeviceExternalApply"> |
| | | select |
| | | dea.* |
| | | from device_external_apply dea |
| | | where dea.external_apply_id = #{externalApplyId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceFaultOneMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceFaultOne"> |
| | | <id column="id" property="id" /> |
| | | <result column="device_id" property="deviceId" /> |
| | | <result column="process_number" property="processNumber" /> |
| | | <result column="measure_of_accuracy" property="measureOfAccuracy" /> |
| | | <result column="fault_situation" property="faultSituation" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="system_file_name" property="systemFileName" /> |
| | | <result column="submit_next_pesponsible" property="submitNextPesponsible" /> |
| | | <result column="submit_operating_personnel" property="submitOperatingPersonnel" /> |
| | | <result column="submit_date" property="submitDate" /> |
| | | <result column="method_cost" property="methodCost" /> |
| | | <result column="admin_audit_option" property="adminAuditOption" /> |
| | | <result column="admin_next_pesponsible" property="adminNextPesponsible" /> |
| | | <result column="admin_operating_personnel" property="adminOperatingPersonnel" /> |
| | | <result column="technical_audit_option" property="technicalAuditOption" /> |
| | | <result column="technical_next_pesponsible" property="technicalNextPesponsible" /> |
| | | <result column="technical_operating_personnel" property="technicalOperatingPersonnel" /> |
| | | <result column="technical_date" property="technicalDate" /> |
| | | <result column="maintain_situation" property="maintainSituation" /> |
| | | <result column="maintain_next_pesponsible" property="maintainNextPesponsible" /> |
| | | <result column="maintain_operating_personnel" property="maintainOperatingPersonnel" /> |
| | | <result column="maintain_date" property="maintainDate" /> |
| | | <result column="check_cal_situation" property="checkCalSituation" /> |
| | | <result column="after_maintenance_operating_personnel" property="afterMaintenanceOperatingPersonnel" /> |
| | | <result column="after_maintenance_date" property="afterMaintenanceDate" /> |
| | | <result column="current_status" property="currentState" /> |
| | | <result column="submit_person" property="submitPerson" /> |
| | | <result column="current_responsible" property="currentResponsible" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <select id="deviceFaultOnePage" resultType="com.yuanchu.mom.dto.DeviceFaultOneDto"> |
| | | select dfo.*, |
| | | d.device_name, |
| | | d.management_number, |
| | | d.specification_model |
| | | from device_fault_one dfo |
| | | left join device d on d.id = dfo.device_id |
| | | where dfo.device_id = #{deviceId} |
| | | <if test="processNumber != '' and processNumber != null"> |
| | | and dfo.process_number like concat('%', #{processNumber}, '%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceInspectionRecordDetailsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceInspectionRecordDetails"> |
| | | <id column="inspection_record_detail_id" property="inspectionRecordDetailId" /> |
| | | <result column="test_items" property="testItems" /> |
| | | <result column="standard_value" property="standardValue" /> |
| | | <result column="measured_value" property="measuredValue" /> |
| | | <result column="indication_error" property="indicationError" /> |
| | | <result column="allowable_error" property="allowableError" /> |
| | | <result column="single_item_conclusion" property="singleItemConclusion" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user_id" property="updateUserId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceInspectionRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceInspectionRecord"> |
| | | <id column="inspection_record" property="inspectionRecord" /> |
| | | <result column="material_name" property="materialName" /> |
| | | <result column="material_model" property="materialModel" /> |
| | | <result column="material_management_number" property="materialManagementNumber" /> |
| | | <result column="material_accuracy_grade" property="materialAccuracyGrade" /> |
| | | <result column="temperature" property="temperature" /> |
| | | <result column="humidity" property="humidity" /> |
| | | <result column="test_conclusion" property="testConclusion" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="recorder" property="recorder" /> |
| | | <result column="recorder_id" property="recorderId" /> |
| | | <result column="reviewer" property="reviewer" /> |
| | | <result column="reviewer_id" property="reviewerId" /> |
| | | <result column="test_date" property="testDate" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user_id" property="updateUserId" /> |
| | | </resultMap> |
| | | <select id="selectDeviceParameterPage" resultType="com.yuanchu.mom.pojo.DeviceInspectionRecord"> |
| | | SELECT |
| | | * |
| | | from device_inspection_record |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceMaintenanceMapper"> |
| | | |
| | | <select id="getDeviceMaintenanceParam" resultType="com.yuanchu.mom.pojo.DeviceMaintenance"> |
| | | select id,device_id,device_name, device_number,management_number,content,name |
| | | ,date from device_maintenance |
| | | </select> |
| | | |
| | | <!-- <select id="getDeviceMaintenancePage" resultType="com.yuanchu.mom.pojo.DeviceMaintenance">--> |
| | | <!-- select *--> |
| | | <!-- from device_maintenance dm--> |
| | | <!-- where dm.device_id = #{deviceId}--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="deviceMaintenanceExport" resultType="com.yuanchu.mom.excel.DeviceMaintenanceExport"> |
| | | select id, device_id, device_name, device_number, management_number, content, date, if(maintenance_type = 1, '计åä¸ç»´æ¤', '使ç¨ååç»´æ¤'), next_date, name, comments |
| | | from device_maintenance dm |
| | | where dm.device_id = #{deviceId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceMaintenancePlanDetailsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceMaintenancePlanDetails"> |
| | | <id column="maintenance_plan_detail_id" property="maintenancePlanDetailId" /> |
| | | <result column="maintenance_plan_id" property="maintenancePlanId" /> |
| | | <result column="device_id" property="deviceId" /> |
| | | <result column="maintenance_site" property="maintenanceSite" /> |
| | | <result column="maintenance_content" property="maintenanceContent" /> |
| | | <result column="maintenance_intervals" property="maintenanceIntervals" /> |
| | | </resultMap> |
| | | <select id="deviceInspectionRecordDetailsList" |
| | | resultType="com.yuanchu.mom.dto.DeviceMaintenancePlanDetailsDto"> |
| | | select |
| | | dmpd.*, |
| | | d.device_name, |
| | | d.management_number device_number, |
| | | d.specification_model, |
| | | d.management_number, |
| | | d.storage_point |
| | | from device_maintenance_plan_details dmpd |
| | | left join device d on dmpd.device_id = d.id |
| | | where dmpd.maintenance_plan_id = #{maintenancePlanId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceMaintenancePlanMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceMaintenancePlan"> |
| | | <id column="maintenance_plan_id" property="maintenancePlanId" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_id" property="createId" /> |
| | | <result column="create_date" property="createDate" /> |
| | | <result column="audit_id" property="auditId" /> |
| | | <result column="audit" property="audit" /> |
| | | <result column="audit_date" property="auditDate" /> |
| | | </resultMap> |
| | | |
| | | <!-- æ ¹æ®è®¾å¤idæ¥è¯¢è®¾å¤çä¿å
»è®¡å --> |
| | | <select id="selectDeviceParameterPage" resultType="com.yuanchu.mom.pojo.DeviceMaintenancePlan"> |
| | | select |
| | | * |
| | | from device_maintenance_plan |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectMaintenancePlanById" resultType="com.yuanchu.mom.dto.DeviceMaintenancePlanDto"> |
| | | select |
| | | dmp.*, |
| | | date_format(dmp.date_preparation, '%Y-%m-%d') as datePreparationStr, |
| | | date_format(dmp.audit_date, '%Y-%m-%d') as auditDateStr |
| | | from device_maintenance_plan dmp |
| | | where dmp.maintenance_plan_id = #{maintenancePlanId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | device d |
| | | LEFT JOIN `user` u ON u.id = d.equipment_manager |
| | | LEFT JOIN laboratory l ON l.id = d.subordinate_departments_id |
| | | LEFT JOIN device_metric_record cmr ON d.id = cmr.device_id |
| | | LEFT JOIN structure_item_parameter sip ON FIND_IN_SET(sip.id, d.ins_product_ids) |
| | | <where> |
| | | <if test="laboratoryNameIsNull != null and laboratoryNameIsNull == true"> |
| | | l.laboratory_name is null |
| | | </if> |
| | | AND cmr.type = 'calibrate' or cmr.type is null or cmr.type = '' |
| | | </where> |
| | | GROUP BY |
| | | d.id, |
| | | u.name, l.laboratory_name |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceMetricRecordMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceMetricRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="unit_of_measure" property="unitOfMeasure" /> |
| | | <result column="calibration_date" property="calibrationDate" /> |
| | | <result column="next_calibration_date" property="nextCalibrationDate" /> |
| | | <result column="calculating_apparatus" property="calculatingApparatus" /> |
| | | <result column="standard_range" property="standardRange" /> |
| | | <result column="calibration_standard_uncertainty" property="calibrationStandardUncertainty" /> |
| | | <result column="by_document" property="byDocument" /> |
| | | <result column="certificate_serial_number" property="certificateSerialNumber" /> |
| | | <result column="status" property="status" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="system_file_name" property="systemFileName" /> |
| | | <result column="remark" property="remark" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceMetricsCopyMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceMetricsCopy"> |
| | | <id column="id" property="id" /> |
| | | <result column="device_id" property="deviceId" /> |
| | | <result column="measurement_parameter" property="measurementParameter" /> |
| | | <result column="range_of_measurement" property="rangeOfMeasurement" /> |
| | | <result column="max_permissible_error" property="maxPermissibleError" /> |
| | | <result column="judgment_criteria" property="judgmentCriteria" /> |
| | | <result column="created_by" property="createdBy" /> |
| | | <result column="creation_time" property="creationTime" /> |
| | | <result column="is_calibration" property="isCalibration" /> |
| | | <result column="result" property="result" /> |
| | | <result column="single_result_statement" property="singleResultStatement" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceScrappedMapper"> |
| | | |
| | | <!-- è®¾å¤æ¥åºç³è¯·å表 --> |
| | | <select id="pageDeviceScrapped" resultType="com.yuanchu.mom.pojo.DeviceScrapped"> |
| | | select * from ( |
| | | select * |
| | | from device_scrapped |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceScrappedById" resultType="com.yuanchu.mom.dto.DeviceScrappedDto"> |
| | | select |
| | | *, |
| | | date_format(applicant_date,'%Yå¹´%mæ%dæ¥') as applicantDateStr, |
| | | date_format(department_head_date,'%Yå¹´%mæ%dæ¥') as departmentHeadDateStr, |
| | | date_format(metering_room_date,'%Yå¹´%mæ%dæ¥') as meteringRoomDateStr, |
| | | date_format(approver_date,'%Yå¹´%mæ%dæ¥') as approverDateStr |
| | | from device_scrapped |
| | | where scrapped_id = #{scrappedId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceStateMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceState"> |
| | | <id column="state_id" property="stateId" /> |
| | | <result column="accessory_part" property="accessoryPart" /> |
| | | <result column="device_status" property="deviceStatus" /> |
| | | <result column="reason" property="reason" /> |
| | | <result column="submit_next_pesponsible" property="submitNextPesponsible" /> |
| | | <result column="submit_operating_personnel" property="submitOperatingPersonnel" /> |
| | | <result column="submit_date" property="submitDate" /> |
| | | <result column="department_review_opinion" property="departmentReviewOpinion" /> |
| | | <result column="department_next_pesponsible" property="departmentNextPesponsible" /> |
| | | <result column="department_operating_personnel" property="departmentOperatingPersonnel" /> |
| | | <result column="department_date" property="departmentDate" /> |
| | | <result column="measuring_room_review_opinion" property="measuringRoomReviewOpinion" /> |
| | | <result column="measuring_room_next_pesponsible" property="measuringRoomNextPesponsible" /> |
| | | <result column="measuring_room_operating_personnel" property="measuringRoomOperatingPersonnel" /> |
| | | <result column="measuring_room_date" property="measuringRoomDate" /> |
| | | <result column="approval_opinion" property="approvalOpinion" /> |
| | | <result column="approval_next_pesponsible" property="approvalNextPesponsible" /> |
| | | <result column="approval_operating_personnel" property="approvalOperatingPersonnel" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | | <result column="current_state" property="currentState" /> |
| | | <result column="device_id" property="deviceId" /> |
| | | <result column="current_responsible" property="currentResponsible" /> |
| | | </resultMap> |
| | | |
| | | <select id="getDeviceStatePage" resultType="com.yuanchu.mom.dto.DeviceStateDto"> |
| | | select ds.*, |
| | | d.device_name, |
| | | d.management_number, |
| | | d.specification_model, |
| | | d.large_category |
| | | from device_state ds |
| | | left join device d on d.id = ds.device_id |
| | | where ds.device_id = #{deviceId} |
| | | <if test="processNumber != '' and processNumber != null"> |
| | | and ds.process_number like concat('%', #{processNumber}, '%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceTraceabilityManagementDetailsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceTraceabilityManagementDetails"> |
| | | <id column="traceability_management_detail_id" property="traceabilityManagementDetailId" /> |
| | | <result column="traceability_management_id" property="traceabilityManagementId" /> |
| | | <result column="device_id" property="deviceId" /> |
| | | <result column="technical_index_parameters" property="technicalIndexParameters" /> |
| | | <result column="technical_requirements" property="technicalRequirements" /> |
| | | <result column="verification_cycle" property="verificationCycle" /> |
| | | <result column="verification_unit" property="verificationUnit" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | <select id="deviceTraceabilityManagementDetailsList" |
| | | resultType="com.yuanchu.mom.dto.DeviceTraceabilityManagementDetailsDto"> |
| | | select |
| | | dtmd.*, |
| | | d.device_name, |
| | | d.device_name, |
| | | d.specification_model, |
| | | d.management_number |
| | | from device_traceability_management_details dtmd |
| | | left join device d on dtmd.device_id = d.id |
| | | where dtmd.traceability_management_id = #{traceabilityManagementId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceTraceabilityManagementMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.DeviceTraceabilityManagement"> |
| | | <id column="traceability_management_id" property="traceabilityManagementId" /> |
| | | <result column="compiler_id" property="compilerId" /> |
| | | <result column="compiler" property="compiler" /> |
| | | <result column="date_preparation" property="datePreparation" /> |
| | | <result column="status" property="status" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="audit_id" property="auditId" /> |
| | | <result column="audit" property="audit" /> |
| | | <result column="audit_date" property="auditDate" /> |
| | | <result column="audit_remark" property="auditRemark" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | <select id="selectDeviceParameterPage" resultType="com.yuanchu.mom.pojo.DeviceTraceabilityManagement"> |
| | | select |
| | | * |
| | | from device_traceability_management |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDeviceTraceabilityManagementById" |
| | | resultType="com.yuanchu.mom.dto.DeviceTraceabilityManagementDto"> |
| | | select |
| | | dtm.*, |
| | | date_format(dtm.date_preparation, '%Y-%m-%d') as datePreparationStr, |
| | | date_format(dtm.audit_date, '%Y-%m-%d') as auditDateStr |
| | | from device_traceability_management dtm |
| | | where dtm.traceability_management_id = #{traceabilityManagementId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.IncidentAcceptanceCheckMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.IncidentAcceptanceCheck"> |
| | | <id column="acceptance_checkId" property="acceptanceCheckId" /> |
| | | <result column="instrument_module" property="instrumentModule" /> |
| | | <result column="verification_parameter" property="verificationParameter" /> |
| | | <result column="acceptable_limit" property="acceptableLimit" /> |
| | | <result column="verification_result" property="verificationResult" /> |
| | | <result column="verification_conclusion" property="verificationConclusion" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.IncidentFileMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.IncidentFile"> |
| | | <id column="file_id" property="fileId" /> |
| | | <result column="expected_copies" property="expectedCopies" /> |
| | | <result column="actual_copies" property="actualCopies" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.IncidentInstallMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.IncidentInstall"> |
| | | <id column="install_id" property="installId" /> |
| | | <result column="installation_project" property="installationProject" /> |
| | | <result column="installation_situation" property="installationSituation" /> |
| | | <result column="installation_completed" property="installationCompleted" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.IncidentReportMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.IncidentReport"> |
| | | <id column="id" property="id" /> |
| | | <result column="process_number" property="processNumber" /> |
| | | <result column="device_id" property="deviceId" /> |
| | | <result column="serial_number" property="serialNumber" /> |
| | | <result column="device_class" property="deviceClass" /> |
| | | <result column="check_outer_packaging" property="checkOuterPackaging" /> |
| | | <result column="file_name" property="fileName" /> |
| | | <result column="system_file_name" property="systemFileName" /> |
| | | <result column="unpacking_acceptance_conclusion" property="unpackingAcceptanceConclusion" /> |
| | | <result column="submit_next_pesponsible" property="submitNextPesponsible" /> |
| | | <result column="submit_remarks" property="submitRemarks" /> |
| | | <result column="submit_operating_personnel" property="submitOperatingPersonnel" /> |
| | | <result column="submit_date" property="submitDate" /> |
| | | <result column="unpacking_review_opinion" property="unpackingReviewOpinion" /> |
| | | <result column="unpacking_next_pesponsible" property="unpackingNextPesponsible" /> |
| | | <result column="unpacking_operating_personnel" property="unpackingOperatingPersonnel" /> |
| | | <result column="unpacking_date" property="unpackingDate" /> |
| | | <result column="install_location" property="installLocation" /> |
| | | <result column="install_remarks" property="installRemarks" /> |
| | | <result column="install_next_pesponsible" property="installNextPesponsible" /> |
| | | <result column="install_operating_personnel" property="installOperatingPersonnel" /> |
| | | <result column="install_date" property="installDate" /> |
| | | <result column="installation_acceptance_compound_opinion" property="installationAcceptanceCompoundOpinion" /> |
| | | <result column="installation_acceptance_next_pesponsible" property="installationAcceptanceNextPesponsible" /> |
| | | <result column="installation_acceptance_operating_personnel" property="installationAcceptanceOperatingPersonnel" /> |
| | | <result column="installation_acceptance_date" property="installationAcceptanceDate" /> |
| | | <result column="acceptance_check_unpacking_conclusion" property="acceptanceCheckUnpackingConclusion" /> |
| | | <result column="acceptance_check_next_pesponsible" property="acceptanceCheckNextPesponsible" /> |
| | | <result column="acceptance_check_operating_personnel" property="acceptanceCheckOperatingPersonnel" /> |
| | | <result column="acceptance_check_date" property="acceptanceCheckDate" /> |
| | | <result column="acceptance_audit_operating_personnel" property="acceptanceAuditOperatingPersonnel" /> |
| | | <result column="acceptance_audit_date" property="acceptanceAuditDate" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="current_state" property="currentState" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="current_responsible" property="currentResponsible" /> |
| | | <result column="acceptance_audit_audit_opinion" property="acceptanceAuditAuditOpinion" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="IncidentReportAddDtoMap" type="com.yuanchu.mom.dto.IncidentReportAddDto" extends="BaseResultMap"> |
| | | <result column="device_name" property="deviceName" /> |
| | | <result column="management_number" property="managementNumber" /> |
| | | <result column="manufacturer" property="manufacturer" /> |
| | | <result column="specification_model" property="specificationModel" /> |
| | | <collection property="sparePartsConfirmationList" ofType="com.yuanchu.mom.pojo.IncidentSpareParts"> |
| | | <id column="spare_parts_id" property="sparePartsId" /> |
| | | <result column="name" property="name" /> |
| | | <result column="number" property="number" /> |
| | | <result column="note" property="note" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </collection> |
| | | <collection property="fileClassConfirmationList" ofType="com.yuanchu.mom.pojo.IncidentFile"> |
| | | <id column="file_id" property="fileId" /> |
| | | <result column="expected_copies" property="expectedCopies" /> |
| | | <result column="actual_copies" property="actualCopies" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </collection> |
| | | <collection property="installationAcceptanceRecordList" ofType="com.yuanchu.mom.pojo.IncidentInstall"> |
| | | <id column="install_id" property="installId" /> |
| | | <result column="installation_project" property="installationProject" /> |
| | | <result column="installation_situation" property="installationSituation" /> |
| | | <result column="installation_completed" property="installationCompleted" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </collection> |
| | | <collection property="acceptanceCheckRecordList" ofType="com.yuanchu.mom.pojo.IncidentAcceptanceCheck"> |
| | | <id column="acceptance_check_id" property="acceptanceCheckId" /> |
| | | <result column="instrument_module" property="instrumentModule" /> |
| | | <result column="verification_parameter" property="verificationParameter" /> |
| | | <result column="acceptable_limit" property="acceptableLimit" /> |
| | | <result column="verification_result" property="verificationResult" /> |
| | | <result column="verification_conclusion" property="verificationConclusion" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <select id="getByDeviceId" resultType="com.yuanchu.mom.dto.IncidentReportAddDto"> |
| | | select dir.*, d.device_name, d.management_number, u.name submitUser |
| | | from device_incident_report dir |
| | | left join device d on d.id = dir.device_id |
| | | left join user u on u.id = dir.create_user |
| | | where dir.device_id = #{deviceId} |
| | | <if test="processNumber != '' and processNumber != null"> |
| | | and dir.process_number like concat('%', #{processNumber}, '%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getShowIncidentReport" resultMap="IncidentReportAddDtoMap"> |
| | | select dir.*, d.device_name, d.management_number, d.manufacturer, d.specification_model, |
| | | diac.acceptance_check_id, diac.instrument_module,diac.verification_parameter, diac.acceptable_limit, diac.verification_result, diac.verification_conclusion, |
| | | disp.spare_parts_id, disp.name, disp.number, disp.note, |
| | | dif.file_id, dif.expected_copies, dif.actual_copies, |
| | | dii.install_id, dii.installation_completed, dii.installation_project, dii.installation_situation |
| | | from device_incident_report dir |
| | | left join device d on d.id = dir.device_id |
| | | left join device_incident_acceptance_check diac on diac.incident_id = dir.id |
| | | left join device_incident_file dif on dif.incident_id = dir.id |
| | | left join device_incident_install dii on dii.incident_id = dir.id |
| | | left join device_incident_spare_parts disp on disp.incident_id = dir.id |
| | | where dir.id = #{id} |
| | | </select> |
| | | |
| | | <select id="incidentReportExport" resultType="com.yuanchu.mom.excel.IncidentReportExport"> |
| | | select dir.*, d.device_name, d.management_number, d.manufacturer, d.specification_model |
| | | from device_incident_report dir |
| | | left join device d on d.id = dir.device_id |
| | | where dir.device_id = #{deviceId} |
| | | </select> |
| | | |
| | | <select id="acceptanceCertificateExport" resultType="com.yuanchu.mom.dto.IncidentReportExportWordDto"> |
| | | select |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.IncidentSparePartsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.IncidentSpareParts"> |
| | | <id column="spare_parts_id" property="sparePartsId" /> |
| | | <result column="name" property="name" /> |
| | | <result column="number" property="number" /> |
| | | <result column="note" property="note" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.DeviceRecordMapper"> |
| | | |
| | | <select id="deviceRecordPage" resultType="com.yuanchu.mom.dto.DeviceRecordDto"> |
| | | select dr.*, |
| | | d.device_name, |
| | | d.management_number |
| | | from device_record dr |
| | | left join device d on d.id = dr.device_id |
| | | where 1=1 |
| | | <if test="deviceId != null"> |
| | | and dr.device_id = #{deviceId} |
| | | </if> |
| | | <if test="sampleCode != '' and sampleCode != null"> |
| | | and dr.sample_code like concat('%', #{sampleCode}, '%') |
| | | </if> |
| | | <if test="managementNumber != '' and managementNumber != null"> |
| | | and d.management_number like concat('%', #{managementNumber}, '%') |
| | | </if> |
| | | <if test="userId != null"> |
| | | and dr.use_person_id = #{userId} |
| | | and dr.use_start_date is null |
| | | </if> |
| | | ORDER BY (dr.use_start_date IS NULL) desc , dr.use_start_date DESC |
| | | </select> |
| | | |
| | | |
| | | <select id="selectNotFilled" resultType="com.yuanchu.mom.dto.DeviceRecordDto"> |
| | | select dr.*, |
| | | d.device_name, |
| | | d.management_number |
| | | from device_record dr |
| | | left join device d on d.id = dr.device_id |
| | | where dr.use_start_date is null |
| | | </select> |
| | | |
| | | <!-- æ¥è¯¢å¯¼åºè®¾å¤ä½¿ç¨è®°å½ --> |
| | | <select id="selectExportList" resultType="com.yuanchu.mom.pojo.DeviceRecord"> |
| | | select dr.* |
| | | from device_record dr |
| | | where dr.use_start_date is not null |
| | | <if test="deviceId != null"> |
| | | and dr.device_id = #{deviceId} |
| | | </if> |
| | | <if test="exportDate != '' and exportDate != null"> |
| | | and DATE_FORMAT(dr.use_start_date, '%Y-%m') = #{exportDate}; |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.InstructionMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.Instruction"> |
| | | <id column="id" property="id" /> |
| | | <result column="application_number" property="applicationNumber" /> |
| | | <result column="person_liable" property="personLiable" /> |
| | | <result column="controlled_application_description" property="controlledApplicationDescription" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | <select id="pageByPageQueryOfHomeworkInstructions" resultType="com.yuanchu.mom.dto.OperationInstructionDto"> |
| | | SELECT |
| | | doi.*,di.*,d.device_name, d.management_number device_number, d.specification_model device_model, u.name uploader_name, u1.name approver_name |
| | | FROM |
| | | device_operation_instruction doi |
| | | LEFT JOIN device_instruction di ON di.id = doi.instruction_id |
| | | left join device d on d.id = doi.device_id |
| | | left join user u on u.id = doi.uploader |
| | | left join user u1 on u1.id = doi.approver_id |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.OperationInstructionMapper"> |
| | | |
| | | <select id="homeworkGuidebookEditor" resultType="com.yuanchu.mom.vo.OperationInstructionVo"> |
| | | SELECT |
| | | doi.*,d.device_name, d.management_number device_number, d.specification_model device_model |
| | | FROM |
| | | device_operation_instruction doi |
| | | left join device d on d.id = doi.device_id |
| | | where doi.instruction_id = #{instructionId} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.ReservationMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.Reservation"> |
| | | <id column="id" property="id" /> |
| | | <result column="device_id" property="deviceId" /> |
| | | <result column="device_name" property="deviceName" /> |
| | | <result column="customer_name" property="customerName" /> |
| | | <result column="reservation_time" property="reservationTime" /> |
| | | <result column="specific_time" property="specificTime" /> |
| | | <result column="link_person" property="linkPerson" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="device_number" property="deviceNumber" /> |
| | | <result column="reservation_specification" property="reservationSpecification" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_date" property="createDate" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectReservationParameterPage" resultType="com.yuanchu.mom.dto.ReservationDto"> |
| | | SELECT |
| | | a.id, |
| | | a.create_date, |
| | | a.create_user, |
| | | a.customer_name, |
| | | a.device_id, |
| | | a.device_name, |
| | | a.device_number, |
| | | a.link_person, |
| | | a.phone , |
| | | a.reservation_specification, |
| | | b.name |
| | | FROM |
| | | device_reservation a |
| | | INNER JOIN USER b ON a.create_user = b.id |
| | | where a.device_id = #{deviceId} and a.reservation_time = #{reservationTime} and a.specific_time=#{specificTime} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.enums; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | public enum QrModelType { |
| | | |
| | | WORD_TYPE("word","word_qr_show"), |
| | | DEVICE_TYPE("device","device_qr_show"); |
| | | |
| | | String type,value; |
| | | |
| | | QrModelType(String desc, String value) { |
| | | this.type = desc; |
| | | this.value = value; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç±»åè·åæä¸¾å¼ |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public static String getValueByType(String type){ |
| | | for (QrModelType qrModelType : QrModelType.values()) { |
| | | if(StringUtils.isNotBlank(type) && type.equals(qrModelType.getType())){ |
| | | return qrModelType.getValue(); |
| | | } |
| | | } |
| | | throw new IllegalArgumentException(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.utils; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.deepoove.poi.data.PictureRenderData; |
| | | import com.deepoove.poi.data.Pictures; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Author: yuan |
| | | * Date: 2024-12-17 ææäº 10:35:50 |
| | | * Description: Userå·¥å
·ç±» |
| | | */ |
| | | @Component |
| | | public class UserUtils { |
| | | private static UserMapper userMapper; |
| | | |
| | | private static String imgUrl; |
| | | |
| | | @Autowired |
| | | public void setUserMapper(UserMapper userMapper) { |
| | | UserUtils.userMapper = userMapper; |
| | | } |
| | | |
| | | @Autowired |
| | | public void setImgUrl(@Value("${file.path}") String imgUrl) { |
| | | UserUtils.imgUrl = imgUrl; |
| | | } |
| | | |
| | | /** |
| | | * éè¿äººåidè·åç¨æ·ç¾åå°å |
| | | * @param userId 人åid |
| | | * @return ç¨æ·ç¾åå°å |
| | | */ |
| | | public static String getUserSignatureUrl(Integer userId) { |
| | | String userSignatureUrl = null; |
| | | if (userId != null) { |
| | | userSignatureUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getId, userId)) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(userSignatureUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°è¯¥äººåç¾å"); |
| | | } |
| | | return imgUrl + "\\" + userSignatureUrl; |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éè¿äººåidè·å渲æWordç¨æ·ç¾å对象 |
| | | * @param userId 人åid |
| | | * @return ç¨æ·ç¾å对象 or null |
| | | */ |
| | | public static PictureRenderData getFinalUserSignatureUrl(Integer userId) { |
| | | String userSignatureUrl = null; |
| | | if (userId != null) { |
| | | userSignatureUrl = userMapper.selectById(userId) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(userSignatureUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°è¯¥äººåç¾å"); |
| | | } |
| | | } |
| | | return StringUtils.isNotBlank(userSignatureUrl) ? Pictures.ofLocal(imgUrl + "/" + userSignatureUrl).create() : null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éè¿ååè·å渲æWordç¨æ·ç¾å对象 |
| | | * @param userName 人ååå |
| | | * @return ç¨æ·ç¾å对象 or null |
| | | */ |
| | | public static PictureRenderData getFinalUserSignatureUrl(String userName) { |
| | | String userSignatureUrl = null; |
| | | if (userName != null) { |
| | | userSignatureUrl = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getName, userName)) |
| | | .getSignatureUrl(); |
| | | if (StringUtils.isBlank(userSignatureUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°è¯¥äººåç¾å"); |
| | | } |
| | | } |
| | | return StringUtils.isNotBlank(userSignatureUrl) ? Pictures.ofLocal(imgUrl + "/" + userSignatureUrl).create() : null; |
| | | } |
| | | } |