lims检测中心设备联调 设备停用/启用、设备故障表
已删除240个文件
已修改37个文件
已添加271个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.require.pojo.DeviceBorrow; |
| | | import com.ruoyi.require.service.DeviceBorrowService; |
| | | 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; |
| | | |
| | | |
| | | //å页 |
| | | @GetMapping("/deviceBorrowPage") |
| | | public Result deviceBorrowPage(Page page,DeviceBorrow deviceBorrow) throws Exception { |
| | | 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)); |
| | | } |
| | | |
| | | //å é¤ |
| | | @DeleteMapping("/deleteDeviceBorrow") |
| | | public Result deleteDeviceBorrow(Integer id) { |
| | | return Result.success(deviceBorrowService.removeById(id)); |
| | | } |
| | | |
| | | //å¯¼åº |
| | | @GetMapping("/deviceBorrowExport") |
| | | public Result deviceBorrowExport(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.ruoyi.require.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.DataConfigDto; |
| | | import com.ruoyi.require.dto.DeviceDto; |
| | | import com.ruoyi.require.pojo.Device; |
| | | import com.ruoyi.require.pojo.PkMaster; |
| | | import com.ruoyi.require.service.DataConfigService; |
| | | import com.ruoyi.require.service.DeviceService; |
| | | import com.ruoyi.require.service.PkMasterService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 设å¤(DeviceController)表æ§å¶å± |
| | | */ |
| | | @Api(tags = "设å¤") |
| | | @RestController |
| | | @RequestMapping("/deviceScope") |
| | | public class DeviceController { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Resource |
| | | private DeviceService deviceService; |
| | | |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | | |
| | | @Autowired |
| | | private DataConfigService dataConfigService; |
| | | |
| | | @Autowired |
| | | private PkMasterService pkMasterService; |
| | | |
| | | /** |
| | | * è·å人åä¿¡æ¯ |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @GetMapping("/selectUserList") |
| | | public Result selectUserList() { |
| | | return Result.success(deviceService.selectUserList()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®departLimsId è·å人å (selectUserListå端è°ç¨æ¥å£å¤ªå¤ å®¹ææ¥é) |
| | | */ |
| | | @GetMapping("/selectUserListByDepartLimsId") |
| | | public Result selectUserListByDepartLimsId(String departLimsId) { |
| | | return Result.success(deviceService.selectUserListByDepartLimsId(departLimsId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥ç设å¤äºç»´ç æé®") |
| | | @GetMapping("/showDeviceQrCodeButton") |
| | | public void showDeviceQrCodeButton() { } |
| | | |
| | | //设å¤å·¥å
·æç» |
| | | @ApiOperation(value = "æ¥è¯¢è®¾å¤è¯¦æ
å表") |
| | | @GetMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(Page page,DeviceDto deviceDto,Boolean laboratoryNameIsNull) { |
| | | return Result.success(deviceService.selectDeviceParameter(page, deviceDto, laboratoryNameIsNull)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å 设å¤è¯¦æ
åæ°") |
| | | @PostMapping("/addDeviceParameter") |
| | | public Result addDeviceParameter(@RequestBody Device itemParameter) { |
| | | return Result.success(deviceService.addDeviceParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤è®¾å¤è¯¦æ
åæ°") |
| | | @DeleteMapping("/delDeviceParameter") |
| | | public Result<?> delDeviceParameter(Integer id) { |
| | | return Result.success(deviceService.delDeviceParameter(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿®æ¹è®¾å¤è¯¦æ
åæ°") |
| | | @PostMapping("/upDeviceParameter") |
| | | public Result<?> upDeviceParameter(@RequestBody Device itemParameter) { |
| | | return Result.success(deviceService.upDeviceParameter(itemParameter)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¯å¦å
许修æ¹ééå¼") |
| | | @DeleteMapping("/isItAllowedToModifyTheCollectedValues") |
| | | public Result<?> isItAllowedToModifyTheCollectedValues() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åè®¾å¤æ»è§") |
| | | @GetMapping("/selectEquipmentOverview") |
| | | public Result selectEquipmentOverview() { |
| | | return Result.success(deviceService.selectEquipmentOverview()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·å被ææäºº") |
| | | @GetMapping("/authorizedPerson") |
| | | public Result authorizedPerson() { |
| | | return Result.success(deviceService.authorizedPerson()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æç´¢") |
| | | @GetMapping("/search") |
| | | public Result search(Integer status, String deviceName, String specificationModel, String largeCategory) { |
| | | return Result.success(deviceService.search(status, deviceName, specificationModel, largeCategory)); |
| | | } |
| | | |
| | | //å¾çä¸ä¼ |
| | | @ApiOperation(value = "设å¤å¾çä¸ä¼ ") |
| | | @PostMapping("/uploadFile") |
| | | public Result uploadFile(MultipartFile file) { |
| | | |
| | | System.out.println(file); |
| | | String urlString; |
| | | String pathName; |
| | | String filename = file.getOriginalFilename(); |
| | | try { |
| | | String path = filePath; |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMdd")) + "-" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("name", filename); |
| | | map.put("url", pathName); |
| | | return Result.success(map); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("å¾çä¸ä¼ é误"); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "è·å设å¤è´è´£äºº") |
| | | @GetMapping("/selectDevicePrincipal") |
| | | public Result selectDevicePrincipal() { |
| | | return Result.success(deviceService.selectDevicePrincipal()); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿é¡¹ç®è·å设å¤å表") |
| | | @PostMapping("/selectDeviceByCategory") |
| | | public Result selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass,String sonLaboratory) { |
| | | return Result.success(deviceService.selectDeviceByCategory(inspectionItem, inspectionItemSubclass,sonLaboratory)); |
| | | } |
| | | |
| | | @ApiOperation(value = "éè¿è®¾å¤ç¼å·è·å设å¤å表") |
| | | @GetMapping("/selectDeviceByCode") |
| | | public Result<DeviceDto> selectDeviceByCode(Integer id) { |
| | | return Result.success(deviceService.selectDeviceByCode(id)); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param request å请æ±ä¸çip |
| | | * @param id æ£éªæ ·å 主é®id |
| | | * @param entrustCode å§æç¼å· |
| | | * @param sampleCode æ ·åç¼å· |
| | | * @param fiberOpticRibbon å
纤带ç¼å· |
| | | * @return |
| | | */ |
| | | @ApiOperation("/æ°é-æ°æ®éé") |
| | | @GetMapping("/dataCollection") |
| | | public Result<?> dataAcquisition(HttpServletRequest request, |
| | | @RequestParam("id") Integer id, |
| | | @RequestParam("entrustCode") String entrustCode, |
| | | @RequestParam("sampleCode") String sampleCode, |
| | | @RequestParam(value = "fiberOpticRibbon", required = false) String fiberOpticRibbon) { |
| | | return deviceService.dataAcquisition(request, id, entrustCode, sampleCode, fiberOpticRibbon); |
| | | } |
| | | |
| | | @ApiOperation(value = "å¤æè¯¥è®¾å¤æ¯å¦å¯ä»¥æ°é") |
| | | @GetMapping("/determineWhetherToCollectData") |
| | | public Result<?> determineWhetherToCollectData(@RequestParam("managementNumber") String managementNumber, HttpServletRequest request) { |
| | | return deviceService.determineWhetherToCollectData(managementNumber, request); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»´æ¤æ°éé
ç½®") |
| | | @PostMapping("/saveDataAcquisitionConfiguration") |
| | | public Result<?> saveDataAcquisitionConfiguration(@RequestParam(value = "deviceId") Integer deviceId, @RequestBody DataConfigDto dataConfigList) { |
| | | dataConfigService.saveDataAcquisitionConfiguration(deviceId, dataConfigList); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢æ°éé
ç½®") |
| | | @GetMapping("/queryDataAcquisitionConfiguration") |
| | | public Result<?> queryDataAcquisitionConfiguration(@RequestParam("deviceId") Integer deviceId, |
| | | @RequestParam("isDevice") Boolean isDevice, |
| | | @RequestParam(value = "inspectionItem", required = false) String inspectionItem, |
| | | @RequestParam(value = "inspectionItemSubclass", required = false) String inspectionItemSubclass) { |
| | | return dataConfigService.queryDataAcquisitionConfiguration(deviceId, isDevice, inspectionItem, inspectionItemSubclass); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿°éé
ç½®") |
| | | @DeleteMapping("/deleteDataAcquisitionConfiguration") |
| | | public Result<?> deleteDataAcquisitionConfiguration(@RequestParam("ids") String ids) { |
| | | List<String> split = Arrays.asList(ids.split(",")); |
| | | List<String> collect = split.stream().distinct().collect(Collectors.toList()); |
| | | dataConfigService.removeBatchByIds(collect); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "èå") |
| | | @PostMapping("/menu") |
| | | public Result menu() { |
| | | return Result.success(deviceService.menu()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¸©åº¦å¾ªç¯æ°é") |
| | | @PostMapping("/temDataAcquisition") |
| | | public Result<?> temDataAcquisition(@RequestBody PkMaster pkMaster) { |
| | | return Result.success(pkMasterService.temDataAcquisition(pkMaster)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å·¦ä¾§è®¾å¤æ å½¢æ ") |
| | | @GetMapping("/treeDevice") |
| | | public Result treeDevice(String deviceName) { |
| | | return Result.success(deviceService.treeDevice(deviceName)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¸©åº¦å¾ªç¯æ°éæ»ä½") |
| | | @PostMapping("/temDataAcquisition2") |
| | | public Result<?> temDataAcquisition2(@RequestBody PkMaster pkMaster) { |
| | | return Result.success(pkMasterService.temDataAcquisition2(pkMaster)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å表ç»è®¡å¯¼åº") |
| | | @PostMapping("/export") |
| | | public void exportData(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | // DeviceDto deviceDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceDto.class); |
| | | // deviceService.export(deviceDto,response); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.pojo.DeviceFault; |
| | | import com.ruoyi.require.service.DeviceFaultService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/deviceFaults") |
| | | 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") |
| | | public Result<Map<String,Object>> getDeviceFaultsByDeviceId(Integer deviceId) { |
| | | return Result.success(deviceFaultService.findByDeviceId(deviceId)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.require.dto.DeviceFaultOneDto; |
| | | import com.ruoyi.require.excel.DeviceFaultOneExport; |
| | | import com.ruoyi.require.pojo.DeviceFaultOne; |
| | | import com.ruoyi.require.service.DeviceFaultOneService; |
| | | 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(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 = "奿©è®°å½å¯¼åº") |
| | | @GetMapping("exportRewardAndPunishmentRecords") |
| | | public void rewardPunishmentExport(@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.ruoyi.require.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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.require.dto.DeviceMaintenanceExport; |
| | | import com.ruoyi.require.pojo.DeviceMaintenance; |
| | | import com.ruoyi.require.service.DeviceMaintenanceService; |
| | | 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("/deviceMaintain") |
| | | public class DeviceMaintenanceController { |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceService deviceMaintenanceService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceMaintenance> numberGenerator; |
| | | //å¢ |
| | | @PostMapping("/add") |
| | | public Result create(@RequestBody 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(Page page, String deviceNumber,Integer deviceId){ |
| | | return Result.success(deviceMaintenanceService.getDeviceMaintenancePage(page, deviceId, deviceNumber)); |
| | | } |
| | | |
| | | //å |
| | | @DeleteMapping("/delete") |
| | | public void deleteDeviceFault(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(); |
| | | } |
| | | |
| | | /** |
| | | * åå
æ ¼æ ·å¼çç¥ |
| | | */ |
| | | 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.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.pojo.DeviceMetric; |
| | | import com.ruoyi.require.service.IDeviceMetricService; |
| | | 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.ruoyi.require.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.FileSaveUtil; |
| | | import com.ruoyi.require.dto.DeviceMetricRecordDto; |
| | | import com.ruoyi.require.pojo.Device; |
| | | import com.ruoyi.require.pojo.DeviceMetricRecord; |
| | | import com.ruoyi.require.pojo.DeviceMetricsCopy; |
| | | import com.ruoyi.require.service.DeviceMetricRecordService; |
| | | import com.ruoyi.require.service.DeviceMetricsCopyService; |
| | | import com.ruoyi.require.service.DeviceService; |
| | | 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; |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | 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; |
| | | |
| | | @Autowired |
| | | private DeviceService deviceService; |
| | | |
| | | @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 (deviceMetricRecordDto.getType().equals("calibrate")) { |
| | | deviceService.update(Wrappers.<Device>lambdaUpdate() |
| | | .set(Device::getCalibrationServices,deviceMetricRecordDto.getUnitOfMeasure()) |
| | | .eq(Device::getId,deviceMetricRecordDto.getDeviceId())); |
| | | } |
| | | 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()); |
| | | boolean b = deviceMetricRecordService.removeById(id); |
| | | // ä¿®æ¹è®¾å¤çæ ¡åæºæ |
| | | if (deviceMetricRecord.getType().equals("calibrate")) { |
| | | List<DeviceMetricRecord> list = deviceMetricRecordService.list(Wrappers.<DeviceMetricRecord>lambdaQuery() |
| | | .eq(DeviceMetricRecord::getType,"calibrate") |
| | | .eq(DeviceMetricRecord::getDeviceId, deviceMetricRecord.getDeviceId())); |
| | | int size = list.size(); |
| | | // 设置设å¤ä¸çæ ¡åæºæä¸ºä¸æ¬¡çæºæ |
| | | deviceService.update(Wrappers.<Device>lambdaUpdate() |
| | | .set(Device::getCalibrationServices,size == 0 ? null : list.get(size - 1).getUnitOfMeasure()) |
| | | .eq(Device::getId,deviceMetricRecord.getDeviceId())); |
| | | } |
| | | return Result.success(b); |
| | | } |
| | | |
| | | @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))); |
| | | } |
| | | |
| | | @GetMapping("/deviceMetricRecordExport") |
| | | public Result deviceMetricRecordExport(@RequestParam("deviceId") Integer deviceId, @RequestParam("type") String type, HttpServletResponse response) throws IOException { |
| | | List<DeviceMetricRecord> list = deviceMetricRecordService.page(new Page<>(-1,-1), Wrappers.<DeviceMetricRecord>lambdaQuery() |
| | | .eq(DeviceMetricRecord::getDeviceId, deviceId) |
| | | .eq(DeviceMetricRecord::getType, type)).getRecords(); |
| | | list.forEach(i -> i.setStatus(i.getStatus().equals("0yes") ? "åæ ¼" : "ä¸åæ ¼")); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(DeviceMetricRecord.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet() |
| | | .doWrite(list); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.require.excel.DeviceRecordExport; |
| | | import com.ruoyi.require.pojo.DeviceRecord; |
| | | import com.ruoyi.require.service.DeviceRecordService; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/deviceRecord") |
| | | public class DeviceRecordController { |
| | | @Autowired |
| | | private DeviceRecordService deviceRecordService; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceRecord> numberGenerator; |
| | | |
| | | @GetMapping("/deviceRecordPage") |
| | | public Result incidentReportPages(@RequestParam("deviceId") Integer deviceId, Page page, String deviceNumber) { |
| | | return Result.success(deviceRecordService.deviceRecordPage(deviceId, page, deviceNumber)); |
| | | } |
| | | |
| | | @PostMapping("/saveDeviceRecord") |
| | | public Result saveDeviceRecords(@RequestBody DeviceRecord deviceRecord) { |
| | | 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, DeviceRecord::getDeviceNumber); |
| | | deviceRecord.setDeviceNumber(processNumber); |
| | | return Result.success(deviceRecordService.save(deviceRecord)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceRecord") |
| | | public Result deleteDeviceRecords(@RequestParam("id") Integer id) { |
| | | return Result.success(deviceRecordService.removeById(id)); |
| | | } |
| | | |
| | | @GetMapping("/deviceRecordExport") |
| | | public Result incidentReportExport(@RequestParam("deviceId") Integer deviceId, HttpServletResponse response) throws IOException { |
| | | List<DeviceRecordExport> list = deviceRecordService.incidentReportExport(deviceId); |
| | | response.setHeader("requestType", "excel"); |
| | | response.setHeader("Access-Control-Expose-Headers", "requestType"); |
| | | // 设置åå
æ ¼æ ·å¼ |
| | | // ä¿åå°ç¬¬ä¸ä¸ªsheetä¸ |
| | | EasyExcel.write(response.getOutputStream()) |
| | | .head(DeviceRecordExport.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet() |
| | | .doWrite(list); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.require.dto.DeviceStateDto; |
| | | import com.ruoyi.require.excel.DeviceStateExport; |
| | | import com.ruoyi.require.pojo.DeviceState; |
| | | import com.ruoyi.require.service.DeviceStateService; |
| | | 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)); |
| | | } |
| | | |
| | | @GetMapping("/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(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.pojo.Document; |
| | | import com.ruoyi.require.service.DocumentService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RestController |
| | | @RequestMapping("/documents") |
| | | public class DocumentController { |
| | | |
| | | @Resource |
| | | private DocumentService documentService; |
| | | |
| | | @PostMapping("add") |
| | | public Result createDocument(@RequestBody Document document) { |
| | | documentService.save(document); |
| | | return Result.success("ok"); |
| | | } |
| | | |
| | | @GetMapping("/id") |
| | | public Document getDocumentById(Integer id) { |
| | | return documentService.getById(id); |
| | | } |
| | | |
| | | @PostMapping("updateDocument") |
| | | public Result updateDocument(@RequestBody Document document) { |
| | | return Result.success(documentService.updateById(document)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDocumentById") |
| | | public Result deleteDocumentById( Integer id) { |
| | | return Result.success(documentService.removeById(id)); |
| | | } |
| | | |
| | | @GetMapping("/getListByDId") |
| | | public Result getAllDocuments(Integer id) { |
| | | LambdaQueryWrapper<Document> lambdaQueryWrapper=new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(Document::getDeviceId,id); |
| | | return Result.success(documentService.list(lambdaQueryWrapper)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.read.listener.PageReadListener; |
| | | 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.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.excel.FeCalibrationScheduleExport; |
| | | import com.ruoyi.require.pojo.FeCalibrationSchedule; |
| | | import com.ruoyi.require.service.FeCalibrationScheduleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 仪å¨è®¾å¤æ£å®/æ ¡å计å表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 02:53:05 |
| | | */ |
| | | @Api(tags = "é弿º¯æºè®¡å") |
| | | @RestController |
| | | @RequestMapping("/feCalibrationSchedule") |
| | | public class FeCalibrationScheduleController { |
| | | |
| | | @Resource |
| | | private FeCalibrationScheduleService feCalibrationScheduleService; |
| | | |
| | | @ApiOperation(value = "é弿º¯æºè®¡åæ¥è¯¢") |
| | | @GetMapping("/getPageCalibrationSchedule") |
| | | public Result<IPage<FeCalibrationSchedule>> getPageCalibrationSchedule(Page page, String instrumentName, String managementNumber) { |
| | | IPage<FeCalibrationSchedule> ipage = feCalibrationScheduleService.page(page,instrumentName, managementNumber); |
| | | return Result.success(ipage); |
| | | } |
| | | |
| | | @ApiOperation(value = "é弿º¯æºè®¡åæ°å¢ç¼è¾") |
| | | @PostMapping("/addCalibrationSchedule") |
| | | public Result addCalibrationSchedule(@RequestBody FeCalibrationSchedule feCalibrationSchedule) { |
| | | return Result.success(feCalibrationScheduleService.saveOrUpdate(feCalibrationSchedule)); |
| | | } |
| | | |
| | | @ApiOperation(value = "é弿º¯æºè®¡åå é¤") |
| | | @DeleteMapping("/removeCalibrationSchedule") |
| | | public Result removeCalibrationSchedule(Integer id) { |
| | | return Result.success(feCalibrationScheduleService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "é弿º¯æºè®¡å导åº") |
| | | @GetMapping("exportOfValueTraceabilityPlan") |
| | | public void exportOfValueTraceabilityPlan(String instrumentName, String managementNumber, |
| | | HttpServletResponse response) throws Exception { |
| | | IPage<FeCalibrationSchedule> data = feCalibrationScheduleService.page(new Page<>(-1, -1),instrumentName, managementNumber); |
| | | List<FeCalibrationScheduleExport> studentList = JSONObject.parseArray(JSON.toJSONString(data.getRecords()), FeCalibrationScheduleExport.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(FeCalibrationScheduleExport.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet("sheet") |
| | | .doWrite(studentList); |
| | | } |
| | | |
| | | @ApiOperation(value = "é弿º¯æºè®¡å导å
¥") |
| | | @PostMapping("/importOfValueTraceabilityPlan") |
| | | public void importOfValueTraceabilityPlan(MultipartFile file) throws IOException { |
| | | if (file.isEmpty()) { |
| | | return; |
| | | } |
| | | EasyExcel.read(file.getInputStream(), FeCalibrationScheduleExport.class, new PageReadListener<FeCalibrationScheduleExport>(dataList -> { |
| | | List<FeCalibrationSchedule> studentList = JSONObject.parseArray(JSON.toJSONString(dataList), FeCalibrationSchedule.class); |
| | | feCalibrationScheduleService.saveOrUpdateBatch(studentList); |
| | | })).sheet().doRead(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.FeIlluminationAddDto; |
| | | import com.ruoyi.require.dto.FeIlluminationDto; |
| | | import com.ruoyi.require.pojo.FeIllumination; |
| | | import com.ruoyi.require.pojo.FeIlluminationDetectionArea; |
| | | import com.ruoyi.require.service.FeIlluminationDetectionAreaService; |
| | | import com.ruoyi.require.service.FeIlluminationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:15:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/feIllumination") |
| | | @Api(tags = "设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨") |
| | | public class FeIlluminationController { |
| | | |
| | | @Autowired |
| | | private FeIlluminationService feIlluminationService; |
| | | |
| | | @Autowired |
| | | private FeIlluminationDetectionAreaService feIlluminationDetectionAreaService; |
| | | |
| | | @PostMapping("addFeLightningProtection") |
| | | @ApiOperation("设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå æ°å¢/ä¿®æ¹") |
| | | public Result<?> addFeLightningProtection(@RequestBody FeIlluminationAddDto feIlluminationAddDto) { |
| | | FeIllumination feIllumination = new FeIllumination(); |
| | | BeanUtils.copyProperties(feIlluminationAddDto, feIllumination); |
| | | feIlluminationService.saveOrUpdate(feIllumination); |
| | | feIlluminationAddDto.getIlluminationDetectionAreaList().forEach(i -> i.setIntensityIlluminationId(feIllumination.getIntensityIlluminationId())); |
| | | feIlluminationDetectionAreaService.saveOrUpdateBatch(feIlluminationAddDto.getIlluminationDetectionAreaList()); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @DeleteMapping("deleteFeLightningProtection") |
| | | @ApiOperation("设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå å é¤") |
| | | public Result<?> deleteFeLightningProtection(@RequestParam("intensityIlluminationId") Integer intensityIlluminationId) { |
| | | feIlluminationService.removeById(intensityIlluminationId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("getFeLightningProtection") |
| | | @ApiOperation("ç
§åº¦è®°å½è¡¨-æ£æµåºå æ¥è¯¢") |
| | | public Result<IPage<FeIlluminationDto>> getFeLightningProtection(Page page) { |
| | | IPage<FeIlluminationDto> page1 = feIlluminationService.getFeLightningProtection(page); |
| | | return Result.success(page1); |
| | | } |
| | | |
| | | @DeleteMapping("deleteFeIlluminationDetectionArea") |
| | | @ApiOperation("ç
§åº¦è®°å½è¡¨-æ£æµåºå å é¤") |
| | | public Result<?> deleteFeIlluminationDetectionArea(@RequestParam("detectionAreaId") Integer detectionAreaId) { |
| | | return Result.success(feIlluminationDetectionAreaService.removeById(detectionAreaId)); |
| | | } |
| | | |
| | | @GetMapping("getFeIlluminationDetectionArea") |
| | | @ApiOperation("ç
§åº¦è®°å½è¡¨-æ£æµåºå æ ¹æ®ç
§åº¦è®°å½æ¥è¯¢") |
| | | public Result<?> getFeIlluminationDetectionArea(@RequestParam("intensityIlluminationId") Integer intensityIlluminationId) { |
| | | return Result.success(feIlluminationDetectionAreaService.list(Wrappers.<FeIlluminationDetectionArea>lambdaQuery() |
| | | .eq(FeIlluminationDetectionArea::getIntensityIlluminationId, intensityIlluminationId))); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç
§åº¦è®°å½ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºç
§åº¦è®°å½") |
| | | @GetMapping("/exportFeIllumination") |
| | | public void exportFeIllumination(Integer intensityIlluminationId, HttpServletResponse response){ |
| | | feIlluminationService.exportFeIllumination(intensityIlluminationId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.FileSaveUtil; |
| | | import com.ruoyi.require.excel.FeLightningProtectionExcel; |
| | | import com.ruoyi.require.pojo.FeLightningProtection; |
| | | import com.ruoyi.require.service.FeLightningProtectionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:36 |
| | | */ |
| | | @Api(tags = "设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµ") |
| | | @RestController |
| | | @RequestMapping("/feLightningProtection") |
| | | public class FeLightningProtectionController { |
| | | |
| | | @Autowired |
| | | private FeLightningProtectionService feLightningProtectionService; |
| | | |
| | | @PostMapping("addLightningProtectionDetection") |
| | | @ApiOperation("设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµæ°å¢/ä¿®æ¹") |
| | | public Result<?> addLightningProtectionDetection(FeLightningProtection feLightningProtection, |
| | | @RequestPart(value = "file", required = false) MultipartFile file) { |
| | | if (ObjectUtils.isNotEmpty(file)) { |
| | | String s = FileSaveUtil.StoreFile(file); |
| | | feLightningProtection.setSystemFileName(s); |
| | | feLightningProtection.setFileName(file.getOriginalFilename()); |
| | | } |
| | | feLightningProtectionService.saveOrUpdate(feLightningProtection); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @DeleteMapping("deleteLightningProtectionDetection") |
| | | @ApiOperation("设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµå é¤") |
| | | public Result<?> deleteFeLightningProtection(@RequestParam("lightningProtectionId") Integer lightningProtectionId) { |
| | | feLightningProtectionService.removeById(lightningProtectionId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("getLightningProtectionDetection") |
| | | @ApiOperation("设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµæ¥è¯¢") |
| | | public Result<IPage<FeLightningProtection>> getFeLightningProtection(Page page) { |
| | | IPage<FeLightningProtection> page1 = feLightningProtectionService.page(page); |
| | | return Result.success(page1); |
| | | } |
| | | |
| | | @ApiOperation(value = "设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµå¯¼åº") |
| | | @GetMapping("exportOfLightningProtectionDetection") |
| | | public void exportOfLightningProtectionDetection(HttpServletResponse response) throws Exception { |
| | | List<FeLightningProtectionExcel> ipage = feLightningProtectionService.exportOfLightningProtectionDetection(); |
| | | 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(FeLightningProtectionExcel.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet("sheet") |
| | | .doWrite(ipage); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.FePowerStableAddDto; |
| | | import com.ruoyi.require.dto.FePowerStableDto; |
| | | import com.ruoyi.require.pojo.FeMeasuredQuantity; |
| | | import com.ruoyi.require.pojo.FePowerStable; |
| | | import com.ruoyi.require.service.FeMeasuredQuantityService; |
| | | import com.ruoyi.require.service.FePowerStableService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:52 |
| | | */ |
| | | @Api(tags = "设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§") |
| | | @RestController |
| | | @RequestMapping("/fePowerStable") |
| | | public class FePowerStableController { |
| | | |
| | | @Autowired |
| | | private FeMeasuredQuantityService feMeasuredQuantityService; |
| | | |
| | | @Autowired |
| | | private FePowerStableService fePowerStableService; |
| | | |
| | | @PostMapping("addLaboratoryFacilityPowerStable") |
| | | @ApiOperation("çµæºç¨³å®æ§æ°å¢/ä¿®æ¹") |
| | | public Result<?> addLaboratoryFacilityPowerStable(@RequestBody FePowerStableAddDto fePowerStableAddDto) { |
| | | FePowerStable fePowerStable = new FePowerStable(); |
| | | BeanUtils.copyProperties(fePowerStableAddDto, fePowerStable); |
| | | fePowerStableService.saveOrUpdate(fePowerStable); |
| | | fePowerStableAddDto.getFeMeasuredQuantityList().forEach(i -> i.setPowerStableId(fePowerStable.getPowerStableId())); |
| | | feMeasuredQuantityService.saveOrUpdateBatch(fePowerStableAddDto.getFeMeasuredQuantityList()); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @DeleteMapping("deleteLaboratoryFacilityPowerStable") |
| | | @ApiOperation("çµæºç¨³å®æ§å é¤") |
| | | public Result<FePowerStable> deleteLaboratoryFacilityPowerStable(@RequestParam("powerStableId") Integer powerStableId) { |
| | | fePowerStableService.removeById(powerStableId); |
| | | feMeasuredQuantityService.remove(Wrappers.<FeMeasuredQuantity>lambdaQuery() |
| | | .eq(FeMeasuredQuantity::getPowerStableId, powerStableId)); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("getLaboratoryFacilityPowerStablePage") |
| | | @ApiOperation("çµæºç¨³å®æ§æ¥è¯¢") |
| | | public Result<IPage<FePowerStableDto>> getLaboratoryFacilityPowerStablePage( |
| | | Page page) { |
| | | IPage<FePowerStableDto> page1 = fePowerStableService.getLaboratoryFacilityPowerStablePage(page); |
| | | return Result.success(page1); |
| | | } |
| | | |
| | | @ApiOperation("éæ©è®¾å¤åæ¥è¯¢ææ°è®¾å¤ç¼å·ï¼æ ¡åæ¥æ") |
| | | @GetMapping("getCalibrationDate") |
| | | public Result<?> getCalibrationDate(@RequestParam("deviceId") Integer deviceId) { |
| | | return Result.success(fePowerStableService.getCalibrationDate(deviceId)); |
| | | } |
| | | |
| | | @DeleteMapping("deleteFeMeasuredQuantity") |
| | | @ApiOperation("çµæºç¨³å®æ§-æµå®é å é¤") |
| | | public Result<?> deleteFeMeasuredQuantity(@RequestParam("measuredQuantityId") Integer measuredQuantityId) { |
| | | return Result.success(feMeasuredQuantityService.removeById(measuredQuantityId)); |
| | | } |
| | | |
| | | @GetMapping("getFeMeasuredQuantityService") |
| | | @ApiOperation("çµæºç¨³å®æ§-æµå®é æ ¹æ®çµæºç¨³å®æ§æ¥è¯¢") |
| | | public Result<?> getFeMeasuredQuantityService(@RequestParam("powerStableId") Integer powerStableId) { |
| | | return Result.success(feMeasuredQuantityService.list(Wrappers.<FeMeasuredQuantity>lambdaQuery() |
| | | .eq(FeMeasuredQuantity::getPowerStableId, powerStableId))); |
| | | } |
| | | |
| | | /** |
| | | * 导åºçµæºç¨³å®æ§ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºçµæºç¨³å®æ§") |
| | | @GetMapping("/exportFePowerStable") |
| | | public void exportFePowerStable(Integer powerStableId, HttpServletResponse response){ |
| | | fePowerStableService.exportFePowerStable(powerStableId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.AcceptanceDto; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptanceInspection; |
| | | import com.ruoyi.require.service.FeStandardSubstanceAcceptanceInspectionService; |
| | | import com.ruoyi.require.service.FeStandardSubstanceAcceptanceService; |
| | | import com.ruoyi.require.vo.AcceptanceVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨éªæ¶ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:29:41 |
| | | */ |
| | | @Api(tags = "æ åç©è´¨éªæ¶") |
| | | @RestController |
| | | @RequestMapping("/feStandardSubstanceAcceptance") |
| | | public class FeStandardSubstanceAcceptanceController { |
| | | |
| | | @Autowired |
| | | private FeStandardSubstanceAcceptanceInspectionService inspectionService; |
| | | @Resource |
| | | private FeStandardSubstanceAcceptanceService feStandardSubstanceAcceptanceService; |
| | | |
| | | @ApiOperation(value = "æ°å¢") |
| | | @PostMapping("/addAcceptance") |
| | | @Transactional |
| | | public Result addAcceptance(@RequestBody AcceptanceDto dto) { |
| | | feStandardSubstanceAcceptanceService.addAcceptance(dto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨éªæ¶æ¥è¯¢") |
| | | @GetMapping("/getPageAcceptance") |
| | | public Result<IPage<AcceptanceVo>> getPageAcceptance(Page page, String name) { |
| | | IPage<AcceptanceVo> ipage = feStandardSubstanceAcceptanceService.getPageAcceptance(page, name); |
| | | return Result.success(ipage); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨éªæ¶å é¤") |
| | | @DeleteMapping("/deleteAcceptance/{id}") |
| | | public Result deleteAcceptance(@PathVariable("id") Integer id) { |
| | | return Result.success(feStandardSubstanceAcceptanceService.deleteAcceptance(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç¼è¾") |
| | | @PostMapping("/updateAcceptance") |
| | | public Result updateAcceptance(@RequestBody AcceptanceDto acceptanceDto) { |
| | | feStandardSubstanceAcceptanceService.updateById(acceptanceDto.getAcceptance()); |
| | | for (FeStandardSubstanceAcceptanceInspection v : acceptanceDto.getList()) { |
| | | if (v.getId()== null) { |
| | | inspectionService.save(v); |
| | | }else { |
| | | inspectionService.updateById(v); |
| | | } |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨éªæ¶æ¥è¯¢") |
| | | @GetMapping("/getAcceptanceDetails") |
| | | public Result getAcceptanceDetails(Integer id) { |
| | | return Result.success(feStandardSubstanceAcceptanceService.getAcceptanceDetails(id)); |
| | | } |
| | | |
| | | @ApiOperation("å¯¼åºæ åç©è´¨éªæ¶") |
| | | @GetMapping("/exportFeStandardSubstanceAcceptance") |
| | | public Result exportFeStandardSubstanceAcceptance(HttpServletResponse response) { |
| | | feStandardSubstanceAcceptanceService.exportFeStandardSubstanceAcceptance(response); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptanceInspection; |
| | | import com.ruoyi.require.service.FeStandardSubstanceAcceptanceInspectionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | | * éªæ¶å¼ç®±è®°å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:30:09 |
| | | */ |
| | | @Api(tags = "éªæ¶å¼ç®±è®°å½") |
| | | @RestController |
| | | @RequestMapping("/feStandardSubstanceAcceptanceInspection") |
| | | public class FeStandardSubstanceAcceptanceInspectionController { |
| | | |
| | | |
| | | @Resource |
| | | private FeStandardSubstanceAcceptanceInspectionService feStandardSubstanceAcceptanceInspectionService; |
| | | |
| | | |
| | | @ApiOperation(value = "æ°å¢æç¼è¾") |
| | | @PostMapping("/addInspection") |
| | | public Result addInspection(@RequestBody FeStandardSubstanceAcceptanceInspection inspection) { |
| | | feStandardSubstanceAcceptanceInspectionService.saveOrUpdate(inspection); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.excel.FeStandardSubstanceExcel; |
| | | import com.ruoyi.require.pojo.FeStandardSubstance; |
| | | import com.ruoyi.require.service.FeStandardSubstanceService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨æ¸
å å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:58:59 |
| | | */ |
| | | @Api(tags = "æ åç©è´¨æ¸
å") |
| | | @RestController |
| | | @RequestMapping("/feStandardSubstance") |
| | | public class FeStandardSubstanceController { |
| | | |
| | | |
| | | @Resource |
| | | private FeStandardSubstanceService feStandardSubstanceService; |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨æ¸
åæ¥è¯¢") |
| | | @GetMapping("/getPageStandardSubstance") |
| | | public Result<IPage<FeStandardSubstance>> getPageStandardSubstance(Page page, FeStandardSubstance feStandardSubstance) { |
| | | IPage<FeStandardSubstance> ipage = feStandardSubstanceService.page(page, feStandardSubstance); |
| | | return Result.success(ipage); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨æ¸
åæ°å¢ç¼è¾") |
| | | @PostMapping("/addStandardSubstance") |
| | | public Result addStandardSubstance(@RequestBody FeStandardSubstance feStandardSubstance) { |
| | | return Result.success(feStandardSubstanceService.saveOrUpdate(feStandardSubstance)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨æ¸
åå é¤") |
| | | @DeleteMapping("/removeStandardSubstance") |
| | | public Result removeStandardSubstance(Integer id) { |
| | | return Result.success(feStandardSubstanceService.removeById(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨æ¸
åæ¥è¯¢ææ") |
| | | @GetMapping("/getStandardSubstanceAll") |
| | | public Result<List<FeStandardSubstance>> getStandardSubstanceAll( ) { |
| | | return Result.success(feStandardSubstanceService.list()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨æ¸
å导åº") |
| | | @GetMapping("exportOfStandardSubstanceList") |
| | | public void exportOfStandardSubstanceList(FeStandardSubstance feStandardSubstance, |
| | | HttpServletResponse response) throws Exception { |
| | | IPage<FeStandardSubstance> ipage = feStandardSubstanceService.page(new Page<>(1, -1), feStandardSubstance); |
| | | List<FeStandardSubstanceExcel> studentList = JSONObject.parseArray(JSON.toJSONString(ipage.getRecords()), FeStandardSubstanceExcel.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(FeStandardSubstanceExcel.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // èªéåºå宽 |
| | | .sheet("sheet") |
| | | .doWrite(studentList); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceRecord; |
| | | import com.ruoyi.require.service.FeStandardSubstanceRecordService; |
| | | import com.ruoyi.require.vo.SubstanceRecordVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨æ¸
ååç¨å½è¿è®°å½è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 01:49:11 |
| | | */ |
| | | @Api(tags = "æ åç©è´¨æ¸
ååç¨å½è¿è®°å½") |
| | | @RestController |
| | | @RequestMapping("/feStandardSubstanceRecord") |
| | | public class FeStandardSubstanceRecordController { |
| | | |
| | | @Resource |
| | | private FeStandardSubstanceRecordService feStandardSubstanceRecordService; |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨æ¸
ååç¨") |
| | | @PostMapping("/borrowSubstance") |
| | | @Transactional |
| | | public Result borrowSubstance(@RequestBody FeStandardSubstanceRecord record) { |
| | | feStandardSubstanceRecordService.borrowSubstance(record); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨æ¸
åå½è¿") |
| | | @PostMapping("/returnSubstance") |
| | | @Transactional |
| | | public Result returnSubstance(@RequestBody FeStandardSubstanceRecord record) { |
| | | feStandardSubstanceRecordService.returnSubstance(record); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ åç©è´¨æ¸
åé¢ç¨æ¥è¯¢") |
| | | @GetMapping("/getSubstanceRecord") |
| | | public Result getSubstanceRecord(Integer id) { |
| | | return Result.success(feStandardSubstanceRecordService.getSubstanceRecord(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @GetMapping("/getPageSubstanceRecord") |
| | | public Result<IPage<SubstanceRecordVo>> getPageSubstanceRecord(Page page, SubstanceRecordVo vo) { |
| | | IPage<SubstanceRecordVo> ipage = feStandardSubstanceRecordService.getPage(page,vo); |
| | | return Result.success(ipage); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.FeTempHumDateDto; |
| | | import com.ruoyi.require.dto.FeTempHumRecordDto; |
| | | import com.ruoyi.require.pojo.FeTempHumDate; |
| | | import com.ruoyi.require.pojo.FeTempHumRecord; |
| | | import com.ruoyi.require.service.FeTempHumDateService; |
| | | import com.ruoyi.require.service.FeTempHumRecordService; |
| | | 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> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-温湿度 åºå -ç¶ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 11:02:18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/feTempHumDate") |
| | | @Api(tags = "è¯éªåºå") |
| | | public class FeTempHumDateController { |
| | | |
| | | @Autowired |
| | | private FeTempHumDateService feTempHumDateService; |
| | | |
| | | @Autowired |
| | | private FeTempHumRecordService feTempHumRecordService; |
| | | |
| | | @PostMapping("addFeTempHumDate") |
| | | @ApiOperation("è¯éªåºå-æ°å¢/ä¿®æ¹") |
| | | public Result<?> addFeTempHumDate(@RequestBody FeTempHumDate feTempHumDate) { |
| | | feTempHumDateService.saveOrUpdate(feTempHumDate); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @DeleteMapping("deleteFeTempHumDate") |
| | | @ApiOperation("è¯éªåºå-å é¤") |
| | | public Result<?> deleteFeTempHumDate( |
| | | @RequestParam("dateId") Integer dateId) { |
| | | feTempHumDateService.removeById(dateId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("getFeTempHumDate") |
| | | @ApiOperation("è¯éªåºå-æ¥è¯¢") |
| | | public Result<IPage<FeTempHumDateDto>> getFeTempHumDate(Page page) { |
| | | IPage<FeTempHumDateDto> page1 = feTempHumDateService.getFeTempHumDate(page); |
| | | return Result.success(page1); |
| | | } |
| | | |
| | | @PostMapping("addFeTempHumRecord") |
| | | @ApiOperation("设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½æ°å¢/ä¿®æ¹") |
| | | public Result<FeTempHumRecord> addFeTempHumRecord(@RequestBody FeTempHumRecord feTempHumRecord) { |
| | | feTempHumRecordService.saveOrUpdate(feTempHumRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @DeleteMapping("deleteFeTempHumRecord") |
| | | @ApiOperation("设æ½åç¯å¢æ¡ä»¶è¦æ±-温湿度记å½å é¤") |
| | | public Result<?> deleteFeTempHumRecord( |
| | | @RequestParam("tempHumId") Integer tempHumId) { |
| | | feTempHumRecordService.removeById(tempHumId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @GetMapping("getFeTempHumRecordPage") |
| | | @ApiOperation("设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½æ¥è¯¢") |
| | | public Result<IPage<FeTempHumRecordDto>> getFeTempHumRecordPage(Page page, Integer dateId) { |
| | | IPage<FeTempHumRecordDto> page1 = feTempHumRecordService.getFeTempHumRecordPage(page, dateId); |
| | | return Result.success(page1); |
| | | } |
| | | |
| | | /** |
| | | * 温湿度记å½å¯¼åº |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "温湿度记å½å¯¼åº") |
| | | @GetMapping("/exportTemperatureAndHumidityRecords") |
| | | public void exportTemperatureAndHumidityRecords(Integer dateId, HttpServletResponse response){ |
| | | feTempHumDateService.exportTemperatureAndHumidityRecords(dateId, response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.ForeignRegisterDto; |
| | | import com.ruoyi.require.pojo.ForeignRegister; |
| | | import com.ruoyi.require.service.ForeignRegisterService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥äººåç»è®° å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 07:17:35 |
| | | */ |
| | | @Api(tags = "夿¥äººåç»è®°") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/foreignRegister") |
| | | public class ForeignRegisterController { |
| | | |
| | | private ForeignRegisterService foreignRegisterService; |
| | | |
| | | /** |
| | | * 夿¥äººåç»è®°å页æ¥è¯¢ |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿¥äººåç»è®°å页æ¥è¯¢") |
| | | @GetMapping("/pageForeignRegister") |
| | | public Result<IPage<ForeignRegisterDto>> pageForeignRegister(Page page, ForeignRegisterDto foreignRegister) throws Exception { |
| | | return Result.success(foreignRegisterService.pageForeignRegister(page, foreignRegister)); |
| | | } |
| | | |
| | | /** |
| | | * 夿¥äººåç»è®°æ°å¢ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿¥äººåç»è®°æ°å¢") |
| | | @PostMapping("/addForeignRegister") |
| | | public Result addForeignRegister(@RequestBody ForeignRegister foreignRegister){ |
| | | return Result.success(foreignRegisterService.save(foreignRegister)); |
| | | } |
| | | |
| | | /** |
| | | * 夿¥äººåç»è®°ä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿¥äººåç»è®°ä¿®æ¹") |
| | | @PostMapping("/updateForeignRegister") |
| | | public Result updateForeignRegister(@RequestBody ForeignRegister foreignRegister){ |
| | | return Result.success(foreignRegisterService.updateById(foreignRegister)); |
| | | } |
| | | |
| | | /** |
| | | * 夿¥äººåç»è®°å é¤ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿¥äººåç»è®°å é¤") |
| | | @DeleteMapping("/delForeignRegister") |
| | | public Result delForeignRegister(Integer registerId){ |
| | | return Result.success(foreignRegisterService.removeById(registerId)); |
| | | } |
| | | |
| | | /** |
| | | * 夿¥äººåç»è®°æ¥ç详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "夿¥äººåç»è®°æ¥ç详æ
") |
| | | @GetMapping("/getForeignRegisterOne") |
| | | public Result<ForeignRegister> getForeignRegisterOne(Integer registerId){ |
| | | return Result.success(foreignRegisterService.getById(registerId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå¤æ¥äººåç»è®° |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºå¤æ¥äººåç»è®°") |
| | | @GetMapping("/exportForeignRegister") |
| | | public void exportForeignRegister(ForeignRegisterDto foreignRegister, HttpServletResponse response){ |
| | | foreignRegisterService.exportForeignRegister(foreignRegister, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.IncidentReportAddDto; |
| | | import com.ruoyi.require.excel.IncidentReportExport; |
| | | import com.ruoyi.require.service.IncidentReportService; |
| | | 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("/incidentReport") |
| | | 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(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.require.dto.InstructionDto; |
| | | import com.ruoyi.require.pojo.Instruction; |
| | | import com.ruoyi.require.pojo.OperationInstruction; |
| | | import com.ruoyi.require.service.InstructionService; |
| | | import com.ruoyi.require.service.OperationInstructionService; |
| | | import com.ruoyi.require.vo.OperationInstructionVo; |
| | | 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; |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦ å页") |
| | | @GetMapping("/pageByPageQueryOfHomeworkInstructions") |
| | | public Result<IPage<Instruction>> pageByPageQueryOfHomeworkInstructions(Page page){ |
| | | return Result.success(instructionService.pageByPageQueryOfHomeworkInstructions(page)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä½ä¸æå¯¼ä¹¦æ°å¢") |
| | | @PostMapping("/newHomeworkGuidebookAdded") |
| | | public Result newHomeworkGuidebookAdded(@RequestBody InstructionDto instructionDto){ |
| | | instructionService.newHomeworkGuidebookAdded(instructionDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @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 = "ä½ä¸æå¯¼ä¹¦å é¤") |
| | | @DeleteMapping("/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 = "ä½ä¸æå¯¼ä¹¦å®¡æ¹") |
| | | @PostMapping("/approvalOfHomeworkInstructionManual") |
| | | public Result approvalOfHomeworkInstructionManual(String id, Boolean status){ |
| | | operationInstructionService.update(Wrappers.<OperationInstruction>lambdaUpdate() |
| | | .eq(OperationInstruction::getId, id) |
| | | .set(OperationInstruction::getStatus, status) |
| | | .set(OperationInstruction::getApproverId, SecurityUtils.getUserId()) |
| | | .set(OperationInstruction::getEntryIntoForceTime, LocalDateTime.now())); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.InternalWastesDto; |
| | | import com.ruoyi.require.pojo.InternalWastes; |
| | | import com.ruoyi.require.service.InternalWastesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®° å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:27 |
| | | */ |
| | | @Api(tags = "å®å
¨å
å¡ä¸åºç»è®°") |
| | | @AllArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/internalWastes") |
| | | public class InternalWastesController { |
| | | |
| | | private InternalWastesService internalWastesService; |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çå页æ¥è¯¢ |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®å
¨å
å¡ä¸åºå¤çå页æ¥è¯¢") |
| | | @GetMapping("/pageInternalWastes") |
| | | public Result<IPage<InternalWastesDto>> pageInternalWastes(Page page,InternalWastes internalWastes) throws Exception { |
| | | return Result.success(internalWastesService.pageInternalWastes(page, internalWastes)); |
| | | } |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çæ°å¢ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®å
¨å
å¡ä¸åºå¤çæ°å¢") |
| | | @PostMapping("/addInternalWastes") |
| | | public Result addInternalWastes(@RequestBody InternalWastesDto internalWastes){ |
| | | return Result.success(internalWastesService.addInternalWastes(internalWastes)); |
| | | } |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çä¿®æ¹ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®å
¨å
å¡ä¸åºå¤çä¿®æ¹") |
| | | @PostMapping("/updateInternalWastes") |
| | | public Result updateInternalWastes(@RequestBody InternalWastesDto internalWastes){ |
| | | return Result.success(internalWastesService.updateInternalWastes(internalWastes)); |
| | | } |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çå é¤ |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®å
¨å
å¡ä¸åºå¤çå é¤") |
| | | @DeleteMapping("/delInternalWastes") |
| | | public Result delInternalWastes(Integer wastesId){ |
| | | return Result.success(internalWastesService.delInternalWastes(wastesId)); |
| | | } |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çæ¥ç详æ
|
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å®å
¨å
å¡ä¸åºå¤çæ¥ç详æ
") |
| | | @GetMapping("/getInternalWastesOne") |
| | | public Result<InternalWastesDto> getInternalWastesOne(Integer wastesId){ |
| | | return Result.success(internalWastesService.getInternalWastesOne(wastesId)); |
| | | } |
| | | |
| | | /** |
| | | * 导åºä¸åºå¤ç |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "导åºä¸åºå¤ç") |
| | | @GetMapping("/exportInternalWastes") |
| | | public void exportInternalWastes(Integer wastesId, HttpServletResponse response){ |
| | | internalWastesService.exportInternalWastes(wastesId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesContents; |
| | | import com.ruoyi.require.service.ProcurementSuppliesContentsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "æå¡åä¾åºåéè´å
¬å¸å表") |
| | | @RestController |
| | | @RequestMapping("/procurementSuppliesContents") |
| | | @AllArgsConstructor |
| | | public class ProcurementSuppliesContentsController { |
| | | |
| | | private ProcurementSuppliesContentsService procurementSuppliesService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ç®å½å表") |
| | | @GetMapping("/directoryListing") |
| | | public Result directoryListing() { |
| | | return Result.success(procurementSuppliesService.directoryListing()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢") |
| | | @GetMapping("/selectProcurementSuppliesContentById") |
| | | public Result selectProcurementSuppliesContentById(Integer id) { |
| | | return Result.success(procurementSuppliesService.getById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å åèç¹") |
| | | @PostMapping("/addProcurementSuppliesContents") |
| | | public Result addProcurementSuppliesContents(@RequestBody ProcurementSuppliesContents procurementSupplies) { |
| | | procurementSupplies.setUpdateTime(LocalDateTime.now()); |
| | | procurementSuppliesService.save(procurementSupplies); |
| | | return Result.success(procurementSupplies.getId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ´æ°åèç¹") |
| | | @PostMapping("/updateProcurementSuppliesContents") |
| | | public Result updateProcurementSuppliesContents(@RequestBody ProcurementSuppliesContents procurementSupplies) { |
| | | return Result.success(procurementSuppliesService.updateById(procurementSupplies)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åèç¹") |
| | | @DeleteMapping("/deleteProcurementSuppliesContentById") |
| | | public Result deleteProcurementSuppliesContentById(Integer id) { |
| | | List<ProcurementSuppliesContents> list = procurementSuppliesService.list(new LambdaQueryWrapper<ProcurementSuppliesContents>() |
| | | .eq(ProcurementSuppliesContents::getParentId, id)); |
| | | if(list.size() > 0) { |
| | | throw new ErrorException("该èç¹å«æåèç¹,请å
å é¤åèç¹"); |
| | | } |
| | | procurementSuppliesService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ææèç¹") |
| | | @GetMapping("/getNodeNames") |
| | | public Result getNodeNames() { |
| | | return Result.success(procurementSuppliesService.getNodeNames()); |
| | | } |
| | | |
| | | @ApiOperation(value = "è·åææäººå") |
| | | @GetMapping("/getUserList") |
| | | public Result getUserList() { |
| | | return Result.success(procurementSuppliesService.getUserList()); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.require.dto.ProcurementSuppliesExpendDto; |
| | | import com.ruoyi.require.service.ProcurementSuppliesExpendsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 03:47:19 |
| | | */ |
| | | @Api(tags = "æå¡åä¾åºåéè´èææ¶è") |
| | | @RestController |
| | | @RequestMapping("/procurementSuppliesExpends") |
| | | public class ProcurementSuppliesExpendsController { |
| | | @Autowired |
| | | private ProcurementSuppliesExpendsService procurementSuppliesExpendsService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ææè®°å½") |
| | | @GetMapping("/procurementSuppliesExpendlist") |
| | | public Result procurementSuppliesExpendlist(Page page,Long procurementSuppliesListId) { |
| | | return Result.success(procurementSuppliesExpendsService.selectAll(page,procurementSuppliesListId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢æ¶èè®°å½") |
| | | @PostMapping("/addProcurementSuppliesExpends") |
| | | public Result addProcurementSuppliesExpends(@RequestBody ProcurementSuppliesExpendDto dto) { |
| | | Integer added = procurementSuppliesExpendsService.addExpends(dto); |
| | | |
| | | if ( added == 0) { |
| | | return Result.fail("å½ååºåä¸è¶³"); |
| | | } |
| | | return Result.success(added); |
| | | } |
| | | |
| | | @ApiOperation(value = "å 餿¶èè®°å½") |
| | | @DeleteMapping("/deleteProcurementSuppliesExpends") |
| | | public Result deleteProcurementSuppliesExpends(Long expendId) throws ServiceException { |
| | | return Result.success(procurementSuppliesExpendsService.deleteExpends(expendId)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.require.dto.ProcurementSuppliesListDto; |
| | | import com.ruoyi.require.mapper.ProcurementSuppliesListMapper; |
| | | import com.ruoyi.require.mapper.SupplierManagementMapper; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesList; |
| | | import com.ruoyi.require.pojo.SupplierManagement; |
| | | import com.ruoyi.require.service.ProcurementSuppliesListService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | @Api(tags = "æå¡åä¾åºåéè´èæ") |
| | | @RestController |
| | | @RequestMapping("/procurementSuppliesList") |
| | | public class ProcurementSuppliesListController { |
| | | @Autowired |
| | | private ProcurementSuppliesListService procurementSuppliesListService; |
| | | |
| | | @Resource |
| | | private ProcurementSuppliesListMapper listMapper; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private SupplierManagementMapper supplierManagementMapper; |
| | | |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @GetMapping("/procurementSuppliesList") |
| | | public Result<IPage<ProcurementSuppliesListDto>> procurementSuppliesList(Page page, ProcurementSuppliesListDto list) { |
| | | return Result.success(procurementSuppliesListService.selectList(page, list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢èæ") |
| | | @GetMapping("/selectProcurementSuppliesListById") |
| | | public Result selectProcurementSuppliesListById(Integer id) { |
| | | ProcurementSuppliesList procurementSuppliesStore = listMapper.selectById(id); |
| | | ProcurementSuppliesListDto dto = new ProcurementSuppliesListDto(); |
| | | BeanUtils.copyProperties(procurementSuppliesStore, dto); |
| | | |
| | | User user = userMapper.selectById(procurementSuppliesStore.getPersonInCharge()); |
| | | User updateUser = userMapper.selectById(procurementSuppliesStore.getUpdateUser()); |
| | | SupplierManagement supplierManagement = supplierManagementMapper.selectById(procurementSuppliesStore.getSupplier()); |
| | | |
| | | dto.setPersonInChargeName(user.getName()); |
| | | dto.setUpdateUserName(updateUser.getName()); |
| | | dto.setSupplierName(supplierManagement.getSupplierName()); |
| | | return Result.success(dto); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ°å¢èæ") |
| | | @PostMapping("/addProcurementSuppliesList") |
| | | public Result addProcurementSuppliesList(@RequestBody ProcurementSuppliesListDto dto) { |
| | | return Result.success(procurementSuppliesListService.addProcurementSuppliesList(dto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç¼è¾èæ") |
| | | @PostMapping("/updateProcurementSuppliesList") |
| | | public Result updateProcurementSuppliesList(@RequestBody ProcurementSuppliesListDto dto) { |
| | | return Result.success(procurementSuppliesListService.updateProcurementSuppliesList(dto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤èæ") |
| | | @DeleteMapping("/deleteProcurementSuppliesList") |
| | | public Result deleteProcurementSuppliesList(Long id) { |
| | | return Result.success(listMapper.deleteById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导åºèæå表") |
| | | @GetMapping("/exportProcurementSuppliesList/{parentId}") |
| | | public void exportProcurementSuppliesList( @PathVariable Integer parentId ,HttpServletResponse response) throws Exception { |
| | | procurementSuppliesListService.exportProcurementSuppliesList(parentId,response); |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.StoreDto; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesConsumables; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesStore; |
| | | import com.ruoyi.require.service.ProcurementSuppliesConsumablesService; |
| | | import com.ruoyi.require.service.ProcurementSuppliesStoreService; |
| | | 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.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Api(tags = "æå¡åä¾åºåéè´èæå
¥åº") |
| | | @RestController |
| | | @RequestMapping("/procurementSuppliesStore") |
| | | @AllArgsConstructor |
| | | public class ProcurementSuppliesStoreController { |
| | | |
| | | private ProcurementSuppliesStoreService storeService; |
| | | |
| | | private ProcurementSuppliesConsumablesService consumablesService; |
| | | |
| | | |
| | | @ApiOperation(value = "èæå
¥åºå页æ¥è¯¢") |
| | | @GetMapping("/storeList") |
| | | public Result storeList(Page page,StoreDto storeDto) throws Exception { |
| | | return Result.success(storeService.selectStoreList(page, storeDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å èæå
¥åºå表") |
| | | @PostMapping("/addStore") |
| | | public Result addStore(@RequestBody Map<String,Object> map) { |
| | | storeService.addStore(map); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤èæå
¥åº") |
| | | @DeleteMapping("/deleteStore") |
| | | public Result deleteStore(@RequestParam("id") Integer id,@RequestParam("consumablesId") Integer consumablesId) { |
| | | storeService.deleteStore(id,consumablesId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ´æ°èæå
¥åº") |
| | | @PostMapping("/updateStore") |
| | | public Result updateStore(@RequestBody Map<String,Object> map) { |
| | | storeService.updateStore(map); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢èæå
¥åº") |
| | | @GetMapping("/selectStoreById") |
| | | public Result selectStore(Integer id) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | ProcurementSuppliesStore procurementSuppliesStore = storeService.getById(id); |
| | | List<ProcurementSuppliesConsumables> list = consumablesService.list(new LambdaQueryWrapper<ProcurementSuppliesConsumables>() |
| | | .eq(ProcurementSuppliesConsumables::getStoreId, id)); |
| | | map.put("store", procurementSuppliesStore); |
| | | map.put("consumables", list); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @GetMapping("/exportExcel/{parentId}") |
| | | public void exportExcel(@PathVariable Integer parentId, HttpServletResponse response) throws IOException { |
| | | storeService.exportExcel(parentId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.DeviceDto; |
| | | import com.ruoyi.require.pojo.Reservation; |
| | | import com.ruoyi.require.service.DeviceService; |
| | | import com.ruoyi.require.service.ReservationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * <p> |
| | | * èµæºé¢å®æ°å»ºé¢å®è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author baomidou |
| | | * @since 2024-09-14 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/reservation") |
| | | public class ReservationController { |
| | | @Autowired |
| | | private ReservationService reservationService; |
| | | |
| | | @Resource |
| | | private DeviceService deviceService; |
| | | |
| | | @GetMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(Page page,DeviceDto itemParameter, |
| | | @RequestParam(value = "laboratoryNameIsNull", required = false) Boolean laboratoryNameIsNull, |
| | | @RequestParam(value = "starttime", required = false)String starttime, |
| | | @RequestParam(value = "endtime", required = false) String endtime) { |
| | | ArrayList<JSONObject> jsonObjects = reservationService.selectDeviceParameter(page, itemParameter, laboratoryNameIsNull, starttime, endtime); |
| | | return Result.success(jsonObjects); |
| | | } |
| | | |
| | | @GetMapping("/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(@RequestBody Reservation reservation){ |
| | | reservation.setCreateDate(LocalDateTime.now()); |
| | | reservationService.save(reservation); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/delete") |
| | | public Result deleteReservation(String ids) { |
| | | String[] idArray = ids.split(","); |
| | | reservationService.removeBatchByIds(Arrays.asList(idArray)); |
| | | return Result.success(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.require.pojo.SupplierManagement; |
| | | import com.ruoyi.require.service.ProcurementSuppliesContentsService; |
| | | import com.ruoyi.require.service.SupplierManagementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:46:45 |
| | | */ |
| | | @Api(tags = "ä¾åºå管ç") |
| | | @RestController |
| | | @RequestMapping("/supplierManagement") |
| | | @AllArgsConstructor |
| | | public class SupplierManagementController { |
| | | |
| | | @Autowired |
| | | private SupplierManagementService supplierManagementService; |
| | | |
| | | @Autowired |
| | | private ProcurementSuppliesContentsService procurementSuppliesContentsService; |
| | | |
| | | @ApiOperation("æ¥è¯¢ä¾æ¹åå½") |
| | | @GetMapping("/selectSupplierManagementByParentId/{parentId}") |
| | | public Result<List<SupplierManagement>> selectSupplierManagementByParentId(@PathVariable Integer parentId) throws Exception { |
| | | return Result.success(supplierManagementService.selectSupplierManagementByParentId(parentId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢åæ ¼ä¾æ¹åå½") |
| | | @GetMapping("/selectQualifiedSupplierManagementPage") |
| | | public Result<IPage<SupplierManagement>> selectQualifiedSupplierManagement(SupplierManagement supplierManagement, Page page) throws Exception { |
| | | return Result.success(supplierManagementService.selectQualifiedSupplierManagement(page, supplierManagement)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢ä¾åºå") |
| | | @GetMapping("/selectQualifiedSupplierManagementById/{supplierManagementId}") |
| | | public Result<List<SupplierManagement>> selectQualifiedSupplierManagementById(@PathVariable Integer supplierManagementId) throws Exception { |
| | | return Result.success(supplierManagementService.selectQualifiedSupplierManagementById(supplierManagementId)); |
| | | } |
| | | |
| | | @ApiOperation("æ°å¢ä¾åºå") |
| | | @PostMapping("/addSupplierManagement") |
| | | public Result addSupplierManagement(@RequestBody SupplierManagement supplierManagement) { |
| | | supplierManagement.setCreateUser(SecurityUtils.getUserId().intValue()); |
| | | return Result.success(supplierManagementService.save(supplierManagement)); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹ä¾åºå") |
| | | @PostMapping("/updateSupplierManagement") |
| | | public Result updateSupplierManagement(@RequestBody SupplierManagement supplierManagement) { |
| | | supplierManagement.setUpdateUser(SecurityUtils.getUserId().intValue()); |
| | | return Result.success(supplierManagementService.updateById(supplierManagement)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤ä¾åºå") |
| | | @DeleteMapping("/delSupplierManagement/{id}") |
| | | public Result delSupplierManagement(@PathVariable Integer id) { |
| | | return Result.success(supplierManagementService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation("导åºä¾åºå") |
| | | @GetMapping("/exportSupplierManagement/{parentId}") |
| | | public void exportSupplierManagement(@PathVariable Integer parentId, HttpServletResponse response) throws Exception { |
| | | supplierManagementService.exportSupplierManagement(parentId, response); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å
¨é¨ä¾æ¹åå½") |
| | | @GetMapping("/selectSupplierManagementAll") |
| | | public Result<List<SupplierManagement>> selectSupplierManagementAll() throws Exception { |
| | | return Result.success(supplierManagementService.selectSupplierManagementAll()); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.require.pojo.SuppliersDirectoryContents; |
| | | import com.ruoyi.require.service.SuppliersDirectoryContentsService; |
| | | 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.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | @Api(tags = "ä¾åºåç®¡çæ ") |
| | | @RestController |
| | | @RequestMapping("/suppliersDirectoryContents") |
| | | public class SuppliersDirectoryContentsController { |
| | | |
| | | @Autowired |
| | | private SuppliersDirectoryContentsService suppliersDirectoryContentsService; |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ç®å½å表") |
| | | @GetMapping("/suppliersDirectoryContentsListing") |
| | | public Result suppliersDirectoryContentsListing() { |
| | | return Result.success(suppliersDirectoryContentsService.directoryListing()); |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢") |
| | | @GetMapping("/selectSuppliersDirectoryContentsById") |
| | | public Result selectSuppliersDirectoryContentsById(Integer id) { |
| | | return Result.success(suppliersDirectoryContentsService.getById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ·»å åèç¹") |
| | | @PostMapping("/addSuppliersDirectoryContents") |
| | | public Result addSuppliersDirectoryContents(@RequestBody SuppliersDirectoryContents suppliersDirectoryContents ) { |
| | | suppliersDirectoryContents.setUpdateTime(LocalDateTime.now()); |
| | | suppliersDirectoryContentsService.save(suppliersDirectoryContents); |
| | | return Result.success(suppliersDirectoryContents.getId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ´æ°åèç¹") |
| | | @PostMapping("/updateSuppliersDirectoryContents") |
| | | public Result updateSuppliersDirectoryContents(@RequestBody SuppliersDirectoryContents suppliersDirectoryContents) { |
| | | return Result.success(suppliersDirectoryContentsService.updateById(suppliersDirectoryContents)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å é¤åèç¹") |
| | | @DeleteMapping("/deleteSuppliersDirectoryContentsById") |
| | | public Result deleteSuppliersDirectoryContentsById(Integer id) { |
| | | List<SuppliersDirectoryContents> list = suppliersDirectoryContentsService.list(new LambdaQueryWrapper<SuppliersDirectoryContents>() |
| | | .eq(SuppliersDirectoryContents::getParentId, id)); |
| | | if(list.size() > 0) { |
| | | throw new ErrorException("该èç¹å«æåèç¹,请å
å é¤åèç¹"); |
| | | } |
| | | suppliersDirectoryContentsService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ææèç¹") |
| | | @GetMapping("/getSuppliersDirectoryContentsNodeNames") |
| | | public Result getSuppliersDirectoryContentsNodeNames() { |
| | | return Result.success(suppliersDirectoryContentsService.getSuppliersDirectoryContentsNodeNames()); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ADto { |
| | | |
| | | private int k; |
| | | private String v; |
| | | private String i; |
| | | private String p; |
| | | private boolean self; |
| | | private List<BDto> c; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptance; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptanceInspection; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class AcceptanceDto { |
| | | |
| | | private FeStandardSubstanceAcceptance acceptance; |
| | | |
| | | private List<FeStandardSubstanceAcceptanceInspection> list; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class BDto { |
| | | |
| | | private int k; |
| | | private String v; |
| | | private String i; |
| | | private String u; |
| | | private String p; |
| | | private String g; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.DataConfig; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DataConfigDto { |
| | | |
| | | private List<DataConfig> dataConfigList; |
| | | |
| | | private Boolean isDevice; |
| | | |
| | | @ApiModelProperty("æä»¶åç¼") |
| | | private String fileType; |
| | | |
| | | @ApiModelProperty("ééå°å") |
| | | private String collectUrl; |
| | | |
| | | @ApiModelProperty("åå¨å°å") |
| | | private String storageUrl; |
| | | |
| | | @ApiModelProperty("设å¤IP") |
| | | private String ip; |
| | | |
| | | @ApiModelProperty("æ°é-å§æåæ®µ") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ°é-æ ·ååæ®µ") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("æ°é-dbï¼mdbæä»¶åç§°") |
| | | private String dbFileName; |
| | | |
| | | @ApiModelProperty("æ°é-dbæä»¶ å
纤带ç¼å·") |
| | | private String fiberOpticRibbon; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceConfigDtoPage { |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æä»¶åç¼") |
| | | private String fileType; |
| | | |
| | | @ApiModelProperty(value = "ééå°å") |
| | | private String collectUrl; |
| | | |
| | | @ApiModelProperty(value = "åå¨å°å") |
| | | private String storageUrl; |
| | | |
| | | @ApiModelProperty(value = "IPå°å") |
| | | private String ip; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹å项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ApiModelProperty(value = "å
¬å¼") |
| | | private String formula; |
| | | |
| | | @ApiModelProperty(value = "åç
§X") |
| | | private String referx; |
| | | |
| | | @ApiModelProperty(value = "X") |
| | | private String x; |
| | | |
| | | @ApiModelProperty(value = "åç
§Y") |
| | | private String refery; |
| | | |
| | | @ApiModelProperty(value = "Y") |
| | | private String y; |
| | | |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "æ£éªå¯¹è±¡") |
| | | private String sample; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹ç®id") |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty("æ°é-å§æåæ®µ") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ°é-æ ·ååæ®µ") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("æ°é-dbï¼mdbæä»¶åç§°") |
| | | private String dbFileName; |
| | | |
| | | @ApiModelProperty("æ°é-dbæä»¶ å
纤带ç¼å·") |
| | | private String fiberOpticRibbon; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.ruoyi.require.pojo.Device; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class DeviceDto extends Device { |
| | | |
| | | @ApiModelProperty(value = "管ç人") |
| | | private String equipmentManagerUser; |
| | | |
| | | @ApiModelProperty(value = "æå±é¨é¨") |
| | | @JsonInclude(JsonInclude.Include.NON_NULL) |
| | | private String laboratoryName; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹ç®") |
| | | private String insProductItem; |
| | | |
| | | @ApiModelProperty(value = "管ç人å§å") |
| | | private String equipmentManagerName; |
| | | |
| | | @ApiModelProperty(value = "被ææäººå§å") |
| | | private String authorizedPersonName; |
| | | |
| | | @ApiModelProperty(value = "æ ¸åè¯ä¹¦ç¼å·") |
| | | private String calibrateNo; |
| | | |
| | | @ApiModelProperty(value = "æè¿æ ¡åæ¥æ") |
| | | private LocalDateTime lastCalibrationDateTwo; |
| | | |
| | | @ApiModelProperty(value = "䏿¬¡æ ¡åæ¥æ") |
| | | private LocalDateTime nextCalibrationDateTwo; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.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.ruoyi.require.dto; |
| | | |
| | | 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.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.DeviceMetricRecord; |
| | | import com.ruoyi.require.pojo.DeviceMetricsCopy; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class DeviceMetricRecordDto extends DeviceMetricRecord { |
| | | |
| | | private List<DeviceMetricsCopy> deviceMetricsCopyList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.DeviceRecord; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceRecordDto extends DeviceRecord { |
| | | private String deviceName; |
| | | |
| | | private String managementNumber; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FeIllumination; |
| | | import com.ruoyi.require.pojo.FeIlluminationDetectionArea; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FeIlluminationAddDto extends FeIllumination { |
| | | |
| | | @ApiModelProperty("设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå") |
| | | private List<FeIlluminationDetectionArea> illuminationDetectionAreaList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FeIllumination; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class FeIlluminationDto extends FeIllumination { |
| | | @ApiModelProperty("æ£æµè
") |
| | | private String checkerUser; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äºº") |
| | | private String testerUser; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | private Date calibrationDate; |
| | | |
| | | @ApiModelProperty("䏿¬¡æ ¡åæ¥æ") |
| | | private Date nextCalibrationDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FeIllumination; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/28 |
| | | */ |
| | | @Data |
| | | public class FeIlluminationExportDto extends FeIllumination { |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | private String calibrationDateString; |
| | | |
| | | @ApiModelProperty("䏿¬¡æ ¡åæ¥æ") |
| | | private String nextCalibrationDateString; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FeMeasuredQuantity; |
| | | import com.ruoyi.require.pojo.FePowerStable; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FePowerStableAddDto extends FePowerStable { |
| | | |
| | | @ApiModelProperty("设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§-æµå®é") |
| | | private List<FeMeasuredQuantity> feMeasuredQuantityList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FePowerStable; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class FePowerStableDto extends FePowerStable { |
| | | |
| | | @ApiModelProperty("æ£æµè
") |
| | | private String checkerUser; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äºº") |
| | | private String testerUser; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | private Date calibrationDate; |
| | | |
| | | @ApiModelProperty("䏿¬¡æ ¡åæ¥æ") |
| | | private Date nextCalibrationDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FePowerStable; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/28 |
| | | */ |
| | | @Data |
| | | public class FePowerStableExportDto extends FePowerStable { |
| | | |
| | | @ApiModelProperty("æµè¯æ¥æ") |
| | | private String testDateString; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty("设å¤ç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | private String calibrationDateString; |
| | | |
| | | @ApiModelProperty("䏿¬¡æ ¡åæ¥æ") |
| | | private String nextCalibrationDateString; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FeTempHumDate; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class FeTempHumDateDto extends FeTempHumDate { |
| | | |
| | | @ApiModelProperty("å建人") |
| | | private String createName; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.FeTempHumRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class FeTempHumRecordDto extends FeTempHumRecord { |
| | | |
| | | @ApiModelProperty("ä¸åè®°å½ååç§°") |
| | | private String afternoonRecorderUser; |
| | | |
| | | @ApiModelProperty("ä¸åè®°å½ååç§°") |
| | | private String morningRecorderUser; |
| | | |
| | | @ApiModelProperty("æ£æµå¤©") |
| | | private Integer month; |
| | | |
| | | @ApiModelProperty("ä¸åæ¶é´") |
| | | private String afternoonTimeStr; |
| | | |
| | | @ApiModelProperty("ä¸å-æ¶é´") |
| | | private String morningTestTimeStr; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.deepoove.poi.data.PictureRenderData; |
| | | import com.ruoyi.require.pojo.ForeignRegister; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/19 |
| | | */ |
| | | @Data |
| | | public class ForeignRegisterDto extends ForeignRegister { |
| | | |
| | | @ApiModelProperty("å¼å§æ¶é´") |
| | | private String beginDate; |
| | | |
| | | @ApiModelProperty("ç»ææ¶é´") |
| | | private String endDate; |
| | | |
| | | @ApiModelProperty("éªå人åç¾å") |
| | | private PictureRenderData accompanyingRender; |
| | | |
| | | @ApiModelProperty("æ¹å人åç¾å") |
| | | private PictureRenderData approveRender; |
| | | |
| | | @ApiModelProperty("éªå人åç¾åå°å") |
| | | private String accompanyingUrl; |
| | | |
| | | @ApiModelProperty("éªå人åç¾åå°å") |
| | | private String approveUrl; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.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.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.InformationNotification; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class InformationNotificationDto extends InformationNotification { |
| | | private String senderUser; |
| | | |
| | | private String consigneeUser; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.Instruction; |
| | | import com.ruoyi.require.pojo.OperationInstruction; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class InstructionDto extends Instruction { |
| | | |
| | | private List<OperationInstruction> feTempHumRecordList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.InternalWastes; |
| | | import com.ruoyi.require.pojo.InternalWastesDetail; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author zhuo |
| | | * @Date 2024/11/19 |
| | | */ |
| | | @Data |
| | | public class InternalWastesDto extends InternalWastes { |
| | | |
| | | @ApiModelProperty("ä¸åºç»è®°è¯¦æ
") |
| | | private List<InternalWastesDetail> wastesDetailList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.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.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesExpends; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProcurementSuppliesExpendDto extends ProcurementSuppliesExpends { |
| | | |
| | | /** |
| | | * 项ç®èæåç§° |
| | | */ |
| | | @ApiModelProperty("项ç®èæåç§°") |
| | | private String listName; |
| | | |
| | | /** |
| | | * å½å
¥äººåç§° |
| | | */ |
| | | @ApiModelProperty("å½å
¥äººåç§°") |
| | | private String enterUserName; // |
| | | |
| | | /** |
| | | * æ´æ°äººåç§° |
| | | */ |
| | | @ApiModelProperty("æ´æ°äººåç§°") |
| | | private String updateUserName; // |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesList; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class ProcurementSuppliesListDto extends ProcurementSuppliesList { |
| | | @ExcelProperty("åèä¾åºå") |
| | | private String supplierName; // ä¾åºååç§° |
| | | @ExcelProperty("æ´æ°äºº") |
| | | private String updateUserName; // æ´æ°äººåç§° |
| | | @ExcelProperty("è´è´£äºº") |
| | | private String personInChargeName; // è´è´£äººåç§° |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class ProcurementSuppliesListEDto { |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("ç®å½id") |
| | | @ExcelProperty("ç®å½") |
| | | private Long contentsId; |
| | | |
| | | @ApiModelProperty("èæç±»å") |
| | | @ExcelProperty("ç±»å«") |
| | | private String consumablesType; |
| | | |
| | | @ApiModelProperty("è´§å·") |
| | | @ExcelProperty("è´§å·") |
| | | private String itemNumber; |
| | | |
| | | @ApiModelProperty("èæåç§°") |
| | | @ExcelProperty("åç§°") |
| | | private String consumablesName; |
| | | |
| | | @ApiModelProperty("è§æ ¼") |
| | | @ExcelProperty("è§æ ¼") |
| | | private String specifications; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | @ExcelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty("åèä»·æ ¼") |
| | | @ExcelProperty("åèä»·æ ¼") |
| | | private BigDecimal referencePrice; |
| | | |
| | | @ApiModelProperty("åæ¾ä½ç½®") |
| | | @ExcelProperty("åæ¾ä½ç½®") |
| | | private Integer contentId; |
| | | |
| | | @ApiModelProperty("è´è´£äºº") |
| | | @ExcelProperty("è´è´£äºº") |
| | | private Integer personInCharge; |
| | | |
| | | @ApiModelProperty("åºåä¸é") |
| | | @ExcelProperty("åºåä¸é") |
| | | private Integer upperLimit; |
| | | |
| | | @ApiModelProperty("åºåä¸é") |
| | | @ExcelProperty("åºåä¸é") |
| | | private Integer lowerLimit; |
| | | |
| | | @ApiModelProperty("ä¾åºå") |
| | | @ExcelProperty("ä¾åºå") |
| | | private Integer supplier; |
| | | |
| | | @ApiModelProperty("èæå¾æ ") |
| | | @ExcelProperty("èæå¾æ ") |
| | | private String consumablesIcon; |
| | | |
| | | @ApiModelProperty("èæéä»¶") |
| | | @ExcelProperty("èæéä»¶") |
| | | private String attachment; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @ExcelProperty("å建æ¶é´") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @ExcelProperty("æ´æ°æ¶é´") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @ExcelProperty("æ´æ°äºº") |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("å½ååºåæ°é") |
| | | @ExcelProperty("å½ååºå") |
| | | private Integer currentAmount; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.Reservation; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ReservationDto extends Reservation { |
| | | |
| | | private String name; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesStore; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class StoreDto extends ProcurementSuppliesStore { |
| | | |
| | | |
| | | @ApiModelProperty("èæåç§°") |
| | | private String consumablesName; |
| | | |
| | | @ApiModelProperty("å
¥åºæ°é") |
| | | private Integer storeNumber; |
| | | |
| | | @ApiModelProperty("å
¥åºæ»ä»·") |
| | | private Double totalPrice; |
| | | |
| | | @ApiModelProperty("ç»è®°äºº") |
| | | private String registrantName; |
| | | |
| | | @ApiModelProperty("å
¥åºäºº") |
| | | private String storageUserName; |
| | | |
| | | private Integer consumablesId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class SupplierManagementDto { |
| | | |
| | | @ApiModelProperty("ä¾åºå") |
| | | @ExcelProperty("ä¾åºå") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | private String supplierRef; |
| | | |
| | | @ApiModelProperty("ä¾åºåç©åæå¡åç§°") |
| | | @ExcelProperty("ä¾åºåç©åæå¡åç§°") |
| | | private String supplierItemServiceName; |
| | | |
| | | @ApiModelProperty("é®ç¼") |
| | | @ExcelProperty("é®ç¼") |
| | | private String postalCode; |
| | | |
| | | @ApiModelProperty("å°å") |
| | | @ExcelProperty("å°å") |
| | | private String adress; |
| | | |
| | | @ApiModelProperty("è系人") |
| | | @ExcelProperty("è系人") |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("èç³»çµè¯") |
| | | @ExcelProperty("èç³»çµè¯") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("æ·å") |
| | | @ExcelProperty("æ·å") |
| | | private String householdName; |
| | | |
| | | @ApiModelProperty("ä¼ ç") |
| | | @ExcelProperty("ä¼ ç") |
| | | private String fax; |
| | | |
| | | @ApiModelProperty("弿·è¡") |
| | | @ExcelProperty("弿·è¡") |
| | | private String openingName; |
| | | |
| | | @ApiModelProperty("ç½å") |
| | | @ExcelProperty("ç½å") |
| | | private String website; |
| | | |
| | | @ApiModelProperty("è´¦å·") |
| | | @ExcelProperty("è´¦å·") |
| | | private String accountName; |
| | | |
| | | @ApiModelProperty("email") |
| | | @ExcelProperty("email") |
| | | private String email; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | private String remarks; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.excel; |
| | | |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DeviceRecordExport { |
| | | @ExcelProperty("æµç¨ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @ExcelProperty("设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ExcelProperty("管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ExcelProperty("温度") |
| | | @ColumnWidth(10) |
| | | private String temperature; |
| | | |
| | | @ExcelProperty("湿度") |
| | | @ColumnWidth(10) |
| | | private String humidity; |
| | | |
| | | @ExcelProperty("使ç¨å") |
| | | private String useBefore; |
| | | |
| | | @ExcelProperty("使ç¨å") |
| | | private String useAfter; |
| | | |
| | | @ExcelProperty("å¼å¸¸æ
åµ") |
| | | private String abnormal; |
| | | |
| | | @ExcelProperty("使ç¨å¼å§æ¥æ") |
| | | private String useDate; |
| | | |
| | | @ExcelProperty("使ç¨ç»ææ¥æ") |
| | | private String useEndDate; |
| | | |
| | | @ExcelProperty("使ç¨äºº") |
| | | private String usePerson; |
| | | |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class FeCalibrationScheduleExport { |
| | | @ExcelProperty("仪å¨åç§°") |
| | | private String instrumentName; |
| | | |
| | | @ExcelProperty("è§æ ¼åå·") |
| | | private String model; |
| | | |
| | | @ExcelProperty("管çç¼å·") |
| | | private Integer managementNumber; |
| | | |
| | | @ExcelProperty("ææ¯ææ ") |
| | | private String technicalIndicators; |
| | | |
| | | @ExcelProperty("æ£å®å¨æ") |
| | | private String verificationCyde; |
| | | |
| | | @ExcelProperty("æ£å®åä½") |
| | | private String verificationUnit; |
| | | |
| | | @ExcelProperty("æè¿æ£å®æ¶é´") |
| | | private LocalDateTime recentlyTime; |
| | | |
| | | @ExcelProperty("计å䏿¬¡æ£å®æ¶é´") |
| | | private LocalDateTime nextTime; |
| | | |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class FeLightningProtectionExcel { |
| | | @ExcelProperty("åæä»¶å") |
| | | private String fileName; |
| | | |
| | | @ExcelProperty("æ£æµæ¥æ") |
| | | private String detectionDate; |
| | | |
| | | @ExcelProperty("æææ") |
| | | private String termValidity; |
| | | |
| | | @ExcelProperty("æ£æµåä½") |
| | | private String detectionUnit; |
| | | |
| | | @ExcelProperty("å建æ¶é´") |
| | | private String createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class FeStandardSubstanceExcel { |
| | | @ExcelProperty("æ åç©è´¨åç§°") |
| | | private String name; |
| | | |
| | | @ExcelProperty("è§æ ¼åå·") |
| | | private String model; |
| | | |
| | | @ExcelProperty("ç产åå®¶") |
| | | private String factoryManufacturer; |
| | | |
| | | @ExcelProperty("åºåºç¼å·") |
| | | private String factoryNum; |
| | | |
| | | @ExcelProperty("管çç¼å·") |
| | | private String manageNum; |
| | | |
| | | @ExcelProperty("ä¸ç¡®å®åº¦") |
| | | private String uncertainty; |
| | | |
| | | @ExcelProperty("æ°é") |
| | | private Long quantity; |
| | | |
| | | @ExcelProperty("è´ç½®æ¥æ") |
| | | private LocalDateTime acquisitionDate; |
| | | |
| | | @ExcelProperty("æææ") |
| | | private LocalDateTime effectiveDate; |
| | | |
| | | @ExcelProperty("ææ¡£ç¼å·") |
| | | private String fileNum; |
| | | |
| | | @ExcelProperty("åæ¾ä½ç½®") |
| | | private String position; |
| | | |
| | | @ExcelProperty("åè°ç¶æ") |
| | | private Integer state; |
| | | |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ExcelProperty("å建人") |
| | | private String createUser; |
| | | |
| | | @ExcelProperty("åå»ºæ¥æ") |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class StoreExcel { |
| | | @ExcelProperty("å
¥åºåå·") |
| | | private String oddNumbers; |
| | | |
| | | @ExcelProperty("èæåç§°") |
| | | private String consumablesName; |
| | | |
| | | @ExcelProperty("å
¥åºæ°é") |
| | | private Integer storeNumber; |
| | | |
| | | @ExcelProperty("å
¥åºæ»ä»·") |
| | | private Double totalPrice; |
| | | |
| | | @ExcelProperty("å
¥åºäºº") |
| | | private String storageUserName; |
| | | |
| | | @ExcelProperty("å
¥åºæ¥æ") |
| | | private LocalDate storageTime; |
| | | |
| | | @ExcelProperty("说æ") |
| | | private String remark; |
| | | |
| | | @ExcelProperty("ç»è®°äºº") |
| | | private String registrantName; |
| | | |
| | | @ExcelProperty("ç»è®°æ¥æ") |
| | | private LocalDate registrantTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.handler; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.framework.util.MyUtil; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.mapper.InsOrderMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.require.service.impl.InsOrderPlanServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.xwpf.usermodel.ParagraphAlignment; |
| | | import org.apache.poi.xwpf.usermodel.TableRowAlign; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | |
| | | import java.text.Collator; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * åºç¡æ¥åå¤çç±» |
| | | */ |
| | | public class BasicReportHandler { |
| | | |
| | | /** |
| | | * é»è®¤è¡¨æ ¼å®½åº¦ |
| | | */ |
| | | private final static int[] DEFAULT_COL_WIDTHS = {650, 1600, 2000, 750, 2800, 1100, 1100}; |
| | | |
| | | /** |
| | | * å
çº¤è¡¨æ ¼å®½åº¦ |
| | | */ |
| | | private final static int[] FIBER_COL_WIDTHS = {650, 1700, 2000, 750, 2000, 1800, 1100}; |
| | | |
| | | private final InsOrderMapper baseMapper; |
| | | |
| | | private final InsOrderPlanServiceImpl insOrderPlanServiceImpl; |
| | | |
| | | private final InsSampleMapper insSampleMapper; |
| | | |
| | | public BasicReportHandler(InsOrderMapper insOrderMapper, InsOrderPlanServiceImpl insOrderPlanServiceImpl, InsSampleMapper insSampleMapper){ |
| | | this.baseMapper = insOrderMapper; |
| | | this.insOrderPlanServiceImpl = insOrderPlanServiceImpl; |
| | | this.insSampleMapper = insSampleMapper; |
| | | } |
| | | |
| | | /** |
| | | * åå
¥æ¹æ³ |
| | | * @param samples æææ ·å |
| | | * @param insReport report对象 |
| | | * @param tables æ£éªé¡¹è¡¨æ ¼æ°æ® |
| | | * @param standardMethod æ åæ¹æ³ |
| | | * @param models æææ ·åçåå· |
| | | * @param unEqualSet å»éçæææ£éªé¡¹ç®æ°é |
| | | * @param modelDl çµåç¹æ®åå·å¤ç |
| | | * @param deviceSet å»éçæææ£éªé¡¹ä½¿ç¨è®¾å¤å表 |
| | | */ |
| | | public void doWrite(List<SampleProductDto> samples, InsReport insReport, List<Map<String,Object>> tables, |
| | | Set<String> standardMethod, Set<String> models, Set<String> unEqualSet, |
| | | List<String> modelDl, Set<String> deviceSet){ |
| | | //å¤çå
纤项ç®åæ¾å¥ç®¡,æé¤æ¸©åº¦å¾ªç¯ |
| | | List<InsProduct> fiberList = new ArrayList<>(); |
| | | samples.forEach(s->{ |
| | | fiberList.addAll(s.getInsProduct().stream().filter(p->(p.getSonLaboratory().equals("å
纤è¯éªå®¤")&&Objects.isNull(p.getSpecialItemParentId()) |
| | | ||(p.getSonLaboratory().equals("ææè¯éªå®¤")&&Objects.nonNull(p.getInsFiberId())) |
| | | ||(p.getInspectionItem().contains("æ¾å¥ç®¡")||p.getInspectionItemSubclass().contains("æ¾å¥ç®¡"))) |
| | | &&!p.getInspectionItem().equals("温度循ç¯")).collect(Collectors.toList())); |
| | | }); |
| | | if(!fiberList.isEmpty()){ |
| | | //æ ¹æ®æ£éªé¡¹åç» |
| | | Map<String, List<InsProduct>> groupMap = fiberList.stream().collect(Collectors.groupingBy(g -> MyUtil.joinChars("",g.getInspectionItem(),g.getInspectionItemSubclass()))); |
| | | SampleProductDto sampleProductDto = new SampleProductDto(); |
| | | List<InsProduct> handleProductList = new ArrayList<>(); |
| | | for (String s : groupMap.keySet()) { |
| | | if(!groupMap.get(s).isEmpty()){ |
| | | List<String> lastValueList = groupMap.get(s).stream().map(InsProduct::getLastValue).map(String::trim).collect(Collectors.toList()); |
| | | String lastValue = ""; |
| | | boolean a = lastValueList.contains("符å"); |
| | | if(lastValueList.contains("符å") || lastValueList.contains("ä¸ç¬¦å") || lastValueList.contains("ä¸å¤å®")){ |
| | | long count1 = lastValueList.stream().filter(f->f.equals("符å")).count(); |
| | | long count2 = lastValueList.stream().filter(f->f.equals("ä¸ç¬¦å")).count(); |
| | | if(count1>0&&count2==0){ |
| | | lastValue = "符å"; |
| | | }else if(count2>0){ |
| | | lastValue = "ä¸ç¬¦å"; |
| | | }else{ |
| | | lastValue="ä¸å¤å®"; |
| | | } |
| | | }else { |
| | | double maxLastValue = lastValueList.stream().mapToDouble(Double::parseDouble).max().orElse(0); |
| | | double minLastValue = lastValueList.stream().mapToDouble(Double::parseDouble).min().orElse(0); |
| | | lastValue = minLastValue+"-"+maxLastValue; |
| | | |
| | | } |
| | | InsProduct insProduct = groupMap.get(s).get(0); |
| | | sampleProductDto.setModel(insProduct.getModel()); |
| | | insProduct.setLastValue(lastValue); |
| | | handleProductList.add(insProduct); |
| | | } |
| | | } |
| | | handleProductList.sort((o1,o2)->{ |
| | | //æ ¹æ®æ£éªé¡¹æåº |
| | | if(!Objects.equals(o1.getInspectionItem(),o2.getInspectionItem())){ |
| | | List<String> specialItems = Arrays.asList("èç¯å¢åºåå¼è£","çæ¶ç¼©ç"); |
| | | if(specialItems.contains(o1.getInspectionItem()) && specialItems.contains(o2.getInspectionItem())){ |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItem(),o2.getInspectionItem()); |
| | | } |
| | | //æ£éªå项æåº |
| | | if(StringUtils.isNotBlank(o1.getInspectionItemSubclass())&& StringUtils.isNotBlank(o2.getInspectionItemSubclass())){ |
| | | if(!Objects.equals(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass())){ |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass()); |
| | | } |
| | | } |
| | | return 0; |
| | | }); |
| | | sampleProductDto.setInsProduct(handleProductList); |
| | | //åå
¥è¡¨æ ¼ |
| | | writeTableRow(sampleProductDto,insReport,tables,FIBER_COL_WIDTHS); |
| | | } |
| | | samples.forEach(a -> { |
| | | Set<Integer> set = new HashSet<>(); |
| | | Map<Integer, String> map2 = new HashMap<>(); |
| | | //æ·»å æææ£éªé¡¹ |
| | | unEqualSet.addAll(a.getInsProduct().stream().map(m->m.getInspectionItem()+m.getInspectionItemSubclass()).collect(Collectors.toList())); |
| | | models.add(a.getModel()); |
| | | standardMethod.add(baseMapper.getStandardMethodCode(a.getStandardMethodListId())); |
| | | insOrderPlanServiceImpl.getTemplateThing(set, map2, a.getInsProduct()); |
| | | for (InsProduct b : a.getInsProduct()) { |
| | | if("çµåè¯éªå®¤".equals(b.getSonLaboratory()) && Arrays.asList("颿","éæ").contains(b.getSample())){ |
| | | modelDl.add(b.getModel()); |
| | | } |
| | | if (b.getInsProductResult() != null) { |
| | | if (ObjectUtils.isNotEmpty(b.getInsProductResult().getEquipValue())) { |
| | | List<JSONObject> jsonObjects = JSON.parseArray(b.getInsProductResult().getEquipValue(), JSONObject.class); |
| | | for (JSONObject jsonObject : jsonObjects) { |
| | | if (!(jsonObject.get("v") + "").isEmpty()) { |
| | | deviceSet.add(jsonObject.get("v") + ""); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //åå
¥è¡¨æ ¼ |
| | | //æé¤å
纤è¯éªå®¤ç项ç®åæ¾å¥ç®¡ï¼é¤äºæ¸©åº¦å¾ªç¯ |
| | | a.setInsProduct(a.getInsProduct().stream() |
| | | .filter(p->(!p.getSonLaboratory().equals("å
纤è¯éªå®¤")&&Objects.isNull(p.getInsFiberId()))||p.getInspectionItem().equals("温度循ç¯")) |
| | | .filter(p->!p.getInspectionItem().contains("æ¾å¥ç®¡")&&!p.getInspectionItemSubclass().contains("æ¾å¥ç®¡")) |
| | | .collect(Collectors.toList())); |
| | | writeTableRow(a,insReport,tables,DEFAULT_COL_WIDTHS); |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * åå
¥è¡¨æ ¼è¡ |
| | | * @param a æ ·åä¿¡æ¯ |
| | | * @param insReport report对象 |
| | | * @param tables æ£éªé¡¹è¡¨æ ¼å¯¹è±¡ |
| | | * @param colWidths è¡¨æ ¼å宽设置 |
| | | */ |
| | | private static void writeTableRow(SampleProductDto a,InsReport insReport,List<Map<String,Object>> tables,int[] colWidths){ |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | AtomicInteger index = new AtomicInteger(); |
| | | Set<String> itemSet = new HashSet<>(); |
| | | for (int i = 0; i < 3 + a.getInsProduct().size(); i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | if (i >= 2 && i < 2 + a.getInsProduct().size()) { |
| | | if (itemSet.add(a.getInsProduct().get(i - 2).getInspectionItem())) { |
| | | index.getAndIncrement(); |
| | | } |
| | | } |
| | | //åæ° |
| | | for (int j = 0; j < 7; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setFontSize(10); |
| | | style.setColor("000000"); |
| | | textRenderData.setStyle(style); |
| | | if (i == 0) { |
| | | //第ä¸è¡ |
| | | if (j == 0 || j == 1) { |
| | | //第ä¸åå第äºå |
| | | if(StringUtils.isNotBlank(a.getSampleCode())){ |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ1"); |
| | | }else{ |
| | | textRenderData.setText("è§æ ¼åå·@Typeâ0302"); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2 || j == 3) { |
| | | //第ä¸åå第åå |
| | | if(StringUtils.isNotBlank(a.getSampleCode())){ |
| | | textRenderData.setText(a.getSampleCode() + "â2"); |
| | | }else{ |
| | | textRenderData.setText("è§æ ¼åå·@Typeâ0302"); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("è§æ ¼åå·@Typeâ0302"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第å
åå第ä¸å |
| | | textRenderData.setText(a.getModel() + "â3"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else if (i == 1) { |
| | | //第äºè¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("åºå·@No."); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1 || j == 2) { |
| | | //第äºåå第ä¸å |
| | | textRenderData.setText("æ£æµé¡¹ç®@Testing itemâ4"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("åä½@Unit"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("æ åè¦æ±@Requirement"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText("æ£éªç»æ@Test result"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第ä¸å |
| | | textRenderData.setText("ç»è®º@Conclusion"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else if (i == 2 + a.getInsProduct().size()) { |
| | | //æåä¸è¡ |
| | | if (j == 0 || j == 1) { |
| | | //第ä¸åå第äºå |
| | | textRenderData.setText("夿³¨â5"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //å
¶ä½å |
| | | textRenderData.setText("âââ表示项ç®åæ ¼ï¼âÃâ表示项ç®ä¸åæ ¼ã@âââ indicates test item is qualified,âÃâ indicates test item is not qualified â6"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else { |
| | | //å
¶ä½è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText(index + "â2" + index); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | InsProduct insProduct = a.getInsProduct().get(i - 2); |
| | | if (ObjectUtil.isNotEmpty(insProduct.getInspectionItemSubclass())) { |
| | | if (ObjectUtil.isNotEmpty(insProduct.getInspectionItemEn())) { |
| | | String str = MyUtil.joinChars("@",insProduct.getInspectionItem(),insProduct.getInspectionItemEn()); |
| | | textRenderData.setText(str + "â3" + str); |
| | | } else { |
| | | textRenderData.setText(insProduct.getInspectionItem() + "â3" + insProduct.getInspectionItem()); |
| | | } |
| | | } else { |
| | | if (ObjectUtil.isNotEmpty(insProduct.getInspectionItemEn())) { |
| | | String str = MyUtil.joinChars("@",insProduct.getInspectionItem(),insProduct.getInspectionItemEn()); |
| | | textRenderData.setText(str + "â3" + str); |
| | | } else { |
| | | textRenderData.setText(insProduct.getInspectionItem() + "â3" + insProduct.getInspectionItem()); |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | InsProduct insProduct = a.getInsProduct().get(i - 2); |
| | | if (ObjectUtil.isNotEmpty(insProduct.getInspectionItemSubclass())) { |
| | | if (ObjectUtil.isNotEmpty(insProduct.getInspectionItemSubclassEn())) { |
| | | String str = MyUtil.joinChars("@",insProduct.getInspectionItemSubclass(),insProduct.getInspectionItemSubclassEn()); |
| | | textRenderData.setText(str); |
| | | } else { |
| | | textRenderData.setText(insProduct.getInspectionItemSubclass()); |
| | | } |
| | | } else { |
| | | if (ObjectUtil.isNotEmpty(insProduct.getInspectionItemEn())) { |
| | | String str = MyUtil.joinChars("@",insProduct.getInspectionItem(),insProduct.getInspectionItemEn()); |
| | | textRenderData.setText(str + "â3" + str); |
| | | } else { |
| | | textRenderData.setText(insProduct.getInspectionItem() + "â3" + insProduct.getInspectionItem()); |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText(ObjectUtil.isNotEmpty(a.getInsProduct().get(i - 2).getUnit()) ? a.getInsProduct().get(i - 2).getUnit() : ""); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText(a.getInsProduct().get(i - 2).getTell()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText(a.getInsProduct().get(i - 2).getLastValue()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第ä¸å |
| | | InsProduct p = a.getInsProduct().get(i - 2); |
| | | if (p.getInsResult() == 0) { |
| | | textRenderData.setText("Ã"); |
| | | } else if (a.getInsProduct().get(i - 2).getInsResult() == 1) { |
| | | textRenderData.setText("â"); |
| | | } else { |
| | | textRenderData.setText("-"); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (!rowRenderData.getCells().isEmpty()) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | //åå
¥è¡¨æ ¼çè¡ |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | |
| | | List<TableRenderData> tables1 = new ArrayList<>(); |
| | | tableRenderData.setRows(new ArrayList<>()); |
| | | double totalHeight = 0; |
| | | double heightThreshold = 700.0; // å页é«åº¦éå¼ |
| | | List<RowRenderData> firstTwoRows = new ArrayList<>(); // ä¿åå两è¡ä»¥ä¾¿å¤å¶å°æ°è¡¨æ ¼ |
| | | List<RowRenderData> endRows = new ArrayList<>(); // ä¿åå两è¡ä»¥ä¾¿å¤å¶å°æ°è¡¨æ ¼ |
| | | // ä¿åå两è¡ä»¥ä¾¿å¤å¶å°æ°è¡¨æ ¼ |
| | | firstTwoRows.add(rows.get(0)); |
| | | firstTwoRows.add(rows.get(1)); |
| | | endRows.add(rows.get(rows.size() - 1)); |
| | | for (RowRenderData row : rows) { |
| | | double rowHeight = row.getRowStyle().getHeight(); // è·åå½åè¡çè¡é« |
| | | // 夿åä½å
容æ¯å¦æå¤ç, å¤çè¡é«ä¹åæ° |
| | | RowRenderData lastRaw = rows.get(rows.size() - 1); |
| | | // æé¤æåä¸è¡ |
| | | if (rows.get(0) != row && rows.get(1) != row && lastRaw != row) { |
| | | // è°æ´é«åº¦ |
| | | rowHeight = adjustRowHeight(row, rowHeight); |
| | | } |
| | | totalHeight += rowHeight; // æ´æ°æ»è¡é« |
| | | if (totalHeight> heightThreshold) { |
| | | tableRenderData.getRows().addAll(endRows); |
| | | // å建æ°è¡¨æ ¼å¹¶å¤å¶åä¸¤è¡ |
| | | TableRenderData newTableRenderData = new TableRenderData(); |
| | | newTableRenderData.setRows(new ArrayList<>(firstTwoRows)); |
| | | //è®¾ç½®æ ·å¼ |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setColWidths(colWidths); |
| | | tableStyle.setWidth("10000"); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | newTableRenderData.setTableStyle(tableStyle); |
| | | // æ·»å æåä¸è¡ |
| | | tableRenderData.addRow(rows.get(rows.size() - 1)); |
| | | tables1.add(tableRenderData); |
| | | tableRenderData = newTableRenderData; |
| | | totalHeight = 180 + rowHeight;//180为æ°é¡µé¢è¡¨å¤´åæåä¸è¡çé«åº¦ |
| | | } |
| | | tableRenderData.getRows().add(row); |
| | | } |
| | | if (!tableRenderData.getRows().isEmpty() && tableRenderData.getRows().size() != 3) { |
| | | //è®¾ç½®æ ·å¼ |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setColWidths(colWidths); |
| | | tableStyle.setWidth("10000"); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | tables1.add(tableRenderData); |
| | | } |
| | | tables1.forEach(table -> { |
| | | Map<String, Object> tableMap = new HashMap<>(); |
| | | tableMap.put("table", table); |
| | | tableMap.put("report", insReport); |
| | | tables.add(tableMap); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * è°æ´é«åº¦ |
| | | * @param row |
| | | * @param rowHeight |
| | | * @return |
| | | */ |
| | | private static double adjustRowHeight(RowRenderData row, double rowHeight) { |
| | | // æ ¹æ®æ£éªé¡¹ç®åç§°è¿è¡é«åº¦è°æ´ |
| | | //æ ¹æ®æ£éªé¡¹(i:1)ãæ£éªå项(i:2)ãæ åè¦æ±(i:4)ä¸å符æé¿çæ¥è®¡ç® |
| | | TextRenderData insItemData = (TextRenderData) row.getCells().get(1).getParagraphs().get(0).getContents().get(0); |
| | | if(insItemData.getText().contains("æååæ")){ |
| | | return rowHeight; |
| | | } |
| | | TextRenderData insSubItemData = (TextRenderData) row.getCells().get(2).getParagraphs().get(0).getContents().get(0); |
| | | TextRenderData requiredData = (TextRenderData) row.getCells().get(4).getParagraphs().get(0).getContents().get(0); |
| | | String dataText = insItemData.getText(); |
| | | if(insSubItemData.getText().length()>dataText.length()){ |
| | | dataText = insSubItemData.getText(); |
| | | } |
| | | if(Objects.nonNull(requiredData) && requiredData.getText().length()>dataText.length()){ |
| | | dataText = requiredData.getText(); |
| | | } |
| | | TextRenderData valueData = (TextRenderData) row.getCells().get(5).getParagraphs().get(0).getContents().get(0); |
| | | String valueText = valueData.getText(); |
| | | // è·åæ£æµå
容夿æ¯å¦è¶
åº |
| | | if (StringUtils.isNotBlank(dataText)) { |
| | | double number = 1; |
| | | double chinaLength = 10; |
| | | double englishLength = 20; |
| | | double valueLength = 2; |
| | | // æ ¹æ®@ç¬¦å·æªåä¸è±æ |
| | | String[] splits = dataText.split("â"); |
| | | String[] split; |
| | | if(splits.length>0){ |
| | | split = splits[0].split("@"); |
| | | }else{ |
| | | split = dataText.split("@"); |
| | | } |
| | | // æååæ° |
| | | double chinaMultiple = (Math.ceil(split[0].length() / chinaLength)) - 1; |
| | | // è±æåæ° |
| | | double englishMultiple = 0; |
| | | if(split.length>1){ |
| | | englishMultiple = (Math.ceil(split[1].length() / englishLength)) - 1; |
| | | } |
| | | double multiple = number + chinaMultiple * 0.5 + englishMultiple * 0.5; |
| | | if (StringUtils.isNotBlank(valueText)) { |
| | | double valueMultiple = (Math.ceil(valueText.length() / valueLength)) - 1; |
| | | if (multiple < number + valueMultiple * 0.4) { |
| | | multiple = number + valueMultiple * 0.4; |
| | | } |
| | | } |
| | | rowHeight = rowHeight * multiple; |
| | | } |
| | | return rowHeight; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.handler; |
| | | |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.framework.util.MyUtil; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.vo.InsProductFiberVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.xwpf.usermodel.ParagraphAlignment; |
| | | import org.apache.poi.xwpf.usermodel.TableRowAlign; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | |
| | | import java.text.Collator; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * å
纤é
ç½®æ¥åå¤çç±» |
| | | */ |
| | | public class FiberConfigReportHandler { |
| | | |
| | | /** |
| | | * é»è®¤è¡¨æ ¼å®½åº¦ |
| | | */ |
| | | private final static int[] DEFAULT_COL_WIDTHS = {1600,0, 1200, 1200, 1200, 1200, 1200, 1200,1200}; |
| | | |
| | | private final InsProductMapper insProductMapper; |
| | | private final InsSampleMapper insSampleMapper; |
| | | |
| | | public FiberConfigReportHandler(InsProductMapper insProductMapper, InsSampleMapper insSampleMapper){ |
| | | this.insProductMapper = insProductMapper; |
| | | this.insSampleMapper = insSampleMapper; |
| | | } |
| | | |
| | | private final static String ITEM_SPLIT_CHAR = "&";//æ£éªé¡¹åé符 |
| | | |
| | | private final static String COLOR_SPLIT_CHAR = "-";//è²æ åé符 |
| | | |
| | | /** |
| | | * |
| | | * @param samples æææ ·å |
| | | * @param insReport report对象 |
| | | * @param tables2 å
纤é
ç½®éä»¶è¡¨æ ¼è¡å表 |
| | | * @param colorDict è²æ åå
¸ |
| | | */ |
| | | public void doWrite(List<SampleProductDto> samples, InsReport insReport, List<Map<String,Object>> tables2, |
| | | List<String> colorDict){ |
| | | AtomicInteger index2 = new AtomicInteger(1);//页ç |
| | | samples.forEach(sample -> { |
| | | //æ¥è¯¢æ ·åä¸çæ£éªé¡¹åè²æ |
| | | List<InsProductFiberVO> insProducts1 = insProductMapper.selectInsProductInsFiberList(sample.getId()); |
| | | //æ ¹æ®è²æ åç» |
| | | Map<String,List<InsProductFiberVO>> groupProducts = insProducts1.stream() |
| | | .filter(p->!p.getInspectionItem().equals("å
纤æ¥å¤´æè")) |
| | | .collect(Collectors.groupingBy(product -> product.getBushColor()+"-"+product.getColor())); |
| | | if(groupProducts.isEmpty()){ |
| | | return; |
| | | } |
| | | List<String[]> collect = groupProducts.keySet().stream().map(k -> k.split(COLOR_SPLIT_CHAR)).sorted((o1, o2) -> { |
| | | if (o1.length > 1 && o2.length > 1) { |
| | | if (!Objects.equals(o1[0], o2[0])) { |
| | | Integer o1Index = colorDict.indexOf(o1[0]); |
| | | Integer o2Index = colorDict.indexOf(o2[0]); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | if (!Objects.equals(o1[1], o2[1])) { |
| | | Integer o1Index = colorDict.indexOf(o1[1]); |
| | | Integer o2Index = colorDict.indexOf(o2[1]); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | } |
| | | return 0; |
| | | }).collect(Collectors.toList()); |
| | | List<String> sortKeys = collect.stream().map(c->String.join(COLOR_SPLIT_CHAR,c)).collect(Collectors.toList()); |
| | | //æ£éªé¡¹å表(表头) |
| | | List<String> itemMap = insProducts1.stream().sorted((o1,o2)->{ |
| | | //æ ¹æ®æ£éªé¡¹æåº |
| | | if(!Objects.equals(o1.getInspectionItem(),o2.getInspectionItem())){ |
| | | List<String> specialItems = Arrays.asList("èç¯å¢åºåå¼è£","çæ¶ç¼©ç"); |
| | | if(specialItems.contains(o1.getInspectionItem()) && specialItems.contains(o2.getInspectionItem())){ |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItem(),o2.getInspectionItem()); |
| | | } |
| | | //æ£éªå项æåº |
| | | if(StringUtils.isNotBlank(o1.getInspectionItemSubclass())&& StringUtils.isNotBlank(o2.getInspectionItemSubclass())){ |
| | | if(!Objects.equals(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass())){ |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass()); |
| | | } |
| | | } |
| | | return 0; |
| | | }).map(insProduct -> { |
| | | String item = MyUtil.joinChars("@",insProduct.getInspectionItem(),insProduct.getInspectionItemEn()); |
| | | String itemSubClass = MyUtil.joinChars("@",insProduct.getInspectionItemSubclass(),insProduct.getInspectionItemSubclassEn()); |
| | | return MyUtil.joinChars(ITEM_SPLIT_CHAR,item,itemSubClass); |
| | | }).distinct().collect(Collectors.toList()); |
| | | long size = itemMap.size(); |
| | | long size2 = insProducts1.stream().map(InsProduct::getInsFiberId).distinct().count(); |
| | | long number = 7; |
| | | long k = 0; |
| | | //夿æ£éªé¡¹ç®æ¯å¦æç¶åå
³ç³» |
| | | int a = itemMap.stream().anyMatch(p -> p.split(ITEM_SPLIT_CHAR).length>0) ? 2 : 1; |
| | | for (long c = 0; c < size; c++) { |
| | | if (c % number == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (long i = 0; i < size2 + a + 1; i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | //è¡¨æ ¼çåæ° |
| | | for (long j = 0; j < 9; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | style.setFontSize(10); |
| | | textRenderData.setStyle(style); |
| | | if(i==0){ |
| | | //第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ456"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ456"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getSampleCode()+"â4566"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 3) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getSampleCode()+"â4566"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("è§æ ¼åå·@Typeâ457"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 5) { |
| | | //第äºå |
| | | textRenderData.setText("è§æ ¼åå·@Typeâ457"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 6) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getModel()+"â4577"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 7) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getModel()+"â4577"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | //第äºå |
| | | textRenderData.setText(sample.getModel()+"â4577"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 1) { |
| | | //第äºè¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("å
çº¤è²æ @Scanning Numberâ101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | if(itemMap.size()>(int) (j - 2 + k)){ |
| | | String inspectionItem = itemMap.get((int) (j - 2 + k)).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText( inspectionItem + "â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | String inspectionItem = itemMap.get(itemMap.size()-1).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText("â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else if (a == 2 && i == 2) { |
| | | //æç¶å项ç®å
³ç³»ç第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("å
çº¤è²æ @Scanning Numberâ101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if(itemMap.size()>(int)(j - 2 + k)){ |
| | | //夿æ¯å¦æé¡¹ç®åç±» |
| | | String[] splits = itemMap.get((int) (j - 2 + k)).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | //夿æ¯å¦æé¡¹ç®åç±» |
| | | String[] splits = itemMap.get(itemMap.size()-1).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText("â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText("â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else{ |
| | | //循ç¯è²æ |
| | | String key = sortKeys.get((int)i-3); |
| | | if(itemMap.size()>(int) (j - 2 + k)) { |
| | | int index = Math.max((int) (j - 2 + k), 0); |
| | | String item = itemMap.get(index); |
| | | InsProductFiberVO insProduct = groupProducts.get(key).stream() |
| | | .filter(p->{ |
| | | String insItem = MyUtil.joinChars("@",p.getInspectionItem(),p.getInspectionItemEn()); |
| | | String insSubItem = MyUtil.joinChars("@",p.getInspectionItemSubclass(),p.getInspectionItemSubclassEn()); |
| | | return item.equals(MyUtil.joinChars(ITEM_SPLIT_CHAR,insItem,insSubItem)); |
| | | }).findFirst().orElse(new InsProductFiberVO()); |
| | | //å¡«å¼ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText(insProduct.getBushColor()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText(insProduct.getColor()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if((index+1)==groupProducts.get(key).size()){ |
| | | textRenderData.setText(insProduct.getLastValue()+"âlast"+key); |
| | | }else{ |
| | | textRenderData.setText(insProduct.getLastValue()); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else { |
| | | |
| | | textRenderData.setText("âlast"+key); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (!rowRenderData.getCells().isEmpty()) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("æ¯è¡åå
æ ¼ä¸ç¸ç4"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table2", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("sample_number", sample.getSampleCode()); |
| | | table.put("type", sample.getModel()); |
| | | table.put("index2", index2.get()); |
| | | tables2.add(table); |
| | | k += 7; |
| | | index2.getAndIncrement(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
纤éä»¶è¡¨æ ¼ï¼åå
¥è¡æ°æ® |
| | | * @param fiberList å
纤项ç®ä¿¡æ¯ |
| | | * @param tables2 å
纤éä»¶è¡¨æ ¼ |
| | | */ |
| | | public void writeFiberEnclosureTableRow(List<InsProduct> fiberList, List<Map<String, Object>> tables2,InsReport insReport) { |
| | | AtomicInteger index2 = new AtomicInteger(1);//页ç |
| | | int colCount = 9;//è¡¨æ ¼æ»åæ° |
| | | int itemCount = 7;//è¡¨æ ¼é¡¹ç®åæ° |
| | | int k = 0;//å·²é忣éªé¡¹æ°é |
| | | //æ£éªé¡¹å表(表头) |
| | | List<String> itemMap = fiberList.stream().map(insProduct -> { |
| | | String item = MyUtil.joinChars("@",insProduct.getInspectionItem(),insProduct.getInspectionItemEn()); |
| | | String itemSubClass = MyUtil.joinChars("@",insProduct.getInspectionItemSubclass(),insProduct.getInspectionItemSubclassEn()); |
| | | return MyUtil.joinChars(ITEM_SPLIT_CHAR,item,itemSubClass); |
| | | }).sorted(Comparator.naturalOrder()).distinct().collect(Collectors.toList()); |
| | | //æ ¹æ®æ ·åidåç» |
| | | Map<Integer,List<InsProduct>> groupProducts = fiberList.stream() |
| | | .collect(Collectors.groupingBy(InsProduct::getInsSampleId)); |
| | | //sampleIdé¡ºåºæåº |
| | | List<Integer> sortKeys = groupProducts.keySet().stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList()); |
| | | //夿æ£éªé¡¹ç®æ¯å¦æç¶åå
³ç³» |
| | | int a = itemMap.stream().anyMatch(p -> p.split(ITEM_SPLIT_CHAR).length>0) ? 2 : 1; |
| | | for (int c = 0; c < itemMap.size(); c++) { |
| | | if (c % itemCount == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ°(æ ·åæ°é+表头) |
| | | int tableRow = sortKeys.size() + a; |
| | | for (int i = 0; i < tableRow; i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | //è¡¨æ ¼çåæ° |
| | | for (int j = 0; j < colCount; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | style.setFontSize(10); |
| | | textRenderData.setStyle(style); |
| | | //第ä¸è¡ |
| | | if(i==0){ |
| | | if (j < 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ45678"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else{ |
| | | //çæè¡¨å¤´ |
| | | if(itemMap.size()> (j - 2 + k)){ |
| | | String inspectionItem = itemMap.get(j - 2 + k).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText( inspectionItem + "â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | String inspectionItem = itemMap.get(itemMap.size()-1).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText("â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else if (a == 2 && i == 1) { |
| | | //æç¶å项ç®å
³ç³»ç第äºè¡ |
| | | if (j < 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ45678"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if(itemMap.size()> (j - 2 + k)){ |
| | | //夿æ¯å¦æé¡¹ç®åç±» |
| | | String[] splits = itemMap.get(j - 2 + k).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | //夿æ¯å¦æé¡¹ç®åç±» |
| | | String[] splits = itemMap.get(itemMap.size()-1).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText("â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText("â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else{ |
| | | //å¾ªç¯æ ·å |
| | | Integer key = sortKeys.get(i-2); |
| | | if(itemMap.size()>j - 2 + k) { |
| | | //æ¥è¯¢å½åæ ·åä¿¡æ¯ |
| | | InsSample insSample = insSampleMapper.selectById(key); |
| | | int index = Math.max(j - 2 + k, 0); |
| | | String item = itemMap.get(index); |
| | | InsProduct insProduct = groupProducts.get(key).stream() |
| | | .filter(p->{ |
| | | String insItem = MyUtil.joinChars("@",p.getInspectionItem(),p.getInspectionItemEn()); |
| | | String insItemSubClass = MyUtil.joinChars("@",p.getInspectionItemSubclass(),p.getInspectionItemSubclassEn()); |
| | | return item.equals(MyUtil.joinChars(ITEM_SPLIT_CHAR,insItem,insItemSubClass)); |
| | | }) |
| | | .findFirst().orElse(new InsProduct()); |
| | | //å¡«å¼ |
| | | if (j < 2) { |
| | | //第ä¸å |
| | | textRenderData.setText(insSample.getSampleCode()+"â"+key); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if((index+1)==groupProducts.get(key).size()){ |
| | | textRenderData.setText(insProduct.getLastValue()+"âlast"+key); |
| | | }else{ |
| | | textRenderData.setText(insProduct.getLastValue()); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else { |
| | | textRenderData.setText("âlast"+key); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (!rowRenderData.getCells().isEmpty()) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("å
纤æ¥åéä»¶è¡¨æ ¼åæ°ä¸å¹é
"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | // tableStyle.setColWidths(DEFAULT_COL_WIDTHS); |
| | | // tableStyle.setWidth("10000"); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table2", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("index2", index2.get()); |
| | | tables2.add(table); |
| | | k += 7; |
| | | index2.getAndIncrement(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * å
纤éä»¶è¡¨æ ¼ï¼åå
¥è¡æ°æ® |
| | | * @param ribbonList å
纤项ç®ä¿¡æ¯ |
| | | * @param tables6 å
çº¤å¸¦å°ºå¯¸åæ°éä»¶è¡¨æ ¼ |
| | | */ |
| | | public void writeFiberOpticRibbonEnclosureTableRow(List<InsProduct> ribbonList, List<Map<String, Object>> tables6,InsReport insReport){ |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.handler; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.framework.util.MyUtil; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import org.apache.poi.xwpf.usermodel.ParagraphAlignment; |
| | | import org.apache.poi.xwpf.usermodel.TableRowAlign; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * å
纤æ¥å¤´æèæ¥åå¤çç±» |
| | | */ |
| | | public class FiberOpticConnectorLossReportHandler { |
| | | |
| | | private final InsProductMapper insProductMapper; |
| | | |
| | | public FiberOpticConnectorLossReportHandler(InsProductMapper insProductMapper){ |
| | | this.insProductMapper = insProductMapper; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param insProducts0 å½å订åä¸çæææ£éªé¡¹ |
| | | * @param insSamples å½åè®¢åæææ ·å |
| | | * @param insReport report对象 |
| | | * @param tables4 å
纤æ¥å¤´æèéä»¶è¡¨æ ¼è¡æ°æ® |
| | | */ |
| | | public void doWrite(List<InsProduct> insProducts0, |
| | | List<InsSample> insSamples, |
| | | InsReport insReport, |
| | | List<Map<String,Object>> tables4){ |
| | | // //å»éçæ£éªé¡¹ç® |
| | | List<String> filteredProducts = insProducts0.stream() |
| | | .map(insProduct -> (MyUtil.joinChars(",",insProduct.getInspectionItem(),insProduct.getInspectionItemEn(),insProduct.getInspectionItemSubclass(),insProduct.getInspectionItemSubclassEn(),insProduct.getTell()))) |
| | | .distinct().collect(Collectors.toList()); |
| | | long index4 = 0; |
| | | //å
纤æ¥å¤´æèçæ¥åè¿æ¯tables4 |
| | | //æ¥è¯¢æ ·å(åªæ¥è¯¢å¸¦"/")çæ°é |
| | | List<InsSample> sampleList = insSamples.stream().filter(insSample -> insSample.getSampleCode().contains("/")).collect(Collectors.toList()); |
| | | //è¿æ»¤åºå
纤æ¥å¤´æèçæ£éªé¡¹ç® |
| | | List<String> strings = filteredProducts.stream().filter(s -> s.contains("å
纤æ¥å¤´æè")).distinct().sorted(Comparator.naturalOrder()).collect(Collectors.toList()); |
| | | long index41 = 1; |
| | | for (int i = 0; i < sampleList.size(); i++) { |
| | | if (i % 16 == 0) { |
| | | //æ ·åæ°éè¶
è¿16éè¦æ°å¢è¡¨æ ¼ |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | int count2 = sampleList.size() - (index41 - 1) * 16 < 16 ? (int) (sampleList.size() - (index41 - 1) * 16 + 1) : 17; |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int j = 0; j < count2; j++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | //è¡¨æ ¼çåæ° |
| | | for (int k = 0; k < 6; k++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | textRenderData.setStyle(style); |
| | | if (j == 0) { |
| | | //第ä¸è¡ |
| | | if (k == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å
纤类å@Fiber type"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (k == 1 || k == 2) { |
| | | //ç¬¬äº ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ3333"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | String[] split = strings.get(k - 3).split(","); |
| | | if (ObjectUtils.isEmpty(split[3]) || split[3].isEmpty()) { |
| | | textRenderData.setText(split[2]); |
| | | } else { |
| | | textRenderData.setText(split[2] + "@" + split[3]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else { |
| | | if (k == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText(sampleList.get(0).getModel() + "â44"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (k == 1) { |
| | | //第äºå |
| | | textRenderData.setText(sampleList.get(j - 1).getSampleCode().split("/")[0]); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (k == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText(sampleList.get(j - 1).getSampleCode().split("/")[1]); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //æ ¹æ®å¯¹åºçæ ·åç¼å·åæ£éªé¡¹ç®æ¥è¯¢å¯¹åºæ°æ®(æç»å¼) |
| | | String[] split = strings.get(k - 3).split(","); |
| | | // å¦ææ¯æ£éªé¡¹ä¸ºå
纤æ¥å¤´æèï¼ååç¬¬ä¸æ¡ |
| | | InsProduct insProduct = null; |
| | | if(split[0].equals("å
纤æ¥å¤´æè")) { |
| | | insProduct = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sampleList.get(j - 1).getId()) |
| | | .eq(InsProduct::getInspectionItem, split[0]) |
| | | .eq(InsProduct::getInspectionItemSubclass, split[2])).get(0); |
| | | }else { |
| | | insProduct = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sampleList.get(j - 1).getId()) |
| | | .eq(InsProduct::getInspectionItem, split[0]) |
| | | .eq(InsProduct::getInspectionItemSubclass, split[2])); |
| | | } |
| | | textRenderData.setText(insProduct.getLastValue()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (!rowRenderData.getCells().isEmpty()) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | /*for (CellRenderData cell : row.getCells()) { |
| | | System.out.print(cell.getParagraphs().get(0).getContents()); |
| | | } |
| | | System.out.println("");*/ |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("æ¯è¡åå
æ ¼ä¸ç¸ç3"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table4", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("index4", index4 + 1); |
| | | tables4.add(table); |
| | | index4++; |
| | | index41++; |
| | | } |
| | | } |
| | | tables4.forEach(table4 -> { |
| | | table4.put("tableSize4", tables4.size()); |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.handler; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.framework.util.MyUtil; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsSampleMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.inspect.pojo.InsSample; |
| | | import com.ruoyi.inspect.vo.InsProductFiberVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.xwpf.usermodel.ParagraphAlignment; |
| | | import org.apache.poi.xwpf.usermodel.TableRowAlign; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | |
| | | import java.text.Collator; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * å
çº¤å¸¦å°ºå¯¸åæ°æ¥åå¤çç±» |
| | | */ |
| | | public class FiberOpticRibbonReportHandler { |
| | | |
| | | /** |
| | | * é»è®¤è¡¨æ ¼å®½åº¦ |
| | | */ |
| | | private final static int[] DEFAULT_COL_WIDTHS = {1600,0, 1200, 1200, 1200, 1200, 1200, 1200,1200}; |
| | | |
| | | private final InsProductMapper insProductMapper; |
| | | private final InsSampleMapper insSampleMapper; |
| | | |
| | | public FiberOpticRibbonReportHandler(InsProductMapper insProductMapper, InsSampleMapper insSampleMapper){ |
| | | this.insProductMapper = insProductMapper; |
| | | this.insSampleMapper = insSampleMapper; |
| | | } |
| | | |
| | | private final static String ITEM_SPLIT_CHAR = "&";//æ£éªé¡¹åé符 |
| | | |
| | | private final static String COLOR_SPLIT_CHAR = "-";//è²æ åé符 |
| | | |
| | | /** |
| | | * |
| | | * @param samples æææ ·å |
| | | * @param insReport report对象 |
| | | * @param tables6 å°ºå¯¸åæ°éä»¶è¡¨æ ¼è¡å表 |
| | | * @param colorDict è²æ åå
¸ |
| | | */ |
| | | public void doWrite(List<SampleProductDto> samples, InsReport insReport, List<Map<String,Object>> tables6, |
| | | List<String> colorDict){ |
| | | AtomicInteger index6 = new AtomicInteger(1);//页ç |
| | | samples.forEach(sample -> { |
| | | //æ¥è¯¢æ ·åä¸çæ£éªé¡¹åå
纤带ç¼å· |
| | | List<InsProductFiberVO> insProducts1 = insProductMapper.selectInsProductInsFibersList(sample.getId()); |
| | | //æ ¹æ®å
纤带ç¼å· |
| | | Map<String,List<InsProductFiberVO>> groupProducts = insProducts1.stream() |
| | | .filter(p->p.getInspectionItem().equals("å°ºå¯¸åæ°")) |
| | | .collect(Collectors.groupingBy(product -> product.getBushColor()+"-"+product.getCode())); |
| | | if(groupProducts.isEmpty()){ |
| | | return; |
| | | } |
| | | List<String[]> collect = groupProducts.keySet().stream().map(k -> k.split(COLOR_SPLIT_CHAR)).sorted((o1, o2) -> { |
| | | if (o1.length > 1 && o2.length > 1) { |
| | | if (!Objects.equals(o1[0], o2[0])) { |
| | | Integer o1Index = colorDict.indexOf(o1[0]); |
| | | Integer o2Index = colorDict.indexOf(o2[0]); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | if (!Objects.equals(o1[1], o2[1])) { |
| | | Integer o1Index = colorDict.indexOf(o1[1]); |
| | | Integer o2Index = colorDict.indexOf(o2[1]); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | } |
| | | return 0; |
| | | }).collect(Collectors.toList()); |
| | | List<String> sortKeys = collect.stream().map(c->String.join(COLOR_SPLIT_CHAR,c)).collect(Collectors.toList()); |
| | | //æ£éªé¡¹å表(表头) |
| | | List<String> itemMap = insProducts1.stream().sorted((o1,o2)->{ |
| | | //æ ¹æ®æ£éªé¡¹æåº |
| | | if(!Objects.equals(o1.getInspectionItem(),o2.getInspectionItem())){ |
| | | List<String> specialItems = Arrays.asList("èç¯å¢åºåå¼è£","çæ¶ç¼©ç"); |
| | | if(specialItems.contains(o1.getInspectionItem()) && specialItems.contains(o2.getInspectionItem())){ |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItem(),o2.getInspectionItem()); |
| | | } |
| | | //æ£éªå项æåº |
| | | if(StringUtils.isNotBlank(o1.getInspectionItemSubclass())&& StringUtils.isNotBlank(o2.getInspectionItemSubclass())){ |
| | | if(!Objects.equals(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass())){ |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass()); |
| | | } |
| | | } |
| | | return 0; |
| | | }).map(insProduct -> { |
| | | String item = MyUtil.joinChars("@",insProduct.getInspectionItem(),insProduct.getInspectionItemEn()); |
| | | String itemSubClass = MyUtil.joinChars("@",insProduct.getInspectionItemSubclass(),insProduct.getInspectionItemSubclassEn()); |
| | | return MyUtil.joinChars(ITEM_SPLIT_CHAR,item,itemSubClass); |
| | | }).distinct().collect(Collectors.toList()); |
| | | long size = itemMap.size();//表头é¿åº¦ |
| | | long size2 = insProducts1.stream().map(InsProduct::getInsFibersId).distinct().count(); |
| | | long number = 10; |
| | | //夿æ£éªé¡¹ç®æ¯å¦æç¶åå
³ç³» |
| | | int a = itemMap.stream().anyMatch(p -> p.split(ITEM_SPLIT_CHAR).length>0) ? 2 : 1; |
| | | for (long c = 0; c < size; c++) { |
| | | if (c % number == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (long i = 0; i < size2 + a + 2; i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | //è¡¨æ ¼çåæ° |
| | | for (long j = 0; j < 12; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | style.setFontSize(10); |
| | | textRenderData.setStyle(style); |
| | | if(i==0){ |
| | | //第ä¸è¡ |
| | | if (j<=2) { |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ456"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j >2&&j<=5) { |
| | | textRenderData.setText(sample.getSampleCode()+"â4566"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j >5&&j<=8) { |
| | | textRenderData.setText("è§æ ¼åå·@Typeâ457"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | textRenderData.setText(sample.getModel()+"â4577"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 1) { |
| | | //第äºè¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("å
纤带ç¼å·@Scanning Numberâ101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | String inspectionItem = itemMap.get(itemMap.size()-1).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText("â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (a == 2 && i == 2) { |
| | | //æç¶å项ç®å
³ç³»ç第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("å
纤带ç¼å·@Scanning Numberâ101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j >1&& j<=3) { |
| | | String[] splits = itemMap.get(0).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j>3&&j<=5) { |
| | | String[] splits = itemMap.get(1).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j >5&&j<=7) { |
| | | String[] splits = itemMap.get(2).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j >7&&j<=9) { |
| | | String[] splits = itemMap.get(3).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else{ |
| | | String[] splits = itemMap.get(4).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if ( i == 3) { |
| | | //第åè¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("å
纤带ç¼å·@Scanning Numberâ101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if((int)(j - 2)%2==0){ |
| | | textRenderData.setText("A端"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | textRenderData.setText("B端"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else{ |
| | | //循ç¯å
纤带ç¼å· |
| | | String key = sortKeys.get((int)i-4); |
| | | String item; |
| | | if (j<=3) { |
| | | item = itemMap.get(0); |
| | | } |
| | | else if (j>3&&j<=5) { |
| | | item = itemMap.get(1); |
| | | } |
| | | else if (j >5&&j<=7) { |
| | | item = itemMap.get(2); |
| | | } |
| | | else if (j >7&&j<=9) { |
| | | item = itemMap.get(3); |
| | | } else{ |
| | | item = itemMap.get(4); |
| | | } |
| | | InsProductFiberVO insProduct = groupProducts.get(key).stream() |
| | | .filter(p->{ |
| | | String insItem = MyUtil.joinChars("@",p.getInspectionItem(),p.getInspectionItemEn()); |
| | | String insSubItem = MyUtil.joinChars("@",p.getInspectionItemSubclass(),p.getInspectionItemSubclassEn()); |
| | | return item.equals(MyUtil.joinChars(ITEM_SPLIT_CHAR,insItem,insSubItem)); |
| | | }).findFirst().orElse(new InsProductFiberVO()); |
| | | //å¡«å¼ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText(insProduct.getBushColor()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText(insProduct.getCode()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if((int)(j - 2)%2==0){ |
| | | textRenderData.setText(transformInsValue(insProduct.getInsValue()).get(0)); |
| | | }else{ |
| | | textRenderData.setText(transformInsValue(insProduct.getInsValue()).get(1)); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (!rowRenderData.getCells().isEmpty()) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("æ¯è¡åå
æ ¼ä¸ç¸ç6"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table6", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("sample_number", sample.getSampleCode()); |
| | | table.put("type", sample.getModel()); |
| | | table.put("index6", index6.get()); |
| | | tables6.add(table); |
| | | index6.getAndIncrement(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * æ ¼å¼åæ£éªè¿ç¨å¼jsonå符串 |
| | | * @param insValue æ£éªè¿ç¨å¼jsonå符串 |
| | | * @return |
| | | */ |
| | | private static List<String> transformInsValue(String insValue){ |
| | | List<String> list = new ArrayList<>(); |
| | | if(!insValue.isEmpty() && !"[]".equals(insValue)){ |
| | | for (Object o : JSONUtil.parseArray(insValue)) { |
| | | JSONObject obj = JSON.parseObject(JSON.toJSONString(o)); |
| | | if(Objects.nonNull(obj.get("v"))){ |
| | | list.add(obj.get("v").toString()); |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * å
纤éä»¶è¡¨æ ¼ï¼åå
¥è¡æ°æ® |
| | | * @param ribbonList å
纤项ç®ä¿¡æ¯ |
| | | * @param tables6 å
çº¤å¸¦å°ºå¯¸åæ°éä»¶è¡¨æ ¼ |
| | | */ |
| | | public void writeFiberOpticRibbonEnclosureTableRow(List<InsProductFiberVO> ribbonList, List<Map<String, Object>> tables6,InsReport insReport){ |
| | | AtomicInteger index6 = new AtomicInteger(1);//页ç |
| | | int colCount = 12;//è¡¨æ ¼æ»åæ° |
| | | int itemCount = 10;//è¡¨æ ¼é¡¹ç®åæ° |
| | | //æ£éªé¡¹å表(表头) |
| | | List<String> itemMap = ribbonList.stream().sorted((o1,o2)->{ |
| | | //æ ¹æ®æ£éªé¡¹æåº |
| | | if(!Objects.equals(o1.getInspectionItem(),o2.getInspectionItem())){ |
| | | List<String> specialItems = Arrays.asList("èç¯å¢åºåå¼è£","çæ¶ç¼©ç"); |
| | | if(specialItems.contains(o1.getInspectionItem()) && specialItems.contains(o2.getInspectionItem())){ |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItem(),o2.getInspectionItem()); |
| | | } |
| | | //æ£éªå项æåº |
| | | if(StringUtils.isNotBlank(o1.getInspectionItemSubclass())&& StringUtils.isNotBlank(o2.getInspectionItemSubclass())){ |
| | | if(!Objects.equals(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass())){ |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass()); |
| | | } |
| | | } |
| | | return 0; |
| | | }).map(insProduct -> { |
| | | String item = MyUtil.joinChars("@",insProduct.getInspectionItem(),insProduct.getInspectionItemEn()); |
| | | String itemSubClass = MyUtil.joinChars("@",insProduct.getInspectionItemSubclass(),insProduct.getInspectionItemSubclassEn()); |
| | | return MyUtil.joinChars(ITEM_SPLIT_CHAR,item,itemSubClass); |
| | | }).distinct().collect(Collectors.toList()); |
| | | //æ ¹æ®æ ·åidåç» |
| | | Map<Integer,List<InsProductFiberVO>> groupProducts = ribbonList.stream() |
| | | .collect(Collectors.groupingBy(InsProductFiberVO::getInsSampleId)); |
| | | //sampleIdé¡ºåºæåº |
| | | List<Integer> sortKeys = groupProducts.keySet().stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList()); |
| | | //夿æ£éªé¡¹ç®æ¯å¦æç¶åå
³ç³» |
| | | int a = itemMap.stream().anyMatch(p -> p.split(ITEM_SPLIT_CHAR).length>0) ? 2 : 1; |
| | | for (int c = 0; c < itemMap.size(); c++) { |
| | | if (c % itemCount == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ°(æ ·åæ°é+表头) |
| | | int tableRow = sortKeys.size() + a + 1; |
| | | for (int i = 0; i < tableRow; i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | //è¡¨æ ¼çåæ° |
| | | for (int j = 0; j < colCount; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | style.setFontSize(10); |
| | | textRenderData.setStyle(style); |
| | | //第ä¸è¡ |
| | | if(i==0){ |
| | | if (j < 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ45678"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else{ |
| | | //çæè¡¨å¤´ |
| | | if(itemMap.size()> (j - 2)){ |
| | | String inspectionItem = itemMap.get(j - 2).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText( inspectionItem + "â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | String inspectionItem = itemMap.get(itemMap.size()-1).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText("â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else if (a == 2 && i == 1) { |
| | | //æç¶å项ç®å
³ç³»ç第äºè¡ |
| | | if (j < 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ45678"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j >1&& j<=3) { |
| | | String[] splits = itemMap.get(0).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j>3&&j<=5) { |
| | | String[] splits = itemMap.get(1).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j >5&&j<=7) { |
| | | String[] splits = itemMap.get(2).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j >7&&j<=9) { |
| | | String[] splits = itemMap.get(3).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else{ |
| | | String[] splits = itemMap.get(4).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 2) { |
| | | //第ä¸è¡ |
| | | if (j < 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ45678"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if((j - 2) %2==0){ |
| | | textRenderData.setText("A端"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | textRenderData.setText("B端"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else{ |
| | | //å¾ªç¯æ ·å |
| | | Integer key = sortKeys.get(i-3); |
| | | //æ¥è¯¢å½åæ ·åä¿¡æ¯ |
| | | InsSample insSample = insSampleMapper.selectById(key); |
| | | int index = Math.max(j - 2, 0); |
| | | String item; |
| | | if (j<=3) { |
| | | item = itemMap.get(0); |
| | | } |
| | | else if (j>3&&j<=5) { |
| | | item = itemMap.get(1); |
| | | } |
| | | else if (j >5&&j<=7) { |
| | | item = itemMap.get(2); |
| | | } |
| | | else if (j >7&&j<=9) { |
| | | item = itemMap.get(3); |
| | | } else{ |
| | | item = itemMap.get(4); |
| | | } |
| | | InsProductFiberVO insProduct = groupProducts.get(key).stream() |
| | | .filter(p->{ |
| | | String insItem = MyUtil.joinChars("@",p.getInspectionItem(),p.getInspectionItemEn()); |
| | | String insItemSubClass = MyUtil.joinChars("@",p.getInspectionItemSubclass(),p.getInspectionItemSubclassEn()); |
| | | return item.equals(MyUtil.joinChars(ITEM_SPLIT_CHAR,insItem,insItemSubClass)); |
| | | }) |
| | | .findFirst().orElse(new InsProductFiberVO()); |
| | | //å¡«å¼ |
| | | if (j < 2) { |
| | | //第ä¸å |
| | | textRenderData.setText(insSample.getSampleCode()+"â"+key); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if(index%2==0){ |
| | | textRenderData.setText(transformInsValue(insProduct.getInsValue()).get(0)); |
| | | }else{ |
| | | textRenderData.setText(transformInsValue(insProduct.getInsValue()).get(1)); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | // if(itemMap.size()>j - 2) { |
| | | // } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (!rowRenderData.getCells().isEmpty()) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("å
纤带æ¥åéä»¶è¡¨æ ¼åæ°ä¸å¹é
"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | // tableStyle.setColWidths(DEFAULT_COL_WIDTHS); |
| | | // tableStyle.setWidth("10000"); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table6", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("index6", index6.get()); |
| | | tables6.add(table); |
| | | index6.getAndIncrement(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.handler; |
| | | |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.framework.util.MyUtil; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.inspect.vo.InsProductFiberVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.xwpf.usermodel.ParagraphAlignment; |
| | | import org.apache.poi.xwpf.usermodel.TableRowAlign; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | |
| | | import java.text.Collator; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ¾å¥ç®¡æ¥åå¤çç±» |
| | | */ |
| | | public class PiperConfigReportHandler { |
| | | |
| | | |
| | | private final InsProductMapper insProductMapper; |
| | | |
| | | public PiperConfigReportHandler(InsProductMapper insProductMapper){ |
| | | this.insProductMapper = insProductMapper; |
| | | } |
| | | |
| | | private final static String ITEM_SPLIT_CHAR = "&";//æ£éªé¡¹åé符 |
| | | |
| | | private final static String COLOR_SPLIT_CHAR = "-";//è²æ åé符 |
| | | |
| | | /** |
| | | * |
| | | * @param samples æææ ·å |
| | | * @param insReport report对象 |
| | | * @param tables5 æ¾å¥ç®¡éä»¶è¡¨æ ¼è¡å表 |
| | | * @param colorDict è²æ åå
¸ |
| | | */ |
| | | public void doWrite(List<SampleProductDto> samples, InsReport insReport, List<Map<String,Object>> tables5, List<String> colorDict){ |
| | | AtomicInteger index5 = new AtomicInteger(1);//页ç |
| | | samples.forEach(sample -> { |
| | | //æ¥è¯¢æ ·åä¸çæ£éªé¡¹åè²æ |
| | | List<InsProductFiberVO> insProducts1 = insProductMapper.selectInsProductInsBushList(sample.getId());//æ¥è¯¢å¥ç®¡ç¸å
³æ°æ® |
| | | //æ ¹æ®è²æ åç» |
| | | Map<String,List<InsProductFiberVO>> groupProducts = insProducts1.stream() |
| | | .filter(p->!p.getInspectionItem().equals("å
纤æ¥å¤´æè")) |
| | | .collect(Collectors.groupingBy(product -> product.getBushColor()+"-"+product.getColor())); |
| | | if(groupProducts.isEmpty()){ |
| | | return; |
| | | } |
| | | List<String[]> collect = groupProducts.keySet().stream().map(k -> k.split(COLOR_SPLIT_CHAR)).sorted((o1, o2) -> { |
| | | if (o1.length > 1 && o2.length > 1) { |
| | | if (!Objects.equals(o1[0], o2[0])) { |
| | | Integer o1Index = colorDict.indexOf(o1[0]); |
| | | Integer o2Index = colorDict.indexOf(o2[0]); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | if (!Objects.equals(o1[1], o2[1])) { |
| | | Integer o1Index = colorDict.indexOf(o1[1]); |
| | | Integer o2Index = colorDict.indexOf(o2[1]); |
| | | return o1Index.compareTo(o2Index); |
| | | } |
| | | } |
| | | return 0; |
| | | }).collect(Collectors.toList()); |
| | | List<String> sortKeys = collect.stream().map(c->String.join(COLOR_SPLIT_CHAR,c)).collect(Collectors.toList()); |
| | | //æ£éªé¡¹å表(表头) |
| | | List<String> itemMap = insProducts1.stream().sorted((o1,o2)->{ |
| | | //æ ¹æ®æ£éªé¡¹æåº |
| | | if(!Objects.equals(o1.getInspectionItem(),o2.getInspectionItem())){ |
| | | List<String> specialItems = Arrays.asList("èç¯å¢åºåå¼è£","çæ¶ç¼©ç"); |
| | | if(specialItems.contains(o1.getInspectionItem()) && specialItems.contains(o2.getInspectionItem())){ |
| | | return Integer.MAX_VALUE; |
| | | } |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItem(),o2.getInspectionItem()); |
| | | } |
| | | //æ£éªå项æåº |
| | | if(StringUtils.isNotBlank(o1.getInspectionItemSubclass())&& StringUtils.isNotBlank(o2.getInspectionItemSubclass())){ |
| | | if(!Objects.equals(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass())){ |
| | | Collator instance = Collator.getInstance(Locale.CHINA); |
| | | return instance.compare(o1.getInspectionItemSubclass(),o2.getInspectionItemSubclass()); |
| | | } |
| | | } |
| | | return 0; |
| | | }).map(insProduct -> { |
| | | String item = MyUtil.joinChars("@",insProduct.getInspectionItem(),insProduct.getInspectionItemEn()); |
| | | String itemSubClass = MyUtil.joinChars("@",insProduct.getInspectionItemSubclass(),insProduct.getInspectionItemSubclassEn()); |
| | | return MyUtil.joinChars(ITEM_SPLIT_CHAR,item,itemSubClass); |
| | | }).distinct().collect(Collectors.toList()); |
| | | long size = itemMap.size(); |
| | | long size2 = insProducts1.stream().map(InsProduct::getInsBushId).distinct().count(); |
| | | long number = 7; |
| | | long k = 0; |
| | | //夿æ£éªé¡¹ç®æ¯å¦æç¶åå
³ç³» |
| | | int a = itemMap.stream().anyMatch(p -> p.split(ITEM_SPLIT_CHAR).length>0) ? 2 : 1; |
| | | for (long c = 0; c < size; c++) { |
| | | if (c % number == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (long i = 0; i < size2 + a + 1; i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | //è¡¨æ ¼çåæ° |
| | | for (long j = 0; j < 9; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | style.setFontSize(10); |
| | | textRenderData.setStyle(style); |
| | | if(i==0){ |
| | | //第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ456"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ456"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getSampleCode()+"â4566"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 3) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getSampleCode()+"â4566"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("è§æ ¼åå·@Typeâ457"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 5) { |
| | | //第äºå |
| | | textRenderData.setText("è§æ ¼åå·@Typeâ457"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 6) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getModel()+"â4577"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else if (j == 7) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getModel()+"â4577"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | //第äºå |
| | | textRenderData.setText(sample.getModel()+"â4577"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 1) { |
| | | //第äºè¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | if(itemMap.size()>(int) (j - 2 + k)){ |
| | | String inspectionItem = itemMap.get((int) (j - 2 + k)).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText( inspectionItem + "â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | String inspectionItem = itemMap.get(itemMap.size()-1).split(ITEM_SPLIT_CHAR)[0]; |
| | | textRenderData.setText("â" + inspectionItem); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else if (a == 2 && i == 2) { |
| | | //æç¶å项ç®å
³ç³»ç第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("ç®¡è²æ @Pipeâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if(itemMap.size()>(int)(j - 2 + k)){ |
| | | //夿æ¯å¦æé¡¹ç®åç±» |
| | | String[] splits = itemMap.get((int) (j - 2 + k)).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText(splits[0] + "â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText(splits[1]+"â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | }else{ |
| | | //夿æ¯å¦æé¡¹ç®åç±» |
| | | String[] splits = itemMap.get(itemMap.size()-1).split(ITEM_SPLIT_CHAR); |
| | | if (splits.length<2 || "@".equals(splits[1])) { |
| | | textRenderData.setText("â" + splits[0]); |
| | | } else { |
| | | textRenderData.setText("â"+splits[0]+splits[1]); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | else{ |
| | | //循ç¯è²æ |
| | | String key = sortKeys.get((int)i-3); |
| | | if(itemMap.size()>(int) (j - 2 + k)) { |
| | | int index = Math.max((int) (j - 2 + k), 0); |
| | | String item = itemMap.get(index); |
| | | InsProductFiberVO insProduct = groupProducts.get(key).stream() |
| | | .filter(p->{ |
| | | String insItem = MyUtil.joinChars("@",p.getInspectionItem(),p.getInspectionItemEn()); |
| | | String insSubItem = MyUtil.joinChars("@",p.getInspectionItemSubclass(),p.getInspectionItemSubclassEn()); |
| | | return item.equals(MyUtil.joinChars(ITEM_SPLIT_CHAR,insItem,insSubItem)); |
| | | }).findFirst().orElse(new InsProductFiberVO()); |
| | | //å¡«å¼ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText(insProduct.getBushColor()+"â"+key); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText(insProduct.getBushColor()+"â"+key); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项ç®ä¿¡æ¯ |
| | | if((index+1)==groupProducts.get(key).size()){ |
| | | textRenderData.setText(insProduct.getLastValue()+"âlast"+key); |
| | | }else{ |
| | | textRenderData.setText(insProduct.getLastValue()); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else { |
| | | |
| | | textRenderData.setText("âlast"+key); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (!rowRenderData.getCells().isEmpty()) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("æ¯è¡åå
æ ¼ä¸ç¸ç4"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table5", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("sample_number", sample.getSampleCode()); |
| | | table.put("type", sample.getModel()); |
| | | table.put("index5", index5.get()); |
| | | tables5.add(table); |
| | | k += 7; |
| | | index5.getAndIncrement(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.handler; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.mapper.InsFiberMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductResultMapper; |
| | | import com.ruoyi.inspect.pojo.InsFiber; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsProductResult; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import org.apache.poi.xwpf.usermodel.ParagraphAlignment; |
| | | import org.apache.poi.xwpf.usermodel.TableRowAlign; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * æ¸©åº¦å¾ªç¯æ¥åçæå¤çæ¹æ³ |
| | | */ |
| | | public class TemperatureCyclingReportHandler1 { |
| | | |
| | | private final InsProductMapper insProductMapper; |
| | | |
| | | private final InsFiberMapper insFiberMapper; |
| | | |
| | | private final InsProductResultMapper insProductResultMapper; |
| | | |
| | | public TemperatureCyclingReportHandler1(InsProductMapper insProductMapper, InsFiberMapper insFiberMapper, InsProductResultMapper insProductResultMapper) { |
| | | this.insProductMapper = insProductMapper; |
| | | this.insFiberMapper = insFiberMapper; |
| | | this.insProductResultMapper = insProductResultMapper; |
| | | } |
| | | |
| | | public void doWrite(List<SampleProductDto> samples, InsReport insReport, List<Map<String, Object>> tables3) { |
| | | AtomicInteger index3 = new AtomicInteger(1); |
| | | // èªå®ä¹æ¯è¾å¨ |
| | | Comparator<InsProduct> customComparator = Comparator.comparing( |
| | | InsProduct::getInspectionItemSubclass, |
| | | Comparator.naturalOrder() |
| | | ); |
| | | samples.forEach(sample -> { |
| | | // æ¥è¯¢æ¸©åº¦å¾ªç¯ä¸çæ£éªé¡¹ç® |
| | | List<InsProduct> insPros = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .isNotNull(InsProduct::getInsFiberId) |
| | | .isNotNull(InsProduct::getInspectionItemClass)); |
| | | //è·åææå
çº¤è²æ |
| | | List<InsFiber> insFibers = insFiberMapper.selectBatchIds(insPros.stream().map(InsProduct::getInsFiberId).collect(Collectors.toList())); |
| | | //è·åå
çº¤è²æ çæ°é(è¡æ°) |
| | | long size2 = insPros.stream().map(InsProduct::getInsFiberId).distinct().count(); |
| | | //è·åææçå
纤项ç®(1310nm) |
| | | List<String> nm = insPros.stream().map(InsProduct::getInspectionItemClass).distinct().collect(Collectors.toList()); |
| | | /*å
æ ¹æ®å¾ªç¯æ¬¡æ°è¿è¡éå*/ |
| | | Map<String, List<InsProduct>> xunhuans = insPros.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItem)); |
| | | for (int i = 0; i < xunhuans.entrySet().size(); i++) { |
| | | //è·å该循ç¯çæææ¸©åº¦ |
| | | String s1 = String.valueOf((i + 1)); |
| | | //è¿æ»¤åº20â(常温)å20â |
| | | List<InsProduct> filterList = xunhuans.get(s1).stream().filter(f->f.getInspectionItemSubclass().equals("20â(常温)")).collect(Collectors.toList()); |
| | | List<InsProduct> filterList2 = xunhuans.get(s1).stream().filter(f->f.getInspectionItemSubclass().equals("20â")).collect(Collectors.toList()); |
| | | //æåºå
¶ä»æ¸©åº¦ |
| | | List<InsProduct> sortList = xunhuans.get(s1).stream() |
| | | .filter(f->!Arrays.asList("20â(常温)","20â").contains(f.getInspectionItemSubclass())) |
| | | .sorted(customComparator).collect(Collectors.toList()); |
| | | //åå¹¶ |
| | | Map<String, List<InsProduct>> wendus = Stream.of(filterList,sortList,filterList2).flatMap(List::stream).collect(Collectors.groupingBy( |
| | | InsProduct::getInspectionItemSubclass, |
| | | LinkedHashMap::new, // ä¿è¯ Map ä¸é®çé¡ºåºæ¯æå
¥é¡ºåº |
| | | Collectors.toCollection(ArrayList::new) // ä¿è¯æ¯ä¸ªç»å
å
ç´ é¡ºåº |
| | | )); |
| | | List<String> wendu = new ArrayList<>(wendus.keySet()); |
| | | for (int m = 0; m < wendu.size(); m += 3) { |
| | | //ä¸ä¸ªæ¸©åº¦ä¸å¼ 表,å½éåå°ç¬¬åä¸ªæ¸©åº¦çæ¶åéè¦éæ°å»ºè¡¨ |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ°(å
çº¤è²æ çæ°é+8) |
| | | for (int j = 0; j < size2 + 8; j++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | //è¡¨æ ¼çåæ°(2*å
纤项ç®*3+1) |
| | | for (int k = 0; k < 6 * nm.size() + 1; k++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | style.setFontSize(10); |
| | | textRenderData.setStyle(style); |
| | | if (j == 0) { |
| | | //第ä¸è¡ |
| | | if (k <= (6L * nm.size() + 1) / 4) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample numberâ1000"); |
| | | } else if (k > (6L * nm.size() + 1) / 4 && k <= (6L * nm.size() + 1) / 2) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getSampleCode() + "â998"); |
| | | } else if (k > (6L * nm.size() + 1) / 2 && k < 6L * nm.size()) { |
| | | //第ä¸å |
| | | textRenderData.setText("è§æ ¼åå·@Type â999"); |
| | | } else { |
| | | //第åå |
| | | textRenderData.setText(sample.getModel()); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 1) { |
| | | //第äºè¡ |
| | | if (k == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å
çº¤è²æ @ScanningNumberâ1004"); |
| | | } else { |
| | | textRenderData.setText("æ£æµç»æï¼dB/kmï¼(循ç¯" + (i + 1) + ")â1005"); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 2) { |
| | | //第ä¸è¡ |
| | | if (k == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å
çº¤è²æ @ScanningNumberâ1004"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (k <= 6L * nm.size() / 3) { |
| | | textRenderData.setText(wendu.get(m) + "â52"+j + m); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (k > 6L * nm.size() / 3 && k <= 6L * nm.size() / 3 * 2) { |
| | | int i1 = m + 1; |
| | | String s = ""; |
| | | try { |
| | | s = wendu.get(m + 1); |
| | | } catch (Exception e) { |
| | | } |
| | | textRenderData.setText(s + "â52"+j + i1); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | int i1 = m + 2; |
| | | String s = ""; |
| | | try { |
| | | s = wendu.get(m + 2); |
| | | } catch (Exception e) { |
| | | } |
| | | textRenderData.setText(s + "â52" +j+ i1); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (j == 3) { |
| | | //第åè¡ |
| | | if (k == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å
çº¤è²æ @ScanningNumberâ1004"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | for (int j1 = 0; j1 < 3; j1++) {//ä¸å¼ 表3个温度 |
| | | for (int i1 = 0; i1 < nm.size(); i1++) {//循ç¯å
纤项ç®:1310nm |
| | | if (k > 2 * j1 * nm.size() + 2 * i1 && k <= 2 * j1 * nm.size() + 2 * (i1 + 1)) { |
| | | textRenderData.setText(nm.get(i1) + "â88888" + ((k + 1) / nm.size()) + i1); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else if (j == 4) { |
| | | //第äºè¡ |
| | | if (k == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å
çº¤è²æ @ScanningNumberâ1004"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (k % 2 == 1) { |
| | | if (k <= 6L * nm.size() / 3 && wendu.get(m).equals("20â(常温)")) { |
| | | textRenderData.setText("è¡°å" + "â42" +j+ k); |
| | | } else { |
| | | textRenderData.setText(" è¡°å "); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | if (k <= 6L * nm.size() / 3 && wendu.get(m).equals("20â(常温)")) { |
| | | textRenderData.setText("è¡°å" + "â42"+j + (k - 1)); |
| | | } else { |
| | | textRenderData.setText("|â α|"); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (j == size2 + 5) { |
| | | //åæ°ç¬¬ä¸è¡ |
| | | if (k == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("|max|"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (k % 2 == 0) { |
| | | String s = ""; |
| | | if (k <= 6L * nm.size() / 3) { |
| | | s = wendu.get(m); |
| | | } else if (k > 6L * nm.size() / 3 && k <= 6L * nm.size() / 3 * 2) { |
| | | try { |
| | | s = wendu.get(m + 1); |
| | | } catch (Exception e) { |
| | | } |
| | | } else { |
| | | try { |
| | | s = wendu.get(m + 2); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | //计ç®ç¬¬()温度ç第()个项ç®çææè²æ çæç»å¼çæå¤§å¼ |
| | | if (s.equals("")) { |
| | | textRenderData.setText(""); |
| | | } else { |
| | | try { |
| | | if (k <= 6L * nm.size() / 3 && wendu.get(m).equals("20â(常温)")){ |
| | | List<Integer> ips = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, i + 1) |
| | | .eq(InsProduct::getInspectionItemSubclass, s) |
| | | .eq(InsProduct::getInspectionItemClass, nm.get((k - 2) / 2 % nm.size()))) |
| | | .stream().map(InsProduct::getId).collect(Collectors.toList()); |
| | | List<InsProductResult> insProductResults = insProductResultMapper.selDetail(ips); |
| | | Optional<String> max = insProductResults.stream().map(insProductResult -> { |
| | | { |
| | | String[] splitStr = insProductResult.getComValue().split(":"); |
| | | return splitStr[splitStr.length - 1].split("\"")[1]; |
| | | } |
| | | }).filter(value -> !value.isEmpty()).max(String::compareTo); |
| | | textRenderData.setText(max.get() + "â"+j+ (k-1)); |
| | | }else { |
| | | Optional<String> max = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, i + 1) |
| | | .eq(InsProduct::getInspectionItemSubclass, s) |
| | | .eq(InsProduct::getInspectionItemClass, nm.get((k - 2) / 2 % nm.size()))) |
| | | .stream().map(InsProduct::getLastValue) |
| | | .filter(value -> !value.isEmpty()) |
| | | .max(String::compareTo); |
| | | if (max.isPresent()) { |
| | | textRenderData.setText(max.get()); |
| | | } else { |
| | | textRenderData.setText(""); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | String s = ""; |
| | | if (k <= 6L * nm.size() / 3) { |
| | | s = wendu.get(m); |
| | | } else if (k > 6L * nm.size() / 3 && k <= 6L * nm.size() / 3 * 2) { |
| | | try { |
| | | s = wendu.get(m + 1); |
| | | } catch (Exception e) { |
| | | } |
| | | } else { |
| | | try { |
| | | s = wendu.get(m + 2); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | //计ç®ç¬¬()温度ç第()个项ç®çææè²æ çå¹³åå¼çæå¤§å¼ |
| | | if (s.equals("")) { |
| | | textRenderData.setText(""); |
| | | } else { |
| | | List<Integer> ips = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, i + 1) |
| | | .eq(InsProduct::getInspectionItemSubclass, s) |
| | | .eq(InsProduct::getInspectionItemClass, nm.get((k - 1) / 2 % nm.size()))).stream().map(InsProduct::getId).collect(Collectors.toList()); |
| | | List<InsProductResult> insProductResults = insProductResultMapper.selDetail(ips); |
| | | Optional<String> max = insProductResults.stream().map(insProductResult -> { |
| | | { |
| | | String[] splitStr = insProductResult.getComValue().split(":"); |
| | | return splitStr[splitStr.length - 1].split("\"")[1]; |
| | | } |
| | | }).filter(value -> !value.isEmpty()).max(String::compareTo); |
| | | if (k <= 6L * nm.size() / 3 && wendu.get(m).equals("20â(常温)")){ |
| | | textRenderData.setText(max.get() + "â"+j+ k); |
| | | }else { |
| | | if (max.isPresent()) { |
| | | textRenderData.setText(max.get()); |
| | | } else { |
| | | textRenderData.setText(""); |
| | | } |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (j == size2 + 6) { |
| | | //åæ°ç¬¬äºè¡ |
| | | if (k == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("|â α max|"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (k % 2 == 0) { |
| | | String s = ""; |
| | | if (k <= 6L * nm.size() / 3) { |
| | | s = wendu.get(m); |
| | | } else if (k > 6L * nm.size() / 3 && k <= 6L * nm.size() / 3 * 2) { |
| | | try { |
| | | s = wendu.get(m + 1); |
| | | } catch (Exception e) { |
| | | } |
| | | } else { |
| | | try { |
| | | s = wendu.get(m + 2); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | //计ç®ç¬¬()温度ç第()个项ç®çææè²æ çæç»å¼çæå¤§å¼ |
| | | if (s.equals("")) { |
| | | textRenderData.setText(""); |
| | | } else { |
| | | if (k <= 6L * nm.size() / 3 && wendu.get(m).equals("20â(常温)")) { |
| | | textRenderData.setText("-" + "â" + j + (k-1)); |
| | | } else { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, i + 1) |
| | | .eq(InsProduct::getInspectionItemSubclass, s) |
| | | .eq(InsProduct::getInspectionItemClass, nm.get((k - 2) / 2 % nm.size()))); |
| | | try { |
| | | Optional<String> max = insProducts.stream().map(InsProduct::getLastValue) |
| | | .filter(value -> !value.isEmpty()) |
| | | .max(String::compareTo); |
| | | if (max.isPresent()) { |
| | | textRenderData.setText(max.get()); |
| | | } else { |
| | | textRenderData.setText(""); |
| | | } |
| | | } catch (Exception e) { |
| | | textRenderData.setText(""); |
| | | } |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | if (k <= 6L * nm.size() / 3 && wendu.get(m).equals("20â(常温)")) { |
| | | textRenderData.setText("-" + "â" + j + k); |
| | | } else { |
| | | textRenderData.setText("-"); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (j == size2 + 7) { |
| | | //åæ°ç¬¬ä¸è¡ |
| | | textRenderData.setText("â|â α|â表示éå è¡°åç»å¯¹å¼â111111"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | //å
¶ä½å¡«åæ£éªå¼çå
容 |
| | | if (k == 0) { |
| | | //第ä¸åå¡«åè²æ |
| | | InsFiber insFiber = insFibers.get((j - 5)); |
| | | textRenderData.setText(insFiber.getBushColor() + "-" + insFiber.getColor()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (k % 2 == 0) { |
| | | //å¡«åè¡°å差就æ¯last_value |
| | | String s = ""; |
| | | if (k <= 6L * nm.size() / 3) { |
| | | s = wendu.get(m); |
| | | } else if (k > 6L * nm.size() / 3 && k <= 6L * nm.size() / 3 * 2) { |
| | | try { |
| | | s = wendu.get(m + 1); |
| | | } catch (Exception e) { |
| | | } |
| | | } else { |
| | | try { |
| | | s = wendu.get(m + 2); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | if (s.isEmpty()) { |
| | | textRenderData.setText(""); |
| | | } else { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInsFiberId, insFibers.get(j - 5).getId()) |
| | | .eq(InsProduct::getInspectionItem, i + 1) |
| | | .eq(InsProduct::getInspectionItemSubclass, s) |
| | | .eq(InsProduct::getInspectionItemClass, nm.get((k - 2) / 2 % nm.size()))); |
| | | if (k <= 6L * nm.size() / 3 && s.equals("20â(常温)")) { |
| | | String comValue = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, insProducts.get(0).getId())) |
| | | .getComValue(); |
| | | String[] splitStr = comValue.split(":"); |
| | | textRenderData.setText(splitStr[splitStr.length - 1].split("\"")[1] + "â" + j + (k - 1)); |
| | | } else { |
| | | textRenderData.setText(insProducts.get(0).getLastValue()); |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //å¡«åå
¶ä½æ£å¸¸æ¸©åº¦çè¡°å(result表éé¢çcom_value) |
| | | String s = ""; |
| | | if (k <= 6L * nm.size() / 3) { |
| | | s = wendu.get(m); |
| | | } else if (k > 6L * nm.size() / 3 && k <= 6L * nm.size() / 3 * 2) { |
| | | try { |
| | | s = wendu.get(m + 1); |
| | | } catch (Exception e) { |
| | | } |
| | | } else { |
| | | try { |
| | | s = wendu.get(m + 2); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | if (s.equals("")) { |
| | | textRenderData.setText(""); |
| | | } else { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInsFiberId, insFibers.get(j - 5).getId()) |
| | | .eq(InsProduct::getInspectionItem, i + 1) |
| | | .eq(InsProduct::getInspectionItemSubclass, s) |
| | | .eq(InsProduct::getInspectionItemClass, nm.get((k - 1) / 2 % nm.size()))); |
| | | String comValue = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, insProducts.get(0).getId())) |
| | | .getComValue(); |
| | | String[] splitStr = comValue.split(":"); |
| | | if (k <= 6L * nm.size() / 3 && s.equals("20â(常温)")) { |
| | | textRenderData.setText(splitStr[splitStr.length - 1].split("\"")[1] + "â" + j + k); |
| | | } else { |
| | | textRenderData.setText(splitStr[splitStr.length - 1].split("\"")[1]); |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (!rowRenderData.getCells().isEmpty()) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("æ¯è¡åå
æ ¼ä¸ç¸ç5"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table3", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("index3", index3.get()); |
| | | tables3.add(table); |
| | | index3.getAndIncrement(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.handler; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductResultMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsProductResult; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.xwpf.usermodel.ParagraphAlignment; |
| | | import org.apache.poi.xwpf.usermodel.TableRowAlign; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 温åè¯éªæ¥åå¤çç±» |
| | | */ |
| | | public class TemperatureTestReportHandler { |
| | | |
| | | private final InsProductMapper insProductMapper; |
| | | |
| | | private final InsProductResultMapper insProductResultMapper; |
| | | |
| | | public TemperatureTestReportHandler(InsProductMapper insProductMapper, InsProductResultMapper insProductResultMapper){ |
| | | this.insProductMapper = insProductMapper; |
| | | this.insProductResultMapper = insProductResultMapper; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param samples å½å订åçæææ ·å |
| | | * @param insReport report对象 |
| | | * @param tables3 温åè¯éªéä»¶è¡¨æ ¼æ°æ® |
| | | */ |
| | | public void doWrite(List<SampleProductDto> samples, InsReport insReport, List<Map<String,Object>> tables3){ |
| | | samples.forEach(sample -> { |
| | | //æ¥è¯¢æ¸©åè¯éªä¸çæ£éªé¡¹ç® |
| | | List<InsProduct> insPros = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .isNull(InsProduct::getInspectionItemClass)//ç¨æ£éªå项忮µåºå«æ¸©åè¯éªä¸çå¾ªç¯ |
| | | .isNull(InsProduct::getInsFiberId) //ç¨å
纤åºå«æ¸©åè¯éªåæ¸©åº¦å¾ªç¯ |
| | | .eq(InsProduct::getInspectionItem, "1")); //温åè¯éªç循ç¯åªæ1次 |
| | | //æ¥è¯¢å¡«åçæ£éªå¼æå¤å°ç§ |
| | | InsProductResult insProductResult = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPros.get(0).getId())).get(0); |
| | | int vCount = StringUtils.countMatches(insProductResult.getInsValue(), "\"v\":\""); |
| | | long index3 = 1; |
| | | for (int c = 0; c < vCount; c++) { |
| | | if (c % 16 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 3 + vCount; i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | String a = null;//导线温度 |
| | | String b = null;//èå¼ æ¸©åº¦ |
| | | String d = null;//æ¥ç»æ¸©åº¦ |
| | | //åæ° |
| | | for (int j = 0; j < 6; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | textRenderData.setStyle(style); |
| | | if (i == 0) { |
| | | //第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getSampleCode()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("è§æ ¼åå·@Type and size"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText(sample.getModel()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("æ£æµé¡¹@Testing items"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第å
å |
| | | textRenderData.setText("温åè¯éª@Temperature rise test"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } else if (i == 1) { |
| | | //第äºè¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("ç¯å¢æ¸©åº¦@Ambient temperatureï¼âï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("导线温度@Wire temperatureï¼âï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("èå¼ æ¸©åº¦@Tensile temperatureï¼âï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("æ¥ç»æ¸©åº¦@Connection temperatureï¼âï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第äºå第å
å |
| | | textRenderData.setText("ç»æå¤å®@Result judgmentâ100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 2 + vCount) { |
| | | //æåä¸è¡ |
| | | if (j == 0 || j == 1) { |
| | | //第ä¸åå第äºå |
| | | textRenderData.setText("夿³¨â101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //å
¶ä½å |
| | | textRenderData.setText("âââ表示项ç®åæ ¼ï¼âÃâ表示项ç®ä¸åæ ¼ãâ102"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else { |
| | | //å
¶ä½è¡ |
| | | if (j == 0) { |
| | | //第ä¸å(ç¯å¢æ¸©åº¦) |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "ç¯å¢æ¸©åº¦") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .isNull(InsProduct::getInspectionItemClass)//ç¨æ£éªå项忮µåºå«æ¸©åè¯éªä¸çå¾ªç¯ |
| | | .isNull(InsProduct::getInsFiberId) //ç¨å
纤åºå«æ¸©åè¯éªåæ¸©åº¦å¾ªç¯ |
| | | .eq(InsProduct::getInspectionItem, "1")); //温åè¯éªç循ç¯åªæ1次 |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 2); |
| | | String vValue = jsonObject.getString("v"); |
| | | System.out.println("ç¯å¢æ¸©åº¦ç¬¬ " + (i - 1) + " 个 'v' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 1) { |
| | | //第äºå(导线温度) |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "导线温度") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .isNull(InsProduct::getInspectionItemClass)//ç¨æ£éªå项忮µåºå«æ¸©åè¯éªä¸çå¾ªç¯ |
| | | .isNull(InsProduct::getInsFiberId) //ç¨å
纤åºå«æ¸©åè¯éªåæ¸©åº¦å¾ªç¯ |
| | | .eq(InsProduct::getInspectionItem, "1")); //温åè¯éªç循ç¯åªæ1次 |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 2); |
| | | String vValue = jsonObject.getString("v"); |
| | | a = vValue; |
| | | System.out.println("导线温度第 " + (i - 1) + " 个 'v' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 2) { |
| | | //第ä¸å(èå¼ æ¸©åº¦) |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "èå¼ æ¸©åº¦") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .isNull(InsProduct::getInspectionItemClass)//ç¨æ£éªå项忮µåºå«æ¸©åè¯éªä¸çå¾ªç¯ |
| | | .isNull(InsProduct::getInsFiberId) //ç¨å
纤åºå«æ¸©åè¯éªåæ¸©åº¦å¾ªç¯ |
| | | .eq(InsProduct::getInspectionItem, "1")); //温åè¯éªç循ç¯åªæ1次 |
| | | if (ObjectUtils.isNotEmpty(insPro)) { |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 2); |
| | | String vValue = jsonObject.getString("v"); |
| | | b = vValue; |
| | | System.out.println("èå¼ æ¸©åº¦ç¬¬ " + (i - 1) + " 个 'v' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | } else { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 3) { |
| | | //第åå(æ¥ç»æ¸©åº¦) |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "æ¥ç»æ¸©åº¦") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .isNull(InsProduct::getInspectionItemClass)//ç¨æ£éªå项忮µåºå«æ¸©åè¯éªä¸çå¾ªç¯ |
| | | .isNull(InsProduct::getInsFiberId) //ç¨å
纤åºå«æ¸©åè¯éªåæ¸©åº¦å¾ªç¯ |
| | | .eq(InsProduct::getInspectionItem, "1")); //温åè¯éªç循ç¯åªæ1次 |
| | | if (ObjectUtils.isNotEmpty(insPro)) { |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 2); |
| | | String vValue = jsonObject.getString("v"); |
| | | d = vValue; |
| | | System.out.println("æ¥ç»æ¸©åº¦ç¬¬ " + (i - 1) + " 个 'v' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | } else { |
| | | textRenderData.setText(""); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | //第äºå 第å
å(ç»è®º) |
| | | //å¤æåæ ¼ä¸ä¸åæ ¼ |
| | | BigDecimal decimal1 = new BigDecimal(a); |
| | | BigDecimal decimal2 = new BigDecimal(b == null ? "0" : b); |
| | | BigDecimal decimal3 = new BigDecimal(d == null ? "0" : d); |
| | | if (decimal1.compareTo(decimal2) > 0 && decimal1.compareTo(decimal3) > 0) { |
| | | textRenderData.setText("ââ20"+i); |
| | | } else { |
| | | textRenderData.setText("Ãâ20"+i); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (rowRenderData.getCells().size() != 0) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | /*for (CellRenderData cell : row.getCells()) { |
| | | System.out.print(cell.getParagraphs().get(0).getContents()); |
| | | } |
| | | System.out.println("");*/ |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("æ¯è¡åå
æ ¼ä¸ç¸ç5"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table3", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("index3", index3); |
| | | tables3.add(table); |
| | | index3++; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.handler; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.SampleProductDto; |
| | | import com.ruoyi.inspect.mapper.InsProductMapper; |
| | | import com.ruoyi.inspect.mapper.InsProductResultMapper; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.pojo.InsProductResult; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.xwpf.usermodel.ParagraphAlignment; |
| | | import org.apache.poi.xwpf.usermodel.TableRowAlign; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTable; |
| | | import org.apache.poi.xwpf.usermodel.XWPFTableCell; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * çå¾ªç¯æ¥åå¤çç±» |
| | | */ |
| | | public class ThermalCycleReportHandler { |
| | | |
| | | |
| | | private final InsProductMapper insProductMapper; |
| | | |
| | | private final InsProductResultMapper insProductResultMapper; |
| | | |
| | | public ThermalCycleReportHandler(InsProductMapper insProductMapper, InsProductResultMapper insProductResultMapper){ |
| | | this.insProductMapper = insProductMapper; |
| | | this.insProductResultMapper = insProductResultMapper; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param samples å½å订åçæææ ·å |
| | | * @param insReport report对象 |
| | | * @param tables3 ç循ç¯éä»¶è¡¨æ ¼æ°æ® |
| | | */ |
| | | public void doWrite(List<SampleProductDto> samples, InsReport insReport, List<Map<String,Object>> tables3){ |
| | | samples.forEach(sample -> { |
| | | //è®¡ç®æ°æ®çè¡æ°,å
æ¥åºæå¤å°æ¬¡å¾ªç¯,忥æ¯ä¸ªå¾ªç¯çå¡«åæ°é |
| | | InsProduct insProduct = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "ç循ç¯")); |
| | | String[] split = insProduct.getAsk().split(";"); |
| | | Integer cycle = Integer.parseInt(split[split.length - 1]);//å¾ªç¯æ¬¡æ° |
| | | int vCount = 0; |
| | | List<Integer> list = new ArrayList<>(); |
| | | for (Integer i = 1; i <= cycle; i++) { |
| | | //æ¥æ¯ä¸ªå¾ªç¯éé¢çå¡«åæ°é |
| | | List<InsProduct> insPros = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .eq(InsProduct::getInspectionItemClass, "ç´æµçµé»") |
| | | .isNull(InsProduct::getInsFiberId) //ç¨å
纤åºå«æ¸©åè¯éªåæ¸©åº¦å¾ªç¯ |
| | | .eq(InsProduct::getInspectionItem, i + "")); |
| | | InsProductResult insProductResult = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPros.get(0).getId())).get(0); |
| | | vCount += StringUtils.countMatches(insProductResult.getInsValue(), "\"v\":\""); |
| | | list.add(StringUtils.countMatches(insProductResult.getInsValue(), "\"v\":\"")); |
| | | } |
| | | long index3 = 1; |
| | | for (int c = 0; c < vCount; c++) { |
| | | if (c % 18 == 0) { |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | //è¡¨æ ¼çè¡æ° |
| | | for (int i = 0; i < 4 + vCount; i++) { |
| | | RowRenderData rowRenderData = new RowRenderData(); |
| | | RowStyle rowStyle = new RowStyle(); |
| | | rowStyle.setHeight(40); |
| | | rowRenderData.setRowStyle(rowStyle); |
| | | List<CellRenderData> cells = new ArrayList<>(); |
| | | String a = null;//导线温度 |
| | | String b = null;//èå¼ æ¸©åº¦ |
| | | String d = null;//æ¥ç»æ¸©åº¦ |
| | | //åæ° |
| | | for (int j = 0; j < 9; j++) { |
| | | CellRenderData cellRenderData = new CellRenderData(); |
| | | CellStyle cellStyle = new CellStyle(); |
| | | cellStyle.setVertAlign(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | cellRenderData.setCellStyle(cellStyle); |
| | | List<ParagraphRenderData> paragraphRenderDataList = new ArrayList<>(); |
| | | ParagraphRenderData paragraphRenderData = new ParagraphRenderData(); |
| | | ParagraphStyle paragraphStyle = new ParagraphStyle(); |
| | | paragraphStyle.setAlign(ParagraphAlignment.CENTER); |
| | | paragraphRenderData.setParagraphStyle(paragraphStyle); |
| | | List<RenderData> renderData = new ArrayList<>(); |
| | | TextRenderData textRenderData = new TextRenderData(); |
| | | Style style = new Style(); |
| | | style.setFontFamily("å®ä½"); |
| | | style.setColor("000000"); |
| | | textRenderData.setStyle(style); |
| | | if (i == 0) { |
| | | //第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ ·åç¼å·@Sample number"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText(sample.getSampleCode()); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2 || j == 3) { |
| | | //第ä¸åå第åå |
| | | textRenderData.setText("è§æ ¼åå·@Type and sizeâ301"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4 || j == 5) { |
| | | //第äºåå第å
å |
| | | textRenderData.setText(sample.getModel()+"â302"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | //第ä¸å |
| | | textRenderData.setText("æ£æµé¡¹@Testing items"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第å
«åå第ä¹å |
| | | textRenderData.setText("ç循ç¯@Thermal cycleâ303"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 1) { |
| | | //第äºè¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å¾ªç¯æ¬¡æ°@Number of cycles(times)â100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("ç¯å¢æ¸©åº¦@Ambient temperatureï¼âï¼â101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2 || j == 3) { |
| | | //第ä¸åå第åå |
| | | textRenderData.setText("导线@Conductorâ102"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4 || j == 5) { |
| | | //第äºåå第å
å |
| | | textRenderData.setText("èå¼ çº¿å¤¹@Tension clampâ103"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6 || j == 7) { |
| | | //第ä¸å第å
«å |
| | | textRenderData.setText("æ¥ç»éå
·@Splicing fittingsâ104"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第ä¹å |
| | | textRenderData.setText("ç»æå¤å®@Result judgmentâ105"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 2) { |
| | | //第ä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("å¾ªç¯æ¬¡æ°@Number of cycles(times)â100"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 1) { |
| | | //第äºå |
| | | textRenderData.setText("ç¯å¢æ¸©åº¦@Ambient temperatureï¼âï¼â101"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 2) { |
| | | //第ä¸å |
| | | textRenderData.setText("温度@Temperatureï¼âï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 3) { |
| | | //第åå |
| | | textRenderData.setText("ç´æµçµé»@DC resistanceï¼Î©/kmï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 4) { |
| | | //第äºå |
| | | textRenderData.setText("温度@Temperatureï¼âï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 5) { |
| | | //第å
å |
| | | textRenderData.setText("ç´æµçµé»@DC resistanceï¼Î©/kmï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 6) { |
| | | //第ä¸å |
| | | textRenderData.setText("温度@Temperatureï¼âï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else if (j == 7) { |
| | | //第å
«å |
| | | textRenderData.setText("ç´æµçµé»@DC resistanceï¼Î©/kmï¼"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //第ä¹å |
| | | textRenderData.setText("ç»æå¤å®@Result judgmentâ105"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else if (i == 3 + vCount) { |
| | | //æåä¸è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | textRenderData.setText("夿³¨"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //å
¶ä½å |
| | | textRenderData.setText("âââ表示项ç®åæ ¼ï¼âÃâ表示项ç®ä¸åæ ¼ãâ108"); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | else { |
| | | //å
¶ä½è¡ |
| | | if (j == 0) { |
| | | //第ä¸å |
| | | int aa= 0; |
| | | for (int m = 0; m < cycle; m++) { |
| | | aa += list.get(m); |
| | | if (i-3<aa){ |
| | | textRenderData.setText((m+1)+""); |
| | | break; |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 1) { |
| | | //第äºå |
| | | int aa= 0; |
| | | for (int m = 0; m < cycle; m++) { |
| | | aa += list.get(m); |
| | | if (i-3<aa){ |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "ç¯å¢æ¸©åº¦") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .eq(InsProduct::getInspectionItemClass,"ç´æµçµé»") |
| | | .isNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, (m+1)+"")); |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 3-(aa-list.get(m))); |
| | | String vValue = jsonObject.getString("v"); |
| | | System.out.println("ç¯å¢æ¸©åº¦ç¬¬ " + (i - 2-(aa-list.get(m))) + " 个 'v' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | break; |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 2) { |
| | | //第ä¸å |
| | | int aa= 0; |
| | | for (int m = 0; m < cycle; m++) { |
| | | aa += list.get(m); |
| | | if (i-3<aa){ |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "导线温度") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .eq(InsProduct::getInspectionItemClass,"ç´æµçµé»") |
| | | .isNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, (m+1)+"")); |
| | | if (ObjectUtils.isNotEmpty(insPro)) { |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 3 - (aa - list.get(m))); |
| | | String vValue = jsonObject.getString("v"); |
| | | a=vValue; |
| | | System.out.println("导线温度第 " + (i - 2 - (aa - list.get(m))) + " 个 'v' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | }else textRenderData.setText(""); |
| | | break; |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 3) { |
| | | //第åå |
| | | int aa= 0; |
| | | for (int m = 0; m < cycle; m++) { |
| | | aa += list.get(m); |
| | | if (i-3<aa){ |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "导线温度") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .eq(InsProduct::getInspectionItemClass,"ç´æµçµé»") |
| | | .isNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, (m+1)+"")); |
| | | if (ObjectUtils.isNotEmpty(insPro)) { |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 3 - (aa - list.get(m))); |
| | | String vValue = jsonObject.getString("w"); |
| | | System.out.println("导线温度第 " + (i - 2 - (aa - list.get(m))) + " 个 'w' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | }else textRenderData.setText(""); |
| | | break; |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 4) { |
| | | //第äºå |
| | | int aa= 0; |
| | | for (int m = 0; m < cycle; m++) { |
| | | aa += list.get(m); |
| | | if (i-3<aa){ |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "èå¼ æ¸©åº¦") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .eq(InsProduct::getInspectionItemClass,"ç´æµçµé»") |
| | | .isNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, (m+1)+"")); |
| | | if (ObjectUtils.isNotEmpty(insPro)) { |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 3 - (aa - list.get(m))); |
| | | String vValue = jsonObject.getString("v"); |
| | | b=vValue; |
| | | System.out.println("èå¼ æ¸©åº¦ç¬¬ " + (i - 2 - (aa - list.get(m))) + " 个 'v' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | }else textRenderData.setText(""); |
| | | break; |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 5) { |
| | | //第å
å |
| | | int aa= 0; |
| | | for (int m = 0; m < cycle; m++) { |
| | | aa += list.get(m); |
| | | if (i-3<aa){ |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "èå¼ æ¸©åº¦") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .eq(InsProduct::getInspectionItemClass,"ç´æµçµé»") |
| | | .isNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, (m+1)+"")); |
| | | if (ObjectUtils.isNotEmpty(insPro)) { |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 3 - (aa - list.get(m))); |
| | | String vValue = jsonObject.getString("w"); |
| | | System.out.println("èå¼ æ¸©åº¦ç¬¬ " + (i - 2 - (aa - list.get(m))) + " 个 'w' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | }else textRenderData.setText(""); |
| | | break; |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 6) { |
| | | //第ä¸å |
| | | int aa= 0; |
| | | for (int m = 0; m < cycle; m++) { |
| | | aa += list.get(m); |
| | | if (i-3<aa){ |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "æ¥ç»æ¸©åº¦") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .eq(InsProduct::getInspectionItemClass,"ç´æµçµé»") |
| | | .isNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, (m+1)+"")); |
| | | if (ObjectUtils.isNotEmpty(insPro)) { |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 3 - (aa - list.get(m))); |
| | | String vValue = jsonObject.getString("v"); |
| | | d=vValue; |
| | | System.out.println("æ¥ç»æ¸©åº¦ç¬¬ " + (i - 2 - (aa - list.get(m))) + " 个 'v' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | }else textRenderData.setText(""); |
| | | break; |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else if (j == 7) { |
| | | //第å
«å |
| | | int aa= 0; |
| | | for (int m = 0; m < cycle; m++) { |
| | | aa += list.get(m); |
| | | if (i-3<aa){ |
| | | InsProduct insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "æ¥ç»æ¸©åº¦") |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .eq(InsProduct::getInspectionItemClass,"ç´æµçµé»") |
| | | .isNull(InsProduct::getInsFiberId) |
| | | .eq(InsProduct::getInspectionItem, (m+1)+"")); |
| | | if (ObjectUtils.isNotEmpty(insPro)) { |
| | | String insValue = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())).get(0).getInsValue(); |
| | | JSONArray jsonArray = JSONArray.parseArray(insValue); |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i - 3 - (aa - list.get(m))); |
| | | String vValue = jsonObject.getString("w"); |
| | | System.out.println("æ¥ç»æ¸©åº¦ç¬¬ " + (i - 2 - (aa - list.get(m))) + " 个 'w' åæ®µç弿¯: " + vValue); |
| | | textRenderData.setText(vValue); |
| | | }else textRenderData.setText(""); |
| | | break; |
| | | } |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | else { |
| | | //å¤æåæ ¼ä¸ä¸åæ ¼ |
| | | BigDecimal decimal1 = new BigDecimal(a); |
| | | BigDecimal decimal2 = new BigDecimal(b == null ? "0" : b); |
| | | BigDecimal decimal3 = new BigDecimal(d == null ? "0" : d); |
| | | if (decimal1.compareTo(decimal2) > 0 && decimal1.compareTo(decimal3) > 0) { |
| | | textRenderData.setText("â"); |
| | | } else { |
| | | textRenderData.setText("Ã"); |
| | | } |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | | cellRenderData.setParagraphs(paragraphRenderDataList); |
| | | cells.add(cellRenderData); |
| | | } |
| | | } |
| | | } |
| | | rowRenderData.setCells(cells); |
| | | if (rowRenderData.getCells().size() != 0) { |
| | | rows.add(rowRenderData); |
| | | } |
| | | } |
| | | TableRenderData tableRenderData = new TableRenderData(); |
| | | tableRenderData.setRows(rows); |
| | | int countSize = tableRenderData.getRows().get(0).getCells().size(); |
| | | for (RowRenderData row : tableRenderData.getRows()) { |
| | | /*for (CellRenderData cell : row.getCells()) { |
| | | System.out.print(cell.getParagraphs().get(0).getContents()); |
| | | } |
| | | System.out.println("");*/ |
| | | if (row.getCells().size() != countSize) { |
| | | throw new ErrorException("æ¯è¡åå
æ ¼ä¸ç¸ç5"); |
| | | } |
| | | } |
| | | TableStyle tableStyle = new TableStyle(); |
| | | tableStyle.setWidth(XWPFTable.DEFAULT_PERCENTAGE_WIDTH); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |
| | | borderStyle.setColor("000000"); |
| | | borderStyle.setType(XWPFTable.XWPFBorderType.THICK); |
| | | borderStyle.setSize(14); |
| | | tableStyle.setLeftBorder(borderStyle); |
| | | tableStyle.setTopBorder(borderStyle); |
| | | tableStyle.setRightBorder(borderStyle); |
| | | tableStyle.setBottomBorder(borderStyle); |
| | | tableRenderData.setTableStyle(tableStyle); |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table3", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("index3", index3); |
| | | tables3.add(table); |
| | | index3++; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.dto.DeviceConfigDtoPage; |
| | | import com.ruoyi.require.pojo.DataConfig; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-13 12:23:00 |
| | | */ |
| | | public interface DataConfigMapper extends BaseMapper<DataConfig> { |
| | | |
| | | List<DeviceConfigDtoPage> selectDataConfigList(Integer deviceId); |
| | | |
| | | List<Integer> deleteDataConfig(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.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.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.DeviceFault; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceFaultMapper extends BaseMapper<DeviceFault> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.DeviceFaultOneDto; |
| | | import com.ruoyi.require.pojo.DeviceFaultOne; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ
é表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 02:03:29 |
| | | */ |
| | | public interface DeviceFaultOneMapper extends BaseMapper<DeviceFaultOne> { |
| | | |
| | | IPage<DeviceFaultOneDto> deviceFaultOnePage(@Param("deviceId") Integer deviceId, Page page, @Param("processNumber") String processNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.DeviceLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceLogMapper extends BaseMapper<DeviceLog> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.dto.DeviceMaintenanceExport; |
| | | import com.ruoyi.require.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.ruoyi.require.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.ruoyi.require.dto.DeviceDto; |
| | | import com.ruoyi.require.pojo.Device; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 设å¤(Device)è¡¨æ°æ®åºè®¿é®å± |
| | | */ |
| | | public interface DeviceMapper extends BaseMapper<Device> { |
| | | |
| | | IPage<Device> selectDeviceParameter(Page page, QueryWrapper<Device> ew); |
| | | List<Device> selectEquipmentOverview(Page page, QueryWrapper<Device> ew); |
| | | |
| | | //è·å被ææäºº |
| | | List<Device> authorizedPerson(); |
| | | |
| | | //æ¥è¯¢ |
| | | List<Device> search(@Param(value = "status") Integer status, @Param(value = "deviceName") String deviceName, |
| | | @Param(value = "specificationModel") String specificationModel, @Param(value = "largeCategory") String largeCategory); |
| | | |
| | | //è·åå¾çæ°æ® |
| | | void selectDeviceImage(@Param(value = "name") String name ,@Param(value = "id") Integer id); |
| | | |
| | | //æ¥è¯¢è®¾å¤è´è´£äºº |
| | | List<Device> selectDevicePrincipal(); |
| | | |
| | | IPage<DeviceDto> selectDeviceParameterPage(Page page, @Param("ew") QueryWrapper<DeviceDto> queryWrappers, @Param("laboratoryNameIsNull") Boolean laboratoryNameIsNull); |
| | | |
| | | List<Map<String, Object>> getInspectionItemSubclass(@Param("id") Integer id); |
| | | |
| | | List<Map<String, Object>> treeDevice(@Param("deviceName") String deviceName); |
| | | |
| | | DeviceDto selectDeviceByCode(Integer id); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.DeviceMetric; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DeviceMetricMapper extends BaseMapper<DeviceMetric> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.DeviceMetricRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | public interface DeviceMetricRecordMapper extends BaseMapper<DeviceMetricRecord> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.DeviceMetricsCopy; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | public interface DeviceMetricsCopyMapper extends BaseMapper<DeviceMetricsCopy> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.DeviceRecordDto; |
| | | import com.ruoyi.require.excel.DeviceRecordExport; |
| | | import com.ruoyi.require.pojo.DeviceRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | 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(@Param("deviceId") Integer deviceId, Page page,@Param("deviceNumber") String deviceNumber); |
| | | |
| | | List<DeviceRecordExport> incidentReportExport(Integer deviceId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.DeviceStateDto; |
| | | import com.ruoyi.require.pojo.DeviceState; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | public interface DeviceStateMapper extends BaseMapper<DeviceState> { |
| | | |
| | | IPage<DeviceStateDto> getDeviceStatePage(@Param("deviceId") Integer deviceId, Page page,@Param("processNumber") String processNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.Document; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DocumentDao extends BaseMapper<Document> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.FeCalibrationSchedule; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 仪å¨è®¾å¤æ£å®/æ ¡å计å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 02:53:05 |
| | | */ |
| | | public interface FeCalibrationScheduleMapper extends BaseMapper<FeCalibrationSchedule> { |
| | | |
| | | IPage<FeCalibrationSchedule> ipage(Page page, @Param("instrumentName") String instrumentName, @Param("managementNumber") String managementNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.FeIlluminationDetectionArea; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:28 |
| | | */ |
| | | public interface FeIlluminationDetectionAreaMapper extends BaseMapper<FeIlluminationDetectionArea> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.FeIlluminationDto; |
| | | import com.ruoyi.require.dto.FeIlluminationExportDto; |
| | | import com.ruoyi.require.pojo.FeIllumination; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:15:57 |
| | | */ |
| | | public interface FeIlluminationMapper extends BaseMapper<FeIllumination> { |
| | | |
| | | IPage<FeIlluminationDto> getFeLightningProtection(Page page); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç
§æè®°å½ |
| | | * @param intensityIlluminationId |
| | | * @return |
| | | */ |
| | | FeIlluminationExportDto selectFeIllumination(Integer intensityIlluminationId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.excel.FeLightningProtectionExcel; |
| | | import com.ruoyi.require.pojo.FeLightningProtection; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:36 |
| | | */ |
| | | public interface FeLightningProtectionMapper extends BaseMapper<FeLightningProtection> { |
| | | |
| | | List<FeLightningProtectionExcel> exportOfLightningProtectionDetection(); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.FeMeasuredQuantity; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§-æµå®é Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:44 |
| | | */ |
| | | public interface FeMeasuredQuantityMapper extends BaseMapper<FeMeasuredQuantity> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.FePowerStableDto; |
| | | import com.ruoyi.require.dto.FePowerStableExportDto; |
| | | import com.ruoyi.require.pojo.FePowerStable; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:52 |
| | | */ |
| | | public interface FePowerStableMapper extends BaseMapper<FePowerStable> { |
| | | |
| | | IPage<FePowerStableDto> getLaboratoryFacilityPowerStablePage(Page page); |
| | | |
| | | Map<String, Objects> getCalibrationDate(Integer deviceId); |
| | | |
| | | /** |
| | | * æ¥è¯¢çµæºç¨³å®æ§ |
| | | * @param powerStableId |
| | | * @return |
| | | */ |
| | | FePowerStableExportDto selectPowerStable(@Param("powerStableId") Integer powerStableId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptanceInspection; |
| | | |
| | | /** |
| | | * <p> |
| | | * éªæ¶å¼ç®±è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:30:09 |
| | | */ |
| | | public interface FeStandardSubstanceAcceptanceInspectionMapper extends BaseMapper<FeStandardSubstanceAcceptanceInspection> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.FeStandardSubstanceAcceptance; |
| | | import com.ruoyi.require.vo.AcceptanceVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨éªæ¶ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:29:41 |
| | | */ |
| | | public interface FeStandardSubstanceAcceptanceMapper extends BaseMapper<FeStandardSubstanceAcceptance> { |
| | | |
| | | |
| | | IPage<AcceptanceVo> getPageAcceptance(Page page, @Param("name")String name); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.FeStandardSubstance; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨æ¸
å Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:58:59 |
| | | */ |
| | | public interface FeStandardSubstanceMapper extends BaseMapper<FeStandardSubstance> { |
| | | |
| | | IPage<FeStandardSubstance> getPage(Page page,@Param("ew")FeStandardSubstance feStandardSubstance); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.FeStandardSubstanceRecord; |
| | | import com.ruoyi.require.vo.SubstanceRecordVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨æ¸
ååç¨å½è¿è®°å½è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 01:49:11 |
| | | */ |
| | | public interface FeStandardSubstanceRecordMapper extends BaseMapper<FeStandardSubstanceRecord> { |
| | | |
| | | |
| | | IPage<SubstanceRecordVo> getPage(Page page,@Param("ew") SubstanceRecordVo vo); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.FeTempHumDateDto; |
| | | import com.ruoyi.require.pojo.FeTempHumDate; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-温湿度 åºå -ç¶ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 11:02:18 |
| | | */ |
| | | public interface FeTempHumDateMapper extends BaseMapper<FeTempHumDate> { |
| | | |
| | | IPage<FeTempHumDateDto> getFeTempHumDate(Page page); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.FeTempHumRecordDto; |
| | | import com.ruoyi.require.pojo.FeTempHumRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:28:52 |
| | | */ |
| | | public interface FeTempHumRecordMapper extends BaseMapper<FeTempHumRecord> { |
| | | |
| | | IPage<FeTempHumRecordDto> getFeTempHumRecordPage(Page page, Integer dateId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.ForeignRegisterDto; |
| | | import com.ruoyi.require.pojo.ForeignRegister; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥äººåç»è®° Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 07:17:35 |
| | | */ |
| | | public interface ForeignRegisterMapper extends BaseMapper<ForeignRegister> { |
| | | |
| | | /** |
| | | * 夿¥äººåç»è®°å页æ¥è¯¢ |
| | | * @return |
| | | */ |
| | | IPage<ForeignRegisterDto> pageForeignRegister(Page page, @Param("ew") QueryWrapper<ForeignRegisterDto> ew, |
| | | @Param("beginDate") String beginDate, |
| | | @Param("endDate") String endDate); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¤æ¥äººåç»è®°å表 |
| | | * @param |
| | | * @return |
| | | */ |
| | | List<ForeignRegisterDto> getForeignRegisterList(@Param("ew") QueryWrapper<ForeignRegisterDto> ew, |
| | | @Param("beginDate") String beginDate, |
| | | @Param("endDate") String endDate); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.require.pojo.IncidentAcceptanceCheck; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-éªæ¶æ ¸æ¥ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:19 |
| | | */ |
| | | public interface IncidentAcceptanceCheckMapper extends MyBaseMapper<IncidentAcceptanceCheck> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.require.pojo.IncidentFile; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-æä»¶ç±»ç¡®è®¤ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:36 |
| | | */ |
| | | public interface IncidentFileMapper extends MyBaseMapper<IncidentFile> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.require.pojo.IncidentInstall; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-å®è£
éªæ¶æ£æ¥ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:41:50 |
| | | */ |
| | | public interface IncidentInstallMapper extends MyBaseMapper<IncidentInstall> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.IncidentReportAddDto; |
| | | import com.ruoyi.require.excel.IncidentReportExport; |
| | | import com.ruoyi.require.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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | |
| | | import com.ruoyi.framework.mybatis_config.MyBaseMapper; |
| | | import com.ruoyi.require.pojo.IncidentSpareParts; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤éªæ¶-å¤ä»¶ç¡®è®¤ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-19 04:42:06 |
| | | */ |
| | | public interface IncidentSparePartsMapper extends MyBaseMapper<IncidentSpareParts> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.InformationNotificationDto; |
| | | import com.ruoyi.require.pojo.InformationNotification; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¯éç¥ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-04-23 02:14:30 |
| | | */ |
| | | public interface InformationNotificationMapper extends BaseMapper<InformationNotification> { |
| | | |
| | | IPage<InformationNotificationDto> getPage(Page page, String messageType, Integer userId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.Instruction; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | public interface InstructionMapper extends BaseMapper<Instruction> { |
| | | |
| | | IPage<Instruction> pageByPageQueryOfHomeworkInstructions(Page page); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.InternalWastesDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®°è¯¦æ
Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:54 |
| | | */ |
| | | public interface InternalWastesDetailMapper extends BaseMapper<InternalWastesDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.InternalWastesDto; |
| | | import com.ruoyi.require.pojo.InternalWastes; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®° Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:27 |
| | | */ |
| | | @Mapper |
| | | public interface InternalWastesMapper extends BaseMapper<InternalWastes> { |
| | | |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºç»è®°å页æ¥è¯¢ |
| | | * @param page |
| | | * @param ew |
| | | * @return |
| | | */ |
| | | IPage<InternalWastesDto> pageInternalWastes(Page page, @Param("ew") QueryWrapper<InternalWastes> ew); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.OperationInstruction; |
| | | import com.ruoyi.require.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.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.PkMaster; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-29 01:16:26 |
| | | */ |
| | | public interface PkMasterMapper extends BaseMapper<PkMaster> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.PkSlave; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-29 01:16:39 |
| | | */ |
| | | public interface PkSlaveMapper extends BaseMapper<PkSlave> { |
| | | |
| | | List<PkSlave> selectList1(@Param("isid") String isid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesConsumables; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ProcurementSuppliesConsumablesMapper extends BaseMapper<ProcurementSuppliesConsumables> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesContents; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ProcurementSuppliesContentsMapper extends BaseMapper<ProcurementSuppliesContents> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.require.dto.ProcurementSuppliesExpendDto; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesExpends; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 03:47:19 |
| | | */ |
| | | public interface ProcurementSuppliesExpendsMapper extends BaseMapper<ProcurementSuppliesExpends> { |
| | | |
| | | IPage<ProcurementSuppliesExpendDto> pageList(Page page, @Param("ew") LambdaQueryWrapper<ProcurementSuppliesExpendDto> eq); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.ProcurementSuppliesListDto; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesList; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | public interface ProcurementSuppliesListMapper extends BaseMapper<ProcurementSuppliesList> { |
| | | IPage<ProcurementSuppliesList> selectProcurementSuppliesList(Page page,@Param("contentsId") Long contentsId, @Param("ew") QueryWrapper<ProcurementSuppliesListDto> ew); |
| | | |
| | | ProcurementSuppliesList selectProcurementSuppliesListForUpdate(@Param("id") Long id); |
| | | |
| | | List<ProcurementSuppliesList> selectProcurementSuppliesListAll(@Param("ew") ProcurementSuppliesListDto ew); |
| | | |
| | | List<ProcurementSuppliesList> selectProcurementSuppliesListByContentsId(@Param("id") Integer contentsId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.StoreDto; |
| | | import com.ruoyi.require.excel.StoreExcel; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesStore; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface ProcurementSuppliesStoreMapper extends BaseMapper<ProcurementSuppliesStore> { |
| | | |
| | | IPage<StoreDto> selectStoreList(Page page, @Param("ew") QueryWrapper<StoreDto> ew); |
| | | |
| | | /** |
| | | * åæ å
³èçæ¡ä»¶ï¼ï¼ï¼ç®å没æå
³èå
³ç³» WHERE s.contents_id = #{contentsId} |
| | | * @param contentsId |
| | | * @return |
| | | */ |
| | | List<StoreExcel> exportExcel(Integer contentsId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.dto.ReservationDto; |
| | | import com.ruoyi.require.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.ruoyi.require.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.ruoyi.require.pojo.SupplierManagement; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:46:45 |
| | | */ |
| | | @Mapper |
| | | public interface SupplierManagementMapper extends BaseMapper<SupplierManagement> { |
| | | |
| | | IPage<SupplierManagement> pageSupplierManagement(Page page, @Param("ew") QueryWrapper<SupplierManagement> supplierManagementQueryWrapper); |
| | | |
| | | IPage<SupplierManagement> selectQualifiedSupplierManagement(Page page, @Param("ew") QueryWrapper<SupplierManagement> supplierManagementQueryWrapper); |
| | | |
| | | List<SupplierManagement> selectSupplierManagementAll(@Param("parentId") Integer parentId); |
| | | |
| | | List<SupplierManagement> selectSupplierManagement(@Param("parentId")Integer parentId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.require.pojo.SuppliersDirectoryContents; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | public interface SuppliersDirectoryContentsMapper extends BaseMapper<SuppliersDirectoryContents> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-13 12:23:00 |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @TableName("device_data_config") |
| | | @ApiModel(value = "DataConfig对象", description = "") |
| | | public class DataConfig implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å
¬å¼") |
| | | private String formula; |
| | | |
| | | @ApiModelProperty("åç
§X") |
| | | private String referx; |
| | | |
| | | @ApiModelProperty("åç
§Y") |
| | | private String refery; |
| | | |
| | | @ApiModelProperty("x") |
| | | private String x; |
| | | |
| | | @ApiModelProperty("y") |
| | | private String y; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹ç®") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹å项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("æ£éªé¡¹å项") |
| | | private String insProductItem; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹id") |
| | | private Integer structureItemParameterId; |
| | | |
| | | @ApiModelProperty("åºå·") |
| | | private String serialNumber; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 设å¤(Device)表对象 |
| | | */ |
| | | @TableName(value = "device") |
| | | @Data |
| | | public class Device implements Serializable { |
| | | @ApiModelProperty(value = "主é®") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "en设å¤åç§°") |
| | | private String enDeviceName; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | @ApiModelProperty(value = "ç产åå®¶") |
| | | private String manufacturer; |
| | | |
| | | @ApiModelProperty(value = "åºåç¼å·") |
| | | private String factoryNo; |
| | | |
| | | @ApiModelProperty(value = "管çç¼å·") |
| | | private String managementNumber; |
| | | |
| | | @ApiModelProperty(value = "ææ¯ææ ") |
| | | private String technicalIndicators; |
| | | |
| | | @ApiModelProperty(value = "è´ç½®æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime acquisitionDate; |
| | | |
| | | @ApiModelProperty(value = "å¯ç¨æ¥æ") |
| | | private LocalDateTime activationDate; |
| | | |
| | | @ApiModelProperty(value = "管ç人Id") |
| | | private Integer equipmentManager; |
| | | |
| | | @ApiModelProperty(value = "åæ¾ç¹") |
| | | private String storagePoint; |
| | | |
| | | @ApiModelProperty(value = "æå±é¨é¨Id") |
| | | private Integer subordinateDepartmentsId; |
| | | |
| | | @ApiModelProperty(value = "æ£éªé¡¹ç®Id") |
| | | private String insProductIds; |
| | | |
| | | @ApiModelProperty(value = "æ ¡åæå¡æºæ") |
| | | private String calibrationServices; |
| | | |
| | | @ApiModelProperty(value = "æè¿æ ¡åæ¥æ") |
| | | private LocalDateTime lastCalibrationDate; |
| | | |
| | | @ApiModelProperty(value = "䏿¬¡æ ¡åæ¥æ") |
| | | private LocalDateTime nextCalibrationDate; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç±»å") |
| | | private String largeCategory; |
| | | |
| | | @ApiModelProperty(value = "åä»·") |
| | | private BigDecimal unitPrice; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç¶æ") |
| | | private Integer deviceStatus; |
| | | |
| | | @ApiModelProperty(value = "æ ¡å卿(æ)") |
| | | private String calibrationDate; |
| | | |
| | | @ApiModelProperty(value = "å¾çä¸ä¼ ") |
| | | private String imageUpload; |
| | | |
| | | @ApiModelProperty(value = "å¾ç夿³¨") |
| | | private String imageName; |
| | | |
| | | @ApiModelProperty(value = "å建人id") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ°é-æä»¶åç¼") |
| | | private String fileType; |
| | | |
| | | @ApiModelProperty("æ°é-ééå°å") |
| | | private String collectUrl; |
| | | |
| | | @ApiModelProperty("æ°é-åå¨å°å") |
| | | private String storageUrl; |
| | | |
| | | @ApiModelProperty("æ°é-设å¤IP") |
| | | private String ip; |
| | | |
| | | @ApiModelProperty("æ°é-æ¯å¦ä¸ºæ°é设å¤") |
| | | @TableField(exist = false) |
| | | private Boolean isItADataAcquisitionDevice; |
| | | |
| | | @ApiModelProperty("æ°é-å§æåæ®µ") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ°é-æ ·ååæ®µ") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("æ°é-dbï¼mdbæä»¶åç§°") |
| | | private String dbFileName; |
| | | |
| | | @ApiModelProperty("æ°é-dbæä»¶ å
纤带ç¼å·") |
| | | private String fiberOpticRibbon; |
| | | |
| | | @ApiModelProperty("被ææäºº") |
| | | private String authorizedPerson; |
| | | |
| | | @ApiModelProperty("èµäº§ç¼ç ") |
| | | private String assetCode; |
| | | |
| | | @ApiModelProperty("产å°") |
| | | private String origin; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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 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 implements Serializable { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ExcelIgnore |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æµç¨ç¼å·") |
| | | @ExcelProperty(value = "æµç¨ç¼å·") |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | @ExcelIgnore |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("管çç¼å·") |
| | | @ExcelProperty(value = "管çç¼å·") |
| | | private String unifyNumber; |
| | | |
| | | @ApiModelProperty("åç¨äºº") |
| | | @ExcelProperty(value = "åç¨äºº") |
| | | private String recipientUser; |
| | | |
| | | @ExcelProperty(value = "åç¨äººèç³»æ¹å¼") |
| | | @ApiModelProperty("åç¨äººèç³»æ¹å¼") |
| | | private String borrowerContactInformation; |
| | | |
| | | @ApiModelProperty("åç¨æ¶ç¶æ") |
| | | @ExcelProperty(value = "åç¨æ¶ç¶æ") |
| | | //0åæ ¼;1ç»´ä¿®;2åç¨;3æ¥åº |
| | | private Integer recipientState; |
| | | |
| | | @ApiModelProperty("åç¨æ¥æ") |
| | | @ExcelProperty(value = "æäº¤æ¥æ") |
| | | private Date recipientTime; |
| | | |
| | | @ApiModelProperty("ååºäºº") |
| | | @ExcelProperty(value = "ååºäºº") |
| | | private String submitUser; |
| | | |
| | | @ApiModelProperty("ååºæ¥æ") |
| | | @ExcelProperty(value = "ååºæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å½åç¶æ") |
| | | @ExcelProperty(value = "å½åç¶æ") |
| | | private String nowState; |
| | | |
| | | @ApiModelProperty("å½å责任人") |
| | | @ExcelProperty(value = "å½å责任人") |
| | | private String nowUser; |
| | | |
| | | @ExcelIgnore |
| | | @ApiModelProperty("éä»¶") |
| | | //è·¯å¾ |
| | | private String url; |
| | | |
| | | @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; |
| | | |
| | | @ApiModelProperty("设å¤åç§°") |
| | | @TableField(select = false, exist = false) |
| | | @ExcelProperty(value = "设å¤åç§°") |
| | | private String deviceName; |
| | | |
| | | |
| | | @ApiModelProperty("æµç¨è·è¸ª") |
| | | @TableField(select = false, exist = false) |
| | | @ExcelIgnore |
| | | private List<DeviceLog> deviceLogs; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.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.ruoyi.require.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.ruoyi.require.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.ruoyi.require.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.ruoyi.require.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | 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 org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | 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 = "è®¾å¤æ ¡å - æ ¡åè®°å½") |
| | | @ExcelIgnoreUnannotated |
| | | public class DeviceMetricRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è®°å½ç¼å·") |
| | | @ExcelProperty(value = "è®°å½ç¼å·",index = 0) |
| | | private String processNumber; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | @ExcelProperty(value = "æºæ",index = 1) |
| | | private String unitOfMeasure; |
| | | |
| | | @ApiModelProperty("æ ¡åæ¥æ") |
| | | @ExcelProperty(value = "æ ¡å/æ ¸æ¥æ¥æ",index = 5) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ColumnWidth(20) |
| | | private Date calibrationDate; |
| | | |
| | | @ApiModelProperty("䏿¬¡æ ¡åæ¥æ") |
| | | @ExcelProperty(value = "䏿¬¡æ ¡å/æ ¸æ¥æ¥æ",index = 6) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ColumnWidth(20) |
| | | private Date nextCalibrationDate; |
| | | |
| | | @ApiModelProperty("计ç®å¨å
·") |
| | | private String calculatingApparatus; |
| | | |
| | | @ApiModelProperty("è®¡ç®æ åéç¨") |
| | | private String standardRange; |
| | | |
| | | @ApiModelProperty("è®¡éæ åä¸ç¡®å®åº¦") |
| | | private String calibrationStandardUncertainty; |
| | | |
| | | @ApiModelProperty("便®æä»¶") |
| | | private String byDocument; |
| | | |
| | | @ApiModelProperty("è¯ä¹¦ç¼å·") |
| | | @ExcelProperty(value = "æ ¡å/æ ¸æ¥è¯ä¹¦ç¼å·",index = 3) |
| | | private String certificateSerialNumber; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | @ExcelProperty(value = "æ ¡å/æ ¸æ¥ç»è®º",index = 2) |
| | | private String status; |
| | | |
| | | @ApiModelProperty("åæä»¶åç§°") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææä»¶åç§°") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty(value = "说æ",index = 4) |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("å建æ¶é´ / ç»è®°æ¥æ") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ExcelProperty(value = "ç»è®°æ¥æ",index = 9) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ColumnWidth(20) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("ç»è®°äºº") |
| | | @ExcelProperty(value = "ç»è®°äºº",index = 8) |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("确认æ¶é´") |
| | | @ExcelProperty(value = "ç¡®è®¤æ¥æ",index = 7) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ColumnWidth(20) |
| | | private Date confirmDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | 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.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | 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 = "è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç®") |
| | | @ExcelIgnoreUnannotated |
| | | 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("å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime creationTime; |
| | | |
| | | @ApiModelProperty("æ¯å¦æ ¡å") |
| | | private String isCalibration; |
| | | |
| | | @ApiModelProperty("å¤å®ç»æ") |
| | | private String result; |
| | | |
| | | @ApiModelProperty("åé¡¹ç»æè¯´æ") |
| | | private String singleResultStatement; |
| | | |
| | | @ApiModelProperty("calibrateï¼æ ¡åï¼examineï¼æ ¸æ¥") |
| | | private String type; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.LocalDate; |
| | | |
| | | /** |
| | | * <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("设å¤ç¼å·") |
| | | private String deviceNumber; |
| | | |
| | | @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("使ç¨äºº") |
| | | private String usePerson; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("使ç¨å¼å§æ¥æ") |
| | | private LocalDate useStartDate; |
| | | |
| | | @ApiModelProperty("使ç¨ç»ææ¥æ") |
| | | private LocalDate useEndDate; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.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.ruoyi.require.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-11-13 02:53:05 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_calibration_schedule") |
| | | @ApiModel(value = "FeCalibrationSchedule对象", description = "仪å¨è®¾å¤æ£å®/æ ¡å计å表") |
| | | public class FeCalibrationSchedule implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("仪å¨åç§°") |
| | | private String instrumentName; |
| | | |
| | | @ApiModelProperty("è§æ ¼åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("管çç¼å·") |
| | | private Integer managementNumber; |
| | | |
| | | @ApiModelProperty("ææ¯ææ ") |
| | | private String technicalIndicators; |
| | | |
| | | @ApiModelProperty("æ£å®å¨æ") |
| | | private String verificationCyde; |
| | | |
| | | @ApiModelProperty("æ£å®åä½") |
| | | private String verificationUnit; |
| | | |
| | | @ApiModelProperty("æè¿æ£å®æ¶é´") |
| | | private LocalDateTime recentlyTime; |
| | | |
| | | @ApiModelProperty("计å䏿¬¡æ£å®æ¶é´") |
| | | private LocalDateTime nextTime; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("ç¼å¶") |
| | | private String organization; |
| | | |
| | | @ApiModelProperty("ç¼å¶æ¥æ") |
| | | private LocalDateTime organizationDate; |
| | | |
| | | @ApiModelProperty("æ¹å") |
| | | private String approve; |
| | | |
| | | @ApiModelProperty("æ¹åæ¥æ") |
| | | private LocalDateTime approveDate; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:15:57 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_illumination") |
| | | @ApiModel(value = "FeIllumination对象", description = "设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨") |
| | | public class FeIllumination implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("ç
§åº¦è®°å½è¡¨id") |
| | | @TableId(value = "intensity_illumination_id", type = IdType.AUTO) |
| | | private Integer intensityIlluminationId; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("ç»è®º") |
| | | private String conclusion; |
| | | |
| | | @ApiModelProperty("æ£æµäºº") |
| | | private Integer testerId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äºº") |
| | | private Integer checkerId; |
| | | |
| | | @ApiModelProperty("æ£æµæ¥æ") |
| | | private Date testDate; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | 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-11-07 04:16:28 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_illumination_detection_area") |
| | | @ApiModel(value = "FeIlluminationDetectionArea对象", description = "设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå") |
| | | public class FeIlluminationDetectionArea implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("æ£æµåºåid") |
| | | @TableId(value = "detection_area_id", type = IdType.AUTO) |
| | | private Integer detectionAreaId; |
| | | |
| | | @ApiModelProperty("æ£æµåºååç§°") |
| | | private String detectionAreaLabel; |
| | | |
| | | @ApiModelProperty("æ£æµå¼-ç¬¬ä¸æ¬¡") |
| | | private Integer valueOne; |
| | | |
| | | @ApiModelProperty("æ£æµå¼-ç¬¬äºæ¬¡") |
| | | private Integer valueTwo; |
| | | |
| | | @ApiModelProperty("æ£æµå¼-ç¬¬ä¸æ¬¡") |
| | | private Integer valueThree; |
| | | |
| | | @ApiModelProperty("å¹³åå¼") |
| | | private Integer average; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("ç
§åº¦è®°å½è¡¨id") |
| | | private Integer intensityIlluminationId; |
| | | |
| | | // 导åºä½¿ç¨ |
| | | @TableField(select = false, exist = false) |
| | | @ApiModelProperty("åºå·(导åºä½¿ç¨)") |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:36 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_lightning_protection") |
| | | @ApiModel(value = "FeLightningProtection对象", description = "设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµ") |
| | | public class FeLightningProtection implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "lightning_protection_id", type = IdType.AUTO) |
| | | private Integer lightningProtectionId; |
| | | |
| | | @ApiModelProperty("åæä»¶å") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("ç³»ç»çææä»¶å") |
| | | private String systemFileName; |
| | | |
| | | @ApiModelProperty("æ£æµæ¥æ") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate detectionDate; |
| | | |
| | | @ApiModelProperty("æææ") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate termValidity; |
| | | |
| | | @ApiModelProperty("æ£æµåä½") |
| | | private String detectionUnit; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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-11-07 04:16:44 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_measured_quantity") |
| | | @ApiModel(value = "FeMeasuredQuantity对象", description = "设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§-æµå®é") |
| | | public class FeMeasuredQuantity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "measured_quantity_id", type = IdType.AUTO) |
| | | private Integer measuredQuantityId; |
| | | |
| | | @ApiModelProperty("æµå®éåç§°") |
| | | private String measuredQuantityLabel; |
| | | |
| | | @ApiModelProperty("å¼A") |
| | | private String valueA; |
| | | |
| | | @ApiModelProperty("å¼B") |
| | | private String valueB; |
| | | |
| | | @ApiModelProperty("å¼C") |
| | | private String valueC; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("çµæºç¨³å®æ§id") |
| | | private Integer powerStableId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:52 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_power_stable") |
| | | @ApiModel(value = "FePowerStable对象", description = "设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§") |
| | | public class FePowerStable implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("çµæºç¨³å®æ§id") |
| | | @TableId(value = "power_stable_id", type = IdType.AUTO) |
| | | private Integer powerStableId; |
| | | |
| | | @ApiModelProperty("æµè¯å°ç¹") |
| | | private String testLocation; |
| | | |
| | | @ApiModelProperty("æµè¯æ¥æ") |
| | | private Date testDate; |
| | | |
| | | @ApiModelProperty("设å¤id") |
| | | private Integer deviceId; |
| | | |
| | | @ApiModelProperty("ç»è®º") |
| | | private String conclusion; |
| | | |
| | | @ApiModelProperty("æ£æµè
id") |
| | | private Integer testerId; |
| | | |
| | | @ApiModelProperty("æ ¸æ¥äººid") |
| | | private Integer checkerId; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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-11-13 03:58:59 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_standard_substance") |
| | | @ApiModel(value = "FeStandardSubstance对象", description = "æ åç©è´¨æ¸
å") |
| | | public class FeStandardSubstance implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ åç©è´¨åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("è§æ ¼åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("ç产åå®¶") |
| | | private String factoryManufacturer; |
| | | |
| | | @ApiModelProperty("åºåºç¼å·") |
| | | private String factoryNum; |
| | | |
| | | @ApiModelProperty("管çç¼å·") |
| | | private String manageNum; |
| | | |
| | | @ApiModelProperty("ä¸ç¡®å®åº¦") |
| | | private String uncertainty; |
| | | |
| | | @ApiModelProperty("æ°é") |
| | | private Long quantity; |
| | | |
| | | @ApiModelProperty("è´ç½®æ¥æ") |
| | | private LocalDateTime acquisitionDate; |
| | | |
| | | @ApiModelProperty("æææ") |
| | | private LocalDateTime effectiveDate; |
| | | |
| | | @ApiModelProperty("ææ¡£ç¼å·") |
| | | private String fileNum; |
| | | |
| | | @ApiModelProperty("åæ¾ä½ç½®") |
| | | private String position; |
| | | |
| | | @ApiModelProperty("åè°ç¶æï¼0:æªåè° 1:å·²åè°ï¼") |
| | | private Integer state; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | 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 org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨éªæ¶ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:29:41 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_standard_substance_acceptance") |
| | | @ApiModel(value = "FeStandardSubstanceAcceptance对象", description = "æ åç©è´¨éªæ¶") |
| | | @ExcelIgnoreUnannotated |
| | | public class FeStandardSubstanceAcceptance implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æ¸
åid") |
| | | private Integer substanceId; |
| | | |
| | | @ApiModelProperty("å°è´§æ¥æ") |
| | | @ExcelProperty("å°è´§æ¥æ") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate arriveDate; |
| | | |
| | | @ApiModelProperty("ç»´ä¿®åä½") |
| | | @ExcelProperty("ç»´ä¿®åä½") |
| | | private String maintenanceUnit; |
| | | |
| | | @ApiModelProperty("åæ°") |
| | | @ExcelProperty("åæ°") |
| | | private String perameters; |
| | | |
| | | @ApiModelProperty("å®è£
è°è¯æ
åµ") |
| | | @ExcelProperty("å®è£
è°è¯æ
åµ") |
| | | private String installation; |
| | | |
| | | @ApiModelProperty("éªæ¶æ
åµ") |
| | | @ExcelProperty("éªæ¶æ
åµ") |
| | | private String situation; |
| | | |
| | | @ApiModelProperty("æ¥åç¾å") |
| | | @ExcelProperty("æ¥åç¾å") |
| | | private String signature; |
| | | |
| | | @ApiModelProperty("å家代表") |
| | | @ExcelProperty("å家代表") |
| | | private String producer; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äºº") |
| | | @ExcelProperty("æ¥æ¶äºº") |
| | | private String recipient; |
| | | |
| | | @ApiModelProperty("éä»¶") |
| | | @ExcelProperty("éä»¶") |
| | | private String file; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * éªæ¶å¼ç®±è®°å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:30:09 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_standard_substance_acceptance_inspection") |
| | | @ApiModel(value = "FeStandardSubstanceAcceptanceInspection对象", description = "éªæ¶å¼ç®±è®°å½") |
| | | public class FeStandardSubstanceAcceptanceInspection implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private Integer acceptanceId; |
| | | |
| | | private String name; |
| | | |
| | | private Integer number; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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-11-14 01:49:11 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_standard_substance_record") |
| | | @ApiModel(value = "FeStandardSubstanceRecord对象", description = "æ åç©è´¨æ¸
ååç¨å½è¿è®°å½è¡¨") |
| | | public class FeStandardSubstanceRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç©è´¨id") |
| | | private Integer substanceId; |
| | | |
| | | @ApiModelProperty("åç¨-å®å¥½æ§") |
| | | private String integrity; |
| | | |
| | | @ApiModelProperty("åç¨-åç¨äºº") |
| | | private String borrowUser; |
| | | |
| | | @ApiModelProperty("åç¨-èç³»æ¹å¼") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("åç¨-ååºæ¥æ") |
| | | private LocalDateTime borrowDate; |
| | | |
| | | @ApiModelProperty("å½è¿æ¥æ") |
| | | private LocalDateTime borrowReturnDate; |
| | | |
| | | @ApiModelProperty("ååºäºº") |
| | | private String lender; |
| | | |
| | | @ApiModelProperty("å½è¿-æ£æ¥äºº") |
| | | private String rummager; |
| | | |
| | | @ApiModelProperty("0ï¼åç¨ 1:å½è¿") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("å½è¿äºº") |
| | | private String returnedPerson; |
| | | |
| | | @ApiModelProperty("å½è¿-æ¥æ") |
| | | private LocalDateTime returnDate; |
| | | |
| | | @ApiModelProperty("å½è¿-å®å¥½æ§") |
| | | private String returnIntegrity; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private String createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private String updateUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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-11-09 11:02:18 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_temp_hum_date") |
| | | @ApiModel(value = "FeTempHumDate对象", description = "设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-温湿度 åºå -ç¶") |
| | | public class FeTempHumDate implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®ID") |
| | | @TableId(value = "date_id", type = IdType.AUTO) |
| | | private Integer dateId; |
| | | |
| | | @ApiModelProperty("æåº¦æ¶é´") |
| | | private LocalDate monthDate; |
| | | |
| | | @ApiModelProperty("è¯éªåºååç§°") |
| | | private String testAreaName; |
| | | |
| | | @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.ruoyi.require.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-11-07 04:28:52 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_fe_temp_hum_record") |
| | | @ApiModel(value = "FeTempHumRecord对象", description = "设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-温湿度记å½") |
| | | public class FeTempHumRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("温湿度记å½") |
| | | @TableId(value = "temp_hum_id", type = IdType.AUTO) |
| | | private Integer tempHumId; |
| | | |
| | | @ApiModelProperty("ä¸å-æ¶é´") |
| | | private LocalDateTime morningTestTime; |
| | | |
| | | @ApiModelProperty("ä¸å温度") |
| | | private String morningTemp; |
| | | |
| | | @ApiModelProperty("ä¸å湿度") |
| | | private String morningHum; |
| | | |
| | | @ApiModelProperty("ä¸åè®°å½å") |
| | | private Integer morningRecorderId; |
| | | |
| | | @ApiModelProperty("ä¸åæ¶é´") |
| | | private LocalDateTime afternoonTime; |
| | | |
| | | @ApiModelProperty("ä¸å温度") |
| | | private String afternoonTemp; |
| | | |
| | | @ApiModelProperty("ä¸å湿度") |
| | | private String afternoonHum; |
| | | |
| | | @ApiModelProperty("ä¸åè®°å½å") |
| | | private Integer afternoonRecorderId; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String note; |
| | | |
| | | @ApiModelProperty("温度循ç¯ä¸»è¡¨id") |
| | | private Integer dateId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥äººåç»è®° |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 07:17:35 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_foreign_register") |
| | | @ApiModel(value = "ForeignRegister对象", description = "夿¥äººåç»è®°") |
| | | public class ForeignRegister { |
| | | |
| | | @TableId(value = "register_id", type = IdType.AUTO) |
| | | private Integer registerId; |
| | | |
| | | @ApiModelProperty("ç»è®°å¦æ") |
| | | private LocalDate registerDate; |
| | | |
| | | @ApiModelProperty("è¿å
¥åºå") |
| | | private String area; |
| | | |
| | | @ApiModelProperty("è¿å
¥äººå") |
| | | private String personnel; |
| | | |
| | | @ApiModelProperty("è¿å
¥åå ") |
| | | private String reason; |
| | | |
| | | @ApiModelProperty("éªå人åid") |
| | | private Integer accompanyingId; |
| | | |
| | | @ApiModelProperty("éªå人å") |
| | | private String accompanyingName; |
| | | |
| | | @ApiModelProperty("æ¹å人id") |
| | | private Integer approveId; |
| | | |
| | | @ApiModelProperty("æ¹å人") |
| | | private String approveName; |
| | | |
| | | @ApiModelProperty("ä¿å¯åå
¶ä»æ
åµ") |
| | | private String confidentiality; |
| | | |
| | | @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.ruoyi.require.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.ruoyi.require.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.ruoyi.require.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.ruoyi.require.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.ruoyi.require.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.ruoyi.require.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-04-23 02:14:30 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("information_notification") |
| | | @ApiModel(value = "InformationNotification对象", description = "æ¶æ¯éç¥") |
| | | public class InformationNotification implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®ID") |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | private String createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建æ¶é´/åéæ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("å¾
åãæ¥æ¶ãå®¡æ ¸ãæ¹åãé¢è¦æéãéç¥å
Œ") |
| | | private String messageType; |
| | | |
| | | @ApiModelProperty("主é¢") |
| | | private String theme; |
| | | |
| | | @ApiModelProperty("å
容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("åé人Id") |
| | | private Integer senderId; |
| | | |
| | | @ApiModelProperty("æ¶ä»¶äºº") |
| | | private Integer consigneeId; |
| | | |
| | | @ApiModelProperty("æ¥çç¶æï¼å·²è¯»ï¼æªè¯»") |
| | | private Boolean viewStatus; |
| | | |
| | | @ApiModelProperty("æ¶æ¯ç¶æï¼æç»ãæ¥æ¶ï¼ï¼æ ¹æ®æ¶æ¯ç±»åå±ç¤ºï¼") |
| | | private Boolean messageStatus; |
| | | |
| | | @ApiModelProperty("跳转路å¾") |
| | | private String jumpPath; |
| | | |
| | | @ApiModelProperty("跳转Id") |
| | | private String jumpId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®° |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:27 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_wastes") |
| | | @ApiModel(value = "InternalWastes对象", description = "å®å
¨å
å¡ä¸åºç»è®°") |
| | | public class InternalWastes { |
| | | |
| | | @TableId(value = "wastes_id", type = IdType.AUTO) |
| | | private Integer wastesId; |
| | | |
| | | @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.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®°è¯¦æ
|
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:54 |
| | | */ |
| | | @Data |
| | | @TableName("cnas_internal_wastes_detail") |
| | | @ApiModel(value = "InternalWastesDetail对象", description = "å®å
¨å
å¡ä¸åºç»è®°è¯¦æ
") |
| | | public class InternalWastesDetail { |
| | | |
| | | @TableId(value = "wastes_detail_id", type = IdType.AUTO) |
| | | private Integer wastesDetailId; |
| | | |
| | | @ApiModelProperty("主表id") |
| | | private Integer wastesId; |
| | | |
| | | @ApiModelProperty("åç§°") |
| | | private String designation; |
| | | |
| | | @ApiModelProperty("ä½ç§¯") |
| | | private String volume; |
| | | |
| | | @ApiModelProperty("éå¤çæ¥æ") |
| | | private String deliveryDate; |
| | | |
| | | @ApiModelProperty("移交人") |
| | | private String transferPeople; |
| | | |
| | | @ApiModelProperty("æ¥æ¶äºº") |
| | | private String acceptor; |
| | | |
| | | @ApiModelProperty("æ¥æ¶åä½") |
| | | private String receivingUnit; |
| | | |
| | | @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(select = false, exist = false) |
| | | private Integer index; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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-12-04 10:43:32 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_operation_instruction") |
| | | @ApiModel(value = "OperationInstruction对象", description = "è®¾å¤ - ä½ä¸æå¯¼ä¹¦ æ·»å åæ§æä»¶ å") |
| | | public class OperationInstruction implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @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.ruoyi.require.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-07-29 01:16:26 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_pk_master") |
| | | @ApiModel(value = "PkMaster对象", description = "æ¸©åº¦å¾ªç¯æ°éå表") |
| | | public class PkMaster implements Serializable { |
| | | |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("å§æåç¼å·") |
| | | private String entrustCode; |
| | | |
| | | @ApiModelProperty("æ ·åç¼å·") |
| | | private String sampleCode; |
| | | |
| | | @ApiModelProperty("åå·") |
| | | private String model; |
| | | |
| | | @ApiModelProperty("å¾ªç¯æ¬¡æ°") |
| | | private String cycles; |
| | | |
| | | @ApiModelProperty("温度循ç¯") |
| | | private String temperature; |
| | | |
| | | @ApiModelProperty("å
çº¤æ ¹æ°") |
| | | private Integer numberOpticalFibers; |
| | | |
| | | @ApiModelProperty("device_pk_slaveå
³èåæ®µ") |
| | | private String isid; |
| | | |
| | | @ApiModelProperty("æ£éªæ¶é´") |
| | | private LocalDateTime detectionDate; |
| | | |
| | | @ApiModelProperty("æ£éªäºº") |
| | | private String detectionPeople; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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-07-29 01:16:39 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("device_pk_slave") |
| | | @ApiModel(value = "PkSlave对象", description = "æ¸©åº¦å¾ªç¯æ°éå表") |
| | | public class PkSlave implements Serializable { |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1310(dB/km)-A端") |
| | | private Double weaken1310A; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1310(dB/km)-B端") |
| | | private Double weaken1310B; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1550(dB/km)-A端") |
| | | private Double weaken1550A; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1550(dB/km)-B端") |
| | | private Double weaken1550B; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1625(dB/km)-A端") |
| | | private Double weaken1625A; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1625(dB/km)-B端") |
| | | private Double weaken1625B; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1383(dB/km)-A端") |
| | | private Double weaken1383A; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1383(dB/km)-B端") |
| | | private Double weaken1383B; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1490(dB/km)-A端") |
| | | private Double weaken1490A; |
| | | |
| | | @ApiModelProperty("è¡°åç³»ç»1490(dB/km)-B端") |
| | | private Double weaken1490B; |
| | | |
| | | @ApiModelProperty("ç®¡è²æ id") |
| | | private String insBushingId; |
| | | |
| | | @ApiModelProperty("å
纤带id") |
| | | private String insFibersId; |
| | | |
| | | @ApiModelProperty("å
纤ç¼å·id") |
| | | private String insFiberId; |
| | | |
| | | @ApiModelProperty("device_pk_masterå
³èåæ®µ") |
| | | private String shiftId; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName("procurement_supplies_consumables") |
| | | @ApiModel("èæéè´æç»è¡¨") |
| | | @JsonIgnoreProperties(ignoreUnknown = true) |
| | | public class ProcurementSuppliesConsumables { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("èæä¸»è¡¨id") |
| | | private Integer storeId; |
| | | |
| | | @ApiModelProperty("èæåç§°") |
| | | private String consumablesName; |
| | | |
| | | @ApiModelProperty("åä»·") |
| | | private Double unitPrice; |
| | | |
| | | @ApiModelProperty("å
¥åºæ°é") |
| | | private Integer storeNumber; |
| | | |
| | | @ApiModelProperty("æ»ä»·") |
| | | private Double totalPrice; |
| | | |
| | | @ApiModelProperty("è´§å·") |
| | | private String itemNumber; |
| | | |
| | | @ApiModelProperty("ç±»å«") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("è§æ ¼") |
| | | private String specifications; |
| | | |
| | | @ApiModelProperty("åèä¾åºå") |
| | | private String supplier; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @TableName("procurement_supplies_contents") |
| | | @ApiModel("æå¡åä¾åºåéè´è¡¨") |
| | | public class ProcurementSuppliesContents { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("èç¹åç§°") |
| | | private String nodeName; |
| | | |
| | | @ApiModelProperty("代å·") |
| | | private String code; |
| | | |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ç¶èç¹") |
| | | private Integer parentId; |
| | | |
| | | @TableField(exist = false) |
| | | private List<ProcurementSuppliesContents> children; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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-11-15 03:47:19 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("procurement_supplies_expends") |
| | | @ApiModel(value = "ProcurementSuppliesExpends对象", description = "") |
| | | public class ProcurementSuppliesExpends implements Serializable { |
| | | |
| | | |
| | | @ApiModelProperty("主表Id") |
| | | @TableId(value = "expend_id", type = IdType.AUTO) |
| | | private Long expendId; |
| | | |
| | | @ApiModelProperty("èæId") |
| | | private Long listId; |
| | | |
| | | @ApiModelProperty("æ¶èæ°é") |
| | | private Integer amount; |
| | | |
| | | @ApiModelProperty("æ£éªå¯¹è±¡åç§°") |
| | | private String specimenName; |
| | | |
| | | @ApiModelProperty("æ£éªé¡¹") |
| | | private String inspectionItem; |
| | | |
| | | @ApiModelProperty("æ£éªå项") |
| | | private String inspectionItemSubclass; |
| | | |
| | | @ApiModelProperty("å½å
¥äººid") |
| | | private Integer enterUserId; |
| | | |
| | | @ApiModelProperty("æ´æ°äººid") |
| | | private Integer updateUserId; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | 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.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("procurement_supplies_list") |
| | | @ApiModel(value = "ProcurementSuppliesList对象", description = "æå¡ä¸ä¾åºå èæå表") |
| | | public class ProcurementSuppliesList implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("ç®å½id") |
| | | private Long contentsId; |
| | | |
| | | @ApiModelProperty("èæç±»å") |
| | | @ExcelProperty("ç±»å«") |
| | | private String consumablesType; |
| | | |
| | | @ApiModelProperty("è´§å·") |
| | | @ExcelProperty("è´§å·") |
| | | private String itemNumber; |
| | | |
| | | @ApiModelProperty("èæåç§°") |
| | | @ExcelProperty("åç§°") |
| | | private String consumablesName; |
| | | |
| | | @ApiModelProperty("è§æ ¼") |
| | | @ExcelProperty("è§æ ¼") |
| | | private String specifications; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | @ExcelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty("åèä»·æ ¼") |
| | | private BigDecimal referencePrice; |
| | | |
| | | @ApiModelProperty("åæ¾ä½ç½®") |
| | | private Integer contentId; |
| | | |
| | | @ApiModelProperty("è´è´£äºº") |
| | | private Integer personInCharge; |
| | | |
| | | @ApiModelProperty("åºåä¸é") |
| | | private Integer upperLimit; |
| | | |
| | | @ApiModelProperty("åºåä¸é") |
| | | @ExcelProperty("åºåä¸é") |
| | | private Integer lowerLimit; |
| | | |
| | | @ApiModelProperty("ä¾åºå") |
| | | private Integer supplier; |
| | | |
| | | @ApiModelProperty("èæå¾æ ") |
| | | private String consumablesIcon; |
| | | |
| | | @ApiModelProperty("èæéä»¶") |
| | | private String attachment; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("å½ååºåæ°é") |
| | | @ExcelProperty("å½ååºå") |
| | | private Integer currentAmount; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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 com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @TableName("procurement_supplies_store") |
| | | @ApiModel("èæå
¥åºè¡¨") |
| | | @JsonIgnoreProperties(ignoreUnknown = true) |
| | | public class ProcurementSuppliesStore implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç®å½id") |
| | | private Integer contentsId; |
| | | |
| | | @ApiModelProperty("å
¥åºåå·") |
| | | private String oddNumbers; |
| | | |
| | | @ApiModelProperty("å
¥åºåºå") |
| | | private String inventory; |
| | | |
| | | @ApiModelProperty("å
¥åºæ»éé¢") |
| | | private Double totalAmount; |
| | | |
| | | @ApiModelProperty("å
¥åºäºº") |
| | | private Integer storageUser; |
| | | |
| | | @ApiModelProperty("å
¥åºæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private LocalDate storageTime; |
| | | |
| | | @ApiModelProperty("å
¥åºè¯´æ") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("ç»è®°äºº") |
| | | private Integer registrant; |
| | | |
| | | @ApiModelProperty("ç»è®°æ¶é´") |
| | | private LocalDate registrantTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.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-11-15 02:46:45 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_supplier_management") |
| | | @ApiModel(value = "SupplierManagement对象", description = "") |
| | | public class SupplierManagement implements Serializable { |
| | | |
| | | |
| | | @ApiModelProperty("主表Id") |
| | | @TableId(value = "supplier_management_id", type = IdType.AUTO) |
| | | private Integer supplierManagementId; |
| | | |
| | | @ApiModelProperty("ä¾åºå") |
| | | @ExcelProperty("ä¾åºå") |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | private String supplierRef; |
| | | |
| | | @ApiModelProperty("ä¾åºåç©åæå¡åç§°") |
| | | @ExcelProperty("ä¾åºåç©åæå¡åç§°") |
| | | private String supplierItemServiceName; |
| | | |
| | | @ApiModelProperty("é®ç¼") |
| | | @ExcelProperty("é®ç¼") |
| | | private String postalCode; |
| | | |
| | | @ApiModelProperty("å°å") |
| | | @ExcelProperty("å°å") |
| | | private String adress; |
| | | |
| | | @ApiModelProperty("logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("è系人") |
| | | @ExcelProperty("è系人") |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("èç³»çµè¯") |
| | | @ExcelProperty("èç³»çµè¯") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("æ·å") |
| | | @ExcelProperty("æ·å") |
| | | private String householdName; |
| | | |
| | | @ApiModelProperty("ä¼ ç") |
| | | @ExcelProperty("ä¼ ç") |
| | | private String fax; |
| | | |
| | | @ApiModelProperty("弿·è¡") |
| | | @ExcelProperty("弿·è¡") |
| | | private String openingName; |
| | | |
| | | @ApiModelProperty("ç½å") |
| | | @ExcelProperty("ç½å") |
| | | private String website; |
| | | |
| | | @ApiModelProperty("è´¦å·") |
| | | @ExcelProperty("è´¦å·") |
| | | private String accountName; |
| | | |
| | | @ApiModelProperty("email") |
| | | @ExcelProperty("email") |
| | | private String email; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("éä»¶") |
| | | private String enclosure; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private String status; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç¶id") |
| | | private Integer parentId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("suppliers_directory_contents") |
| | | @ApiModel(value = "SuppliersDirectoryContents对象", description = "æå¡åä¾åºåéè´ç®å½") |
| | | public class SuppliersDirectoryContents implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("èç¹åç§°") |
| | | private String nodeName; |
| | | |
| | | @ApiModelProperty("代å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ç¶èç¹") |
| | | private Integer parentId; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private List<SuppliersDirectoryContents> children; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.DataConfigDto; |
| | | import com.ruoyi.require.pojo.DataConfig; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-13 12:23:00 |
| | | */ |
| | | public interface DataConfigService extends IService<DataConfig> { |
| | | |
| | | void deleteDataConfig(); |
| | | |
| | | void saveDataAcquisitionConfiguration(Integer deviceId, DataConfigDto dataConfigList); |
| | | |
| | | Result<?> queryDataAcquisitionConfiguration(Integer deviceId, Boolean isDevice, String inspectionItem, String inspectionItemSubclass); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.DeviceBorrow; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 10:53:51 |
| | | */ |
| | | public interface DeviceBorrowService extends IService<DeviceBorrow> { |
| | | |
| | | IPage<DeviceBorrow> deviceBorrowPage(Page page, DeviceBorrow deviceBorrow); |
| | | |
| | | int saveDeviceBorrow(DeviceBorrow deviceBorrow); |
| | | |
| | | DeviceBorrow getDeviceBorrow(Integer id); |
| | | |
| | | List<DeviceBorrow> getDeviceBorrowBydeviceId(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.DeviceFaultOneDto; |
| | | import com.ruoyi.require.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.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.DeviceFault; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface DeviceFaultService extends IService<DeviceFault> { |
| | | Map<String,Object> findByDeviceId(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.DeviceMaintenanceExport; |
| | | import com.ruoyi.require.pojo.DeviceMaintenance; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface DeviceMaintenanceService extends IService<DeviceMaintenance> { |
| | | IPage<DeviceMaintenance> getDeviceMaintenancePage(Page page, Integer deviceId, String deviceNumber); |
| | | |
| | | List<DeviceMaintenanceExport> deviceMaintenanceExport(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.DeviceMetricRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:01 |
| | | */ |
| | | public interface DeviceMetricRecordService extends IService<DeviceMetricRecord> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.DeviceMetricsCopy; |
| | | |
| | | /** |
| | | * <p> |
| | | * è®¾å¤æ ¡å - æ ¡åè®°å½ - æ ¡åæ¡ç® æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-27 10:20:11 |
| | | */ |
| | | public interface DeviceMetricsCopyService extends IService<DeviceMetricsCopy> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.DeviceRecordDto; |
| | | import com.ruoyi.require.excel.DeviceRecordExport; |
| | | import com.ruoyi.require.pojo.DeviceRecord; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <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 deviceNumber); |
| | | |
| | | List<DeviceRecordExport> incidentReportExport(Integer deviceId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.require.dto.ADto; |
| | | import com.ruoyi.require.dto.DeviceDto; |
| | | import com.ruoyi.require.pojo.Device; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 设å¤(Device)表æå¡æ¥å£ |
| | | */ |
| | | public interface DeviceService extends IService<Device> { |
| | | |
| | | List<User> selectUserList(); |
| | | |
| | | List<User> selectUserListByDepartLimsId(String departLimsId); |
| | | |
| | | IPage<DeviceDto> selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull); |
| | | |
| | | int addDeviceParameter(Device itemParameter); |
| | | |
| | | int delDeviceParameter(Integer id); |
| | | |
| | | int upDeviceParameter(Device itemParameter); |
| | | |
| | | List<Device> selectEquipmentOverview(); |
| | | |
| | | List<Device> authorizedPerson(); |
| | | |
| | | List<Device> search(Integer status, String deviceName, String specificationModel, String largeCategory); |
| | | |
| | | List<Device> selectDevicePrincipal(); |
| | | |
| | | List<Device> selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass,String sonLaboratory); |
| | | |
| | | DeviceDto selectDeviceByCode(Integer id); |
| | | |
| | | /** |
| | | * |
| | | * @param request å请æ±ä¸çip |
| | | * @param id æ£éªæ ·å 主é®id |
| | | * @param entrustCode å§æç¼å· |
| | | * @param sampleCode æ ·åç¼å· |
| | | * @param fiberOpticRibbon å
纤带ç¼å· |
| | | * @return |
| | | */ |
| | | Result<?> dataAcquisition(HttpServletRequest request, Integer id, String entrustCode, String sampleCode, String fiberOpticRibbon); |
| | | |
| | | List<ADto> menu(); |
| | | |
| | | List<Map<String, Object>> treeDevice(String deviceName); |
| | | |
| | | Result<?> determineWhetherToCollectData(String managementNumber, HttpServletRequest request); |
| | | |
| | | void exportData(DeviceDto deviceDto, HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.DeviceStateDto; |
| | | import com.ruoyi.require.pojo.DeviceState; |
| | | |
| | | /** |
| | | * <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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.Document; |
| | | |
| | | public interface DocumentService extends IService<Document> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.FeCalibrationSchedule; |
| | | |
| | | /** |
| | | * <p> |
| | | * 仪å¨è®¾å¤æ£å®/æ ¡å计å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 02:53:05 |
| | | */ |
| | | public interface FeCalibrationScheduleService extends IService<FeCalibrationSchedule> { |
| | | |
| | | |
| | | IPage<FeCalibrationSchedule> page(Page page,String instrumentName, String managementNumber); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.FeIlluminationDetectionArea; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:28 |
| | | */ |
| | | public interface FeIlluminationDetectionAreaService extends IService<FeIlluminationDetectionArea> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.FeIlluminationDto; |
| | | import com.ruoyi.require.pojo.FeIllumination; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:15:57 |
| | | */ |
| | | public interface FeIlluminationService extends IService<FeIllumination> { |
| | | |
| | | IPage<FeIlluminationDto> getFeLightningProtection(Page page); |
| | | |
| | | /** |
| | | * 导åºç
§åº¦è®°å½ |
| | | * @param intensityIlluminationId |
| | | * @param response |
| | | */ |
| | | void exportFeIllumination(Integer intensityIlluminationId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.excel.FeLightningProtectionExcel; |
| | | import com.ruoyi.require.pojo.FeLightningProtection; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:36 |
| | | */ |
| | | public interface FeLightningProtectionService extends IService<FeLightningProtection> { |
| | | |
| | | List<FeLightningProtectionExcel> exportOfLightningProtectionDetection(); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.FeMeasuredQuantity; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§-æµå®é æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:44 |
| | | */ |
| | | public interface FeMeasuredQuantityService extends IService<FeMeasuredQuantity> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.FePowerStableDto; |
| | | import com.ruoyi.require.pojo.FePowerStable; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:52 |
| | | */ |
| | | public interface FePowerStableService extends IService<FePowerStable> { |
| | | |
| | | IPage<FePowerStableDto> getLaboratoryFacilityPowerStablePage(Page page); |
| | | |
| | | Map<String, Objects> getCalibrationDate(Integer deviceId); |
| | | |
| | | /** |
| | | * 导åºçµæºç¨³å®æ§ |
| | | * @param powerStableId |
| | | * @param response |
| | | */ |
| | | void exportFePowerStable(Integer powerStableId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptanceInspection; |
| | | |
| | | /** |
| | | * <p> |
| | | * éªæ¶å¼ç®±è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:30:09 |
| | | */ |
| | | public interface FeStandardSubstanceAcceptanceInspectionService extends IService<FeStandardSubstanceAcceptanceInspection> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.AcceptanceDto; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptance; |
| | | import com.ruoyi.require.vo.AcceptanceDetailsVo; |
| | | import com.ruoyi.require.vo.AcceptanceVo; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨éªæ¶ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:29:41 |
| | | */ |
| | | public interface FeStandardSubstanceAcceptanceService extends IService<FeStandardSubstanceAcceptance> { |
| | | |
| | | |
| | | void addAcceptance(AcceptanceDto dto); |
| | | |
| | | IPage<AcceptanceVo> getPageAcceptance(Page page, String name); |
| | | |
| | | AcceptanceDetailsVo getAcceptanceDetails(Integer id); |
| | | |
| | | Integer deleteAcceptance(Integer id); |
| | | |
| | | void exportFeStandardSubstanceAcceptance(HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.FeStandardSubstanceRecord; |
| | | import com.ruoyi.require.vo.SubstanceRecordVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨æ¸
ååç¨å½è¿è®°å½è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 01:49:11 |
| | | */ |
| | | public interface FeStandardSubstanceRecordService extends IService<FeStandardSubstanceRecord> { |
| | | |
| | | |
| | | void borrowSubstance(FeStandardSubstanceRecord feStandardSubstanceRecord); |
| | | |
| | | void returnSubstance(FeStandardSubstanceRecord feStandardSubstanceRecord); |
| | | |
| | | List<FeStandardSubstanceRecord> getSubstanceRecord(Integer id); |
| | | |
| | | IPage<SubstanceRecordVo> getPage(Page page, SubstanceRecordVo vo); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.FeStandardSubstance; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨æ¸
å æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:58:59 |
| | | */ |
| | | public interface FeStandardSubstanceService extends IService<FeStandardSubstance> { |
| | | |
| | | IPage<FeStandardSubstance> page(Page page,FeStandardSubstance feStandardSubstance); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.FeTempHumDateDto; |
| | | import com.ruoyi.require.pojo.FeTempHumDate; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-温湿度 åºå -ç¶ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-09 11:02:18 |
| | | */ |
| | | public interface FeTempHumDateService extends IService<FeTempHumDate> { |
| | | |
| | | IPage<FeTempHumDateDto> getFeTempHumDate(Page page); |
| | | |
| | | void exportTemperatureAndHumidityRecords(Integer dateId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.FeTempHumRecordDto; |
| | | import com.ruoyi.require.pojo.FeTempHumRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:28:52 |
| | | */ |
| | | public interface FeTempHumRecordService extends IService<FeTempHumRecord> { |
| | | |
| | | IPage<FeTempHumRecordDto> getFeTempHumRecordPage(Page page, Integer dateId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.ForeignRegisterDto; |
| | | import com.ruoyi.require.pojo.ForeignRegister; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥äººåç»è®° æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 07:17:35 |
| | | */ |
| | | public interface ForeignRegisterService extends IService<ForeignRegister> { |
| | | |
| | | /** |
| | | * 夿¥äººåç»è®°å页æ¥è¯¢ |
| | | * @param page |
| | | * @param foreignRegister |
| | | * @return |
| | | */ |
| | | IPage<ForeignRegisterDto> pageForeignRegister(Page page, ForeignRegisterDto foreignRegister); |
| | | |
| | | /** |
| | | * 导åºå¤æ¥äººåç»è®° |
| | | * @param foreignRegister |
| | | */ |
| | | void exportForeignRegister(ForeignRegisterDto foreignRegister, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.DeviceMetric; |
| | | |
| | | public interface IDeviceMetricService extends IService<DeviceMetric> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.IncidentAcceptanceCheck; |
| | | |
| | | public interface IncidentAcceptanceCheckService extends IService<IncidentAcceptanceCheck> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.IncidentFile; |
| | | |
| | | public interface IncidentFileService extends IService<IncidentFile> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.IncidentInstall; |
| | | |
| | | public interface IncidentInstallService extends IService<IncidentInstall> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.IncidentReportAddDto; |
| | | import com.ruoyi.require.excel.IncidentReportExport; |
| | | import com.ruoyi.require.pojo.IncidentReport; |
| | | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.IncidentSpareParts; |
| | | |
| | | public interface IncidentSparePartsService extends IService<IncidentSpareParts> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.InformationNotificationDto; |
| | | import com.ruoyi.require.pojo.InformationNotification; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¯éç¥ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-04-23 02:14:30 |
| | | */ |
| | | public interface InformationNotificationService extends IService<InformationNotification> { |
| | | |
| | | IPage<InformationNotificationDto> getPage(Page page, String messageType); |
| | | |
| | | void markAllInformationReadOrDeleteAllReadMessages(Boolean isMarkAllInformationRead); |
| | | |
| | | Boolean checkForUnreadData(); |
| | | |
| | | void triggerModificationStatusToRead(Integer id); |
| | | |
| | | int addInformationNotification(InformationNotification informationNotification); |
| | | |
| | | Map<String, Object> getNumberFourTypesMessagesHomePage(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.inspect.dto.InsOrderPlanDTO; |
| | | import com.ruoyi.inspect.dto.InsProductResultDTO; |
| | | import com.ruoyi.inspect.dto.TasksShowDto; |
| | | import com.ruoyi.inspect.dto.UnInsProductsDTO; |
| | | import com.ruoyi.inspect.pojo.InsOrderFile; |
| | | import com.ruoyi.inspect.pojo.InsProduct; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo; |
| | | import com.ruoyi.inspect.vo.InsOrderPlanVO; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ£éªä»»å¡-ä¸å¡å± |
| | | */ |
| | | public interface InsOrderPlanService { |
| | | |
| | | void exportInsOrderPlanResult(Map<String, Object> data, HttpServletResponse response); |
| | | |
| | | List<Map<String,Object>> getInsOrderPlanList(Map<String,Object> data); |
| | | |
| | | void exportCommissionFees(Map<String, Object> data,HttpServletResponse response); |
| | | |
| | | Map<String, Object> getTabHeader(String sonLaboratory,String samples); |
| | | |
| | | IPage<InsOrderPlanVO> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO); |
| | | |
| | | IPage<InsOrderPlanTaskSwitchVo> inspectionOrderDetailsTaskSwitching(Page page, InsOrderPlanDTO insOrderPlanDTO); |
| | | |
| | | boolean claimInsOrderPlan(InsOrderPlanDTO entity); |
| | | |
| | | void saveInsContext(Map<String, Object> insContext,Integer currentTable,Integer sampleId,Integer orderId,String sonLaboratory,Boolean isDelete); |
| | | |
| | | Map<String, Object> doInsOrder(Integer id, String laboratory); |
| | | |
| | | int upPlanUser(Integer userId, Integer orderId,String sonLaboratory); |
| | | |
| | | int verifyPlan(Integer orderId, String laboratory, Integer type, String tell); |
| | | |
| | | int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode); |
| | | |
| | | List<String> getEquipName(Integer orderId,String sonLaboratory); |
| | | |
| | | |
| | | List<InsProduct> getInsProduct(Integer id, Integer type, String laboratory, HttpServletRequest request); |
| | | |
| | | List<String> checkSubmitPlan(Integer orderId, String laboratory,String temperature,String humidity); |
| | | |
| | | IPage<InsOrderFile> getFileList(Page page, InsOrderFile insOrderFile); |
| | | |
| | | int uploadFile(Integer orderId, MultipartFile file); |
| | | |
| | | Map<String,Object> getReportModel(Integer sampleId, String sonLaboratory); |
| | | |
| | | Map<String,Object> temCycle(Integer sampleId, String inspectionItem, String inspectionItemSubclass); |
| | | |
| | | List<String> upPlanUser2(Integer orderId); |
| | | |
| | | Map<String,Object> getSagTemperatureProducts(Integer sampleId); |
| | | |
| | | Map<String,Object> getSampleInfoByOrderId(Integer id,String laboratory); |
| | | |
| | | void exportUnInsProducts(UnInsProductsDTO unInsProductsDTO, HttpServletResponse response); |
| | | |
| | | int saveInsContext2(InsProductResultDTO insProductResult); |
| | | |
| | | IPage<TasksShowDto> tasksShow(Page page, String sonLaboratory); |
| | | |
| | | int getCurrentMonthPlanTotalBySonLaboratory(String sonLaboratory, LocalDateTime startTime, LocalDateTime endTime); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_report(æ£éªæ¥å)ãçæ°æ®åºæä½Service |
| | | * @createDate 2024-03-17 22:10:02 |
| | | */ |
| | | public interface InsReportService extends IService<InsReport> { |
| | | |
| | | IPage<ReportPageDto> pageInsReport(Page page, ReportPageDto reportPageDto); |
| | | |
| | | // void wordToPdf(String path,String sealUrl); |
| | | |
| | | int inReport(String url, Integer id); |
| | | |
| | | int upReportUrl(Integer id); |
| | | // ä¸è½½ |
| | | void downReport(Integer id, Integer type ,HttpServletResponse response); |
| | | |
| | | //æäº¤ |
| | | int writeReport(Integer id); |
| | | |
| | | //å®¡æ ¸ |
| | | int examineReport(Integer id, Integer isExamine, String examineTell); |
| | | |
| | | //æ¹å |
| | | int ratifyReport(Integer id, Integer isRatify, String ratifyTell); |
| | | |
| | | int wordInsertUrl(Map<String, Object> map, String url); |
| | | |
| | | String downAll(String ids); |
| | | |
| | | int upAll(MultipartFile file) throws IOException; |
| | | |
| | | void withdraw(Map<String,Object> map); |
| | | |
| | | List<Map<String,Object>> getLaboratoryByReportId(Integer id); |
| | | |
| | | Map<String,Object> getReportCountInfo(ReportPageDto reportPageDto); |
| | | |
| | | void batchApprovalReport(List<Integer> ids); |
| | | |
| | | Map<String,Object> getBatchApprovalProgress(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.InstructionDto; |
| | | import com.ruoyi.require.pojo.Instruction; |
| | | |
| | | /** |
| | | * <p> |
| | | * ä½ä¸æå¯¼ä¹¦æ·»å åæ§æä»¶è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-04 10:29:18 |
| | | */ |
| | | public interface InstructionService extends IService<Instruction> { |
| | | |
| | | IPage<Instruction> pageByPageQueryOfHomeworkInstructions(Page page); |
| | | |
| | | void newHomeworkGuidebookAdded(InstructionDto instructionDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.InternalWastesDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®°è¯¦æ
æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:54 |
| | | */ |
| | | public interface InternalWastesDetailService extends IService<InternalWastesDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.InternalWastesDto; |
| | | import com.ruoyi.require.pojo.InternalWastes; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®° æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:27 |
| | | */ |
| | | public interface InternalWastesService extends IService<InternalWastes> { |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çå页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalWastes |
| | | * @return |
| | | */ |
| | | IPage<InternalWastesDto> pageInternalWastes(Page page, InternalWastes internalWastes); |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çæ°å¢ |
| | | * @param internalWastes |
| | | * @return |
| | | */ |
| | | boolean addInternalWastes(InternalWastesDto internalWastes); |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çä¿®æ¹ |
| | | * @param internalWastes |
| | | * @return |
| | | */ |
| | | boolean updateInternalWastes(InternalWastesDto internalWastes); |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çå é¤ |
| | | * @param wastesId |
| | | * @return |
| | | */ |
| | | boolean delInternalWastes(Integer wastesId); |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºå¤çæ¥ç详æ
|
| | | * @param wastesId |
| | | * @return |
| | | */ |
| | | InternalWastesDto getInternalWastesOne(Integer wastesId); |
| | | |
| | | /** |
| | | * 导åºä¸åºå¤ç |
| | | * @param wastesId |
| | | * @param response |
| | | */ |
| | | void exportInternalWastes(Integer wastesId, HttpServletResponse response); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.OperationInstruction; |
| | | import com.ruoyi.require.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.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.PkMaster; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-29 01:16:26 |
| | | */ |
| | | public interface PkMasterService extends IService<PkMaster> { |
| | | |
| | | //æ¸©åº¦å¾ªç¯æ°é |
| | | int temDataAcquisition(PkMaster pkMaster); |
| | | |
| | | //æ¸©åº¦å¾ªç¯æ°éæ»ä½ |
| | | int temDataAcquisition2(PkMaster pkMaster); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesConsumables; |
| | | |
| | | public interface ProcurementSuppliesConsumablesService extends IService<ProcurementSuppliesConsumables> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesContents; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface ProcurementSuppliesContentsService extends IService<ProcurementSuppliesContents> { |
| | | |
| | | List<ProcurementSuppliesContents> directoryListing(); |
| | | |
| | | List<Map<String,Object>> getNodeNames(); |
| | | |
| | | List<Map<String,Object>> getUserList(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.ProcurementSuppliesExpendDto; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesExpends; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 03:47:19 |
| | | */ |
| | | public interface ProcurementSuppliesExpendsService extends IService<ProcurementSuppliesExpends> { |
| | | IPage<ProcurementSuppliesExpendDto> selectAll(Page page, Long procurementSuppliesListId); |
| | | |
| | | Integer addExpends(ProcurementSuppliesExpendDto expendDto); |
| | | |
| | | Integer deleteExpends(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.ProcurementSuppliesListDto; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesList; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | public interface ProcurementSuppliesListService extends IService<ProcurementSuppliesList> { |
| | | IPage<ProcurementSuppliesListDto> selectList(Page page, ProcurementSuppliesListDto list); |
| | | |
| | | public Integer addProcurementSuppliesList(ProcurementSuppliesListDto dto); |
| | | |
| | | public Integer updateProcurementSuppliesList(ProcurementSuppliesListDto dto); |
| | | |
| | | void exportProcurementSuppliesList(Integer contentsId,HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.StoreDto; |
| | | import com.ruoyi.require.pojo.ProcurementSuppliesStore; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Map; |
| | | |
| | | public interface ProcurementSuppliesStoreService extends IService<ProcurementSuppliesStore> { |
| | | void addStore(Map<String,Object> map); |
| | | void updateStore(Map<String,Object> map); |
| | | |
| | | void deleteStore(Integer id, Integer consumablesId); |
| | | IPage<StoreDto> selectStoreList(Page page, StoreDto storeDto); |
| | | |
| | | void exportExcel(Integer contentsId, HttpServletResponse response) throws IOException; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import org.springframework.ui.Model; |
| | | |
| | | public interface QrShowService { |
| | | |
| | | void transformModelByType(Model model,String code,String type); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.dto.DeviceDto; |
| | | import com.ruoyi.require.dto.ReservationDto; |
| | | import com.ruoyi.require.pojo.Reservation; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * èµæºé¢å®æ°å»ºé¢å®è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author baomidou |
| | | * @since 2024-09-14 |
| | | */ |
| | | public interface ReservationService extends IService<Reservation> { |
| | | |
| | | ArrayList<JSONObject> selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull, String starttime, String endtime); |
| | | |
| | | List<ReservationDto> selectReservationParameterPage(String deviceId, String reservationTime, String specificTime); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.pojo.SupplierManagement; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:46:45 |
| | | */ |
| | | public interface SupplierManagementService extends IService<SupplierManagement> { |
| | | |
| | | List<SupplierManagement> selectSupplierManagement(SupplierManagement supplierManagement); |
| | | |
| | | void exportSupplierManagement(Integer parentId, HttpServletResponse response); |
| | | |
| | | IPage<SupplierManagement> selectQualifiedSupplierManagement(Page page, SupplierManagement supplierManagement); |
| | | |
| | | List<SupplierManagement> selectQualifiedSupplierManagementById(Integer supplierManagementId); |
| | | |
| | | List<SupplierManagement> selectSupplierManagementByParentId(Integer parentId); |
| | | |
| | | List<SupplierManagement> selectSupplierManagementAll(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.require.pojo.SuppliersDirectoryContents; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | public interface SuppliersDirectoryContentsService extends IService<SuppliersDirectoryContents> { |
| | | |
| | | ArrayList<SuppliersDirectoryContents> directoryListing(); |
| | | List<Map<String, Object>> getSuppliersDirectoryContentsNodeNames(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.require.dto.DataConfigDto; |
| | | import com.ruoyi.require.mapper.DataConfigMapper; |
| | | import com.ruoyi.require.mapper.DeviceMapper; |
| | | import com.ruoyi.require.pojo.DataConfig; |
| | | import com.ruoyi.require.pojo.Device; |
| | | import com.ruoyi.require.service.DataConfigService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-13 12:23:00 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class DataConfigServiceImpl extends ServiceImpl<DataConfigMapper, DataConfig> implements DataConfigService { |
| | | |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | private DataConfigMapper dataConfigMapper; |
| | | |
| | | @Override |
| | | public void deleteDataConfig() { |
| | | List<Integer> integers = dataConfigMapper.deleteDataConfig(); |
| | | if (!integers.isEmpty()) { |
| | | dataConfigMapper.deleteBatchIds(integers); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void saveDataAcquisitionConfiguration(Integer deviceId, DataConfigDto dataConfigList) { |
| | | if (dataConfigList.getIsDevice()) { |
| | | Device device = new Device(); |
| | | BeanUtils.copyProperties(dataConfigList, device); |
| | | device.setId(deviceId); |
| | | deviceMapper.updateById(device); |
| | | } else { |
| | | this.saveOrUpdateBatch(dataConfigList.getDataConfigList()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Result<?> queryDataAcquisitionConfiguration(Integer deviceId, Boolean isDevice, String inspectionItem, String inspectionItemSubclass) { |
| | | if (isDevice) { |
| | | List<DataConfig> list = baseMapper.selectList(Wrappers.<DataConfig>lambdaQuery() |
| | | .eq(DataConfig::getDeviceId, deviceId) |
| | | .eq(DataConfig::getInspectionItem, inspectionItem) |
| | | .eq(DataConfig::getInspectionItemSubclass, inspectionItemSubclass)); |
| | | return Result.success(list); |
| | | } else { |
| | | return Result.success(dataConfigMapper.selectDataConfigList(deviceId)); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.require.mapper.DeviceBorrowMapper; |
| | | import com.ruoyi.require.mapper.DeviceLogMapper; |
| | | import com.ruoyi.require.pojo.DeviceBorrow; |
| | | import com.ruoyi.require.pojo.DeviceLog; |
| | | import com.ruoyi.require.service.DeviceBorrowService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | 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 |
| | | UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private NumberGenerator<DeviceBorrow> numberGenerator; |
| | | |
| | | @Override |
| | | public IPage<DeviceBorrow> deviceBorrowPage(Page page, DeviceBorrow deviceBorrow) { |
| | | IPage<DeviceBorrow> iPage = deviceBorrowMapper.deviceBorrowPage(page, QueryWrappers.queryWrappers(deviceBorrow)); |
| | | return iPage; |
| | | } |
| | | |
| | | @Override |
| | | public int saveDeviceBorrow(DeviceBorrow deviceBorrow) { |
| | | User user = userMapper.selectById(SecurityUtils.getUserId()); |
| | | //æ°å¢çæ¶åæ·»å æ°å»ºæµç¨ |
| | | 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.ruoyi.require.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.ruoyi.require.dto.DeviceFaultOneDto; |
| | | import com.ruoyi.require.mapper.DeviceFaultOneMapper; |
| | | import com.ruoyi.require.pojo.DeviceFaultOne; |
| | | import com.ruoyi.require.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.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.require.mapper.DeviceFaultMapper; |
| | | import com.ruoyi.require.mapper.DeviceFaultOneMapper; |
| | | import com.ruoyi.require.mapper.DeviceMaintenanceMapper; |
| | | import com.ruoyi.require.mapper.DeviceMapper; |
| | | import com.ruoyi.require.pojo.*; |
| | | import com.ruoyi.require.service.DeviceFaultService; |
| | | import com.ruoyi.system.mapper.SysDictDataMapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | 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; |
| | | |
| | | @Resource |
| | | private SysDictDataMapper sysDictDataMapper; |
| | | |
| | | @Autowired |
| | | private DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | |
| | | @Autowired |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | @Autowired |
| | | private DeviceFaultOneMapper deviceFaultOneMapper; |
| | | |
| | | @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<SysDictData> sysDictDataList = sysDictDataMapper.selectDictDataByType("device_status"); |
| | | // List<SysDictData> sysDictDataList = DictUtils.getDictCache("设å¤ç¶æ"); |
| | | SysDictData findEnum = sysDictDataList.stream().filter(e-> Integer.parseInt(e.getDictValue()) ==device.getDeviceStatus()).findFirst().orElse(new SysDictData()); |
| | | 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.getDictLabel());//设å¤è¿è¡ç¶æ |
| | | 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.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.require.dto.DeviceMaintenanceExport; |
| | | import com.ruoyi.require.mapper.DeviceMaintenanceMapper; |
| | | import com.ruoyi.require.pojo.DeviceMaintenance; |
| | | import com.ruoyi.require.service.DeviceMaintenanceService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class DeviceMaintenanceImpl extends ServiceImpl<DeviceMaintenanceMapper, DeviceMaintenance> implements DeviceMaintenanceService { |
| | | @Resource |
| | | DeviceMaintenanceMapper deviceMaintenanceMapper; |
| | | |
| | | @Override |
| | | public IPage<DeviceMaintenance> getDeviceMaintenancePage(Page page, Integer deviceId, String deviceNumber) { |
| | | LambdaQueryWrapper<DeviceMaintenance> queryWrapper = Wrappers.<DeviceMaintenance>lambdaQuery(); |
| | | queryWrapper.eq(DeviceMaintenance::getDeviceId, deviceId); |
| | | if(!StringUtils.isEmpty(deviceNumber)){ |
| | | queryWrapper.like(DeviceMaintenance::getDeviceNumber, deviceNumber); |
| | | } |
| | | return baseMapper.selectPage(page,queryWrapper ); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceMaintenanceExport> deviceMaintenanceExport(Integer deviceId) { |
| | | return baseMapper.deviceMaintenanceExport(deviceId); |
| | | } |
| | | // @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.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.DeviceMetricRecordMapper; |
| | | import com.ruoyi.require.pojo.DeviceMetricRecord; |
| | | import com.ruoyi.require.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.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.DeviceMetricMapper; |
| | | import com.ruoyi.require.pojo.DeviceMetric; |
| | | import com.ruoyi.require.service.IDeviceMetricService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DeviceMetricServiceImpl extends ServiceImpl<DeviceMetricMapper, DeviceMetric> implements IDeviceMetricService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.DeviceMetricsCopyMapper; |
| | | import com.ruoyi.require.pojo.DeviceMetricsCopy; |
| | | import com.ruoyi.require.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.ruoyi.require.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.ruoyi.require.dto.DeviceRecordDto; |
| | | import com.ruoyi.require.excel.DeviceRecordExport; |
| | | import com.ruoyi.require.mapper.DeviceRecordMapper; |
| | | import com.ruoyi.require.pojo.DeviceRecord; |
| | | import com.ruoyi.require.service.DeviceRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * cnas设å¤ä½¿ç¨è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-09-21 11:06:47 |
| | | */ |
| | | @Service |
| | | public class DeviceRecordServiceImpl extends ServiceImpl<DeviceRecordMapper, DeviceRecord> implements DeviceRecordService { |
| | | |
| | | @Override |
| | | public IPage<DeviceRecordDto> deviceRecordPage(Integer deviceId, Page page, String deviceNumber) { |
| | | return baseMapper.deviceRecordPage(deviceId, page, deviceNumber); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceRecordExport> incidentReportExport(Integer deviceId) { |
| | | return baseMapper.incidentReportExport(deviceId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.ruoyi.basic.mapper.StructureItemParameterMapper; |
| | | import com.ruoyi.basic.pojo.StructureItemParameter; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.require.dto.ADto; |
| | | import com.ruoyi.require.dto.BDto; |
| | | import com.ruoyi.require.dto.DeviceDto; |
| | | import com.ruoyi.require.mapper.DeviceMapper; |
| | | import com.ruoyi.require.pojo.DataConfig; |
| | | import com.ruoyi.require.pojo.Device; |
| | | import com.ruoyi.require.pojo.DeviceMetricRecord; |
| | | import com.ruoyi.require.service.DataConfigService; |
| | | import com.ruoyi.require.service.DeviceService; |
| | | import com.ruoyi.require.util.DataAcquisition; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 设å¤(Device)表æå¡å®ç°ç±» |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> implements DeviceService { |
| | | |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | private UserMapper userMapper; |
| | | |
| | | private StructureItemParameterMapper structureItemParameterMapper; |
| | | |
| | | @Autowired |
| | | private DataConfigService dataConfigService; |
| | | |
| | | @Autowired |
| | | private QrShowServiceImpl qrShowService; |
| | | |
| | | @Override |
| | | public List<User> selectUserList() { |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().like(User::getDepartLimsId, "1")); |
| | | return users; |
| | | } |
| | | |
| | | @Override |
| | | public List<User> selectUserListByDepartLimsId(String departLimsId) { |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().like(User::getDepartLimsId, departLimsId)); |
| | | return users; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<DeviceDto> selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull) { |
| | | IPage<DeviceDto> iPage = deviceMapper.selectDeviceParameterPage(page, QueryWrappers.queryWrappers(itemParameter), laboratoryNameIsNull); |
| | | return iPage; |
| | | } |
| | | |
| | | @Override |
| | | public int addDeviceParameter(Device itemParameter) { |
| | | return deviceMapper.insert(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | | public int delDeviceParameter(Integer id) { |
| | | return deviceMapper.deleteById(id); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int upDeviceParameter(Device itemParameter) { |
| | | // å 餿°ééé
ç½®æ°æ® |
| | | dataConfigService.deleteDataConfig(); |
| | | // éè¦åæ¶æ´æ¹ device表 |
| | | |
| | | |
| | | |
| | | |
| | | return deviceMapper.updateById(itemParameter); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> selectEquipmentOverview() { |
| | | return deviceMapper.selectEquipmentOverview(new Page(1, 10), QueryWrappers.queryWrappers(new Device())); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> authorizedPerson() { |
| | | return deviceMapper.authorizedPerson(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> search(Integer status, String deviceName, String specificationModel, String largeCategory) { |
| | | return deviceMapper.search(status, deviceName, specificationModel, largeCategory); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> selectDevicePrincipal() { |
| | | return deviceMapper.selectDevicePrincipal(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass,String sonLaboratory) { |
| | | // Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | // User user = Optional.ofNullable(userMapper.selectById(userId)).orElse(new User()); |
| | | // String departLimsId = user.getDepartLimsId(); |
| | | // if(departLimsId.isEmpty()){ |
| | | // |
| | | // } |
| | | List<Integer> id; |
| | | |
| | | try { |
| | | id = structureItemParameterMapper.selectList(Wrappers.<StructureItemParameter>lambdaQuery() |
| | | .eq(StructureItemParameter::getInspectionItem, inspectionItem) |
| | | .eq(ObjectUtils.isNotEmpty(inspectionItemSubclass),StructureItemParameter::getInspectionItemSubclass, inspectionItemSubclass) |
| | | .eq(ObjectUtils.isNotEmpty(sonLaboratory),StructureItemParameter::getSonLaboratory,sonLaboratory) |
| | | .select(StructureItemParameter::getId)).stream().map(StructureItemParameter::getId).collect(Collectors.toList()); |
| | | // if () { |
| | | //// id = structureItemParameterMapper.selectOne(Wrappers.<StructureItemParameter>lambdaQuery() |
| | | //// .eq(StructureItemParameter::getInspectionItem, inspectionItem) |
| | | //// .last("limit 1").select(StructureItemParameter::getId)).getId(); |
| | | // |
| | | // |
| | | // }else { |
| | | //// id = structureItemParameterMapper.selectOne(Wrappers.<StructureItemParameter>lambdaQuery() |
| | | //// .eq(StructureItemParameter::getInspectionItem, inspectionItem) |
| | | //// .eq(StructureItemParameter::getInspectionItemSubclass, inspectionItemSubclass) |
| | | //// .last("limit 1").select(StructureItemParameter::getId)).getId(); |
| | | // id = structureItemParameterMapper.selectList(Wrappers.<StructureItemParameter>lambdaQuery() |
| | | // .eq(StructureItemParameter::getInspectionItem, inspectionItem) |
| | | // |
| | | // .select(StructureItemParameter::getId)).stream().map(StructureItemParameter::getId).collect(Collectors.toList()); |
| | | // } |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | List<Device> devices = deviceMapper.selectList(Wrappers.<Device>lambdaQuery() |
| | | .eq(Device::getDeviceStatus, 0) |
| | | .isNotNull(Device::getInsProductIds)); |
| | | List<Device> devices2 = new ArrayList<>(); |
| | | for (Device device : devices) { |
| | | String[] ids = device.getInsProductIds().split(","); |
| | | for (String i : ids) { |
| | | if (ObjectUtils.isNotEmpty(i)) { |
| | | if (id.contains(Integer.parseInt(i))) { |
| | | devices2.add(device); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return devices2; |
| | | } |
| | | |
| | | @Override |
| | | public DeviceDto selectDeviceByCode(Integer id) { |
| | | DeviceDto deviceDto = deviceMapper.selectDeviceByCode(id); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | if(Strings.isNotEmpty(deviceDto.getAuthorizedPerson())) { |
| | | if(deviceDto.getAuthorizedPerson().equals("null")) { |
| | | deviceDto.setAuthorizedPerson("[]"); |
| | | } |
| | | ids = JSON.parseArray(deviceDto.getAuthorizedPerson(), Integer.class); |
| | | } |
| | | String name = ""; |
| | | if(!ids.isEmpty()) { |
| | | name = userMapper.selectBatchIds(ids).stream().map(User::getName).collect(Collectors.joining(",")); |
| | | } |
| | | deviceDto.setAuthorizedPersonName(name); |
| | | //æ¥è¯¢è®¾å¤æ ¡åä¿¡æ¯ |
| | | DeviceMetricRecord calibrate = qrShowService.getDeviceMetricRecord(id, "calibrate"); |
| | | //deviceDto.setCalibrationDate(qrShowService.formatDate(calibrate.getCalibrationDate(),"yyyy-MM-dd")); |
| | | deviceDto.setCalibrateNo(calibrate.getCertificateSerialNumber()); |
| | | if(Objects.nonNull(calibrate.getNextCalibrationDate())){ |
| | | deviceDto.setCalibrationServices(calibrate.getUnitOfMeasure()); |
| | | deviceDto.setNextCalibrationDate(calibrate.getNextCalibrationDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); |
| | | deviceDto.setLastCalibrationDate(calibrate.getCalibrationDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime()); |
| | | } |
| | | |
| | | // å°äºåç¨æ¥æï¼èªå¨å°ç¶ææ¹ä¸ºåç¨ |
| | | if(Objects.nonNull(deviceDto.getNextCalibrationDate()) && LocalDateTime.now().isAfter(deviceDto.getNextCalibrationDate())) { |
| | | List<SysDictData> enums = DictUtils.getDictCache("设å¤ç¶æ"); |
| | | List<SysDictData> status = enums.stream().filter(item -> item.getDictValue().equals("åç¨")).collect(Collectors.toList()); |
| | | deviceDto.setDeviceStatus(Integer.parseInt(status.get(0).getDictValue())); |
| | | deviceMapper.updateById(deviceDto); |
| | | } |
| | | return deviceDto; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param request å请æ±ä¸çip |
| | | * @param id æ£éªæ ·å 主é®id |
| | | * @param entrustCode å§æç¼å· |
| | | * @param sampleCode æ ·åç¼å· |
| | | * @param fiberOpticRibbon å
纤带ç¼å· |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result<?> dataAcquisition(HttpServletRequest request, Integer id, String entrustCode, String sampleCode, String fiberOpticRibbon) { |
| | | // 鲿¢åç¯å°åå为IPv6 |
| | | String ip = DataAcquisition.getIp(request); |
| | | List<Device> device = baseMapper.selectList(Wrappers.<Device>lambdaQuery() |
| | | .eq(Device::getIp, ip)); |
| | | // 1ãæ£éª |
| | | if(device.size() > 1) { |
| | | String str = ""; |
| | | for (Device device1 : device) { |
| | | str += device1.getDeviceName() + "ï¼"; |
| | | } |
| | | throw new ErrorException("IPï¼" + ip + "é
ç½®äºè®¾å¤å¤ä¸ªè®¾å¤ï¼" + str + "ï¼æ æ³è¿è¡æ°éï¼"); |
| | | } |
| | | if (ObjectUtils.isEmpty(device)) { |
| | | throw new ErrorException("æªç»è¯¥IPï¼" + ip + "é
置设å¤ï¼æ æ³è¿è¡æ°éï¼"); |
| | | } |
| | | List<Map<String, Object>> inspectionItemSubclass = baseMapper.getInspectionItemSubclass(id); |
| | | if (ObjectUtils.isEmpty(device.get(0).getFileType()) || ObjectUtils.isEmpty(device.get(0).getCollectUrl())) { |
| | | throw new ErrorException("æªç»è¯¥ï¼" + device.get(0).getDeviceName() + "设å¤é
ç½®ééè·¯å¾ææä»¶åç¼ï¼"); |
| | | } |
| | | // 2ãå设å¤å
³èçæ£éªé¡¹ï¼æ£éªå项 |
| | | List<DataConfig> list1 = new ArrayList<>(); |
| | | inspectionItemSubclass.forEach(i -> { |
| | | List<DataConfig> list = dataConfigService.list(Wrappers.<DataConfig>lambdaQuery() |
| | | .eq(DataConfig::getDeviceId, device.get(0).getId()) |
| | | .eq(DataConfig::getInspectionItem, i.get("inspection_item")) |
| | | .eq(DataConfig::getInspectionItemSubclass, i.get("inspection_item_subclass")) |
| | | .orderBy(false, false, DataConfig::getId)); |
| | | list1.addAll(list); |
| | | }); |
| | | List<DataConfig> collect = list1.stream().distinct().collect(Collectors.toList()); |
| | | // 3ãééï¼åæ°æ® |
| | | Map<String, Object> map = DataAcquisition.dataAcquisitionEntrance(collect, device.get(0), entrustCode, sampleCode, ip, fiberOpticRibbon); |
| | | // 4ãé å¾ªç¯æ¬¡æ°ï¼åä¸å
¬å¼è®¡ç® |
| | | if (ObjectUtils.isNotEmpty(map)) { |
| | | Map<String, Object> frequency = DataAcquisition.createFrequency(entrustCode, sampleCode,fiberOpticRibbon, map); |
| | | return Result.success(frequency); |
| | | } else { |
| | | return Result.success(null); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<ADto> menu() { |
| | | //æ¥è¯¢ææè®¾å¤ä¿¡æ¯ |
| | | List<Device> devices = baseMapper.selectList(null); |
| | | List<String> name = devices.stream().map(Device::getDeviceName).collect(Collectors.toList()); |
| | | |
| | | //æ¥è¯¢ææç¨æ·ä¿¡æ¯ |
| | | List<User> users = userMapper.selectList(null); |
| | | List<String> collect = users.stream().map(User::getName).collect(Collectors.toList()); |
| | | String menu="[\n" + |
| | | "\t{\n" + |
| | | "\t\tk: 0,\n" + |
| | | "\t\tv: \"个人é¦é¡µ\",\n" + |
| | | "\t\ti: \"font icon-shouyefill\",\n" + |
| | | "\t\tself: true,\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tk: 0,\n" + |
| | | "\t\t\tv: \"个人é¦é¡µ\",\n" + |
| | | "\t\t\ti: \"font icon-shouyefill\",\n" + |
| | | "\t\t\tu: \"index-index\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"ä¸å¡ç®¡ç\",\n" + |
| | | "\t\ti: \"font icon-kexueyanjiuheshiyankaifa\",\n" + |
| | | "\t\tp: \"selectInsOrderParameter selectInsOrderPlanList pageInsReport costStatistics selectWarehouse\",\n" + |
| | | "\t\tc: [\n" + |
| | | " {\n" + |
| | | " v: \"åæææ£éªä¸å\",\n" + |
| | | " i: \"font icon-erjidaohang\",\n" + |
| | | " u: \"b1-material-inspection-order\",\n" + |
| | | " p: \"selectInsOrderParameter\"\n" + |
| | | " },\n" + |
| | | " {\n" + |
| | | "\t\t\tv: \"æ£éªä¸å\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b1-inspection-order\",\n" + |
| | | "\t\t\tp: \"selectInsOrderParameter\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ£éªä»»å¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b1-inspect-order-plan\",\n" + |
| | | "\t\t\tp: \"selectInsOrderPlanList\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ¥åç¼å¶\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b1-report-preparation\",\n" + |
| | | "\t\t\tp: \"pageInsReport\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è´¹ç¨ç»è®¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b1-expenses\",\n" + |
| | | "\t\t\tp: \"costStatistics\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ ·å管ç\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b1-sample\",\n" + |
| | | "\t\t\tp: \"selectWarehouse\"\n" + |
| | | "\t\t},{\n" + |
| | | "\t\t\tv: \"ä¸åæ ¼ç®¡ç\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b1-unpass\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}\n" + |
| | | "\t]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"æ åé\",\n" + |
| | | "\t\ti: \"font icon-biaozhunji\",\n" + |
| | | "\t\tp: \"selectStandardTreeList selectStandardTemplatePageList\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"æ ååº\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b2-standard\",\n" + |
| | | "\t\t\tp: \"selectStandardTreeList\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"åå§è®°å½æ¨¡æ¿\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b2-standard-template\",\n" + |
| | | "\t\t\tp: \"selectStandardTemplatePageList\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"绩æç®¡ç\",\n" + |
| | | "\t\ti: \"font icon-jixiaoguanli\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"å·¥æ¶ç®¡ç\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b3-work-time-management\",\n" + |
| | | "\t\t\tp: \"selectAuxiliaryWorkingHours\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人åèå¤\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人åèè¯\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b3-personnel-evaluation\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人åèæ ¸\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æè½ç级\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å·¥èµç»ç®\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"çæ¬¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b3-classes\",\n" + |
| | | "\t\t\tp: \"performanceShiftPage performanceShiftPageYear\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"ç»è®¡å¾è¡¨\",\n" + |
| | | "\t\ti: \"font icon-tongjitubiao\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"å®éªå®¤è¦ç´ \",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ¯æ¥ä¸å¡ç»è®¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b4-daily-business-statistics\",\n" + |
| | | "\t\t\tp: \"businessStatisticsByDay\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ£æµé¡¹ç®ç»è®¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b4-inspection-item-statistics\",\n" + |
| | | "\t\t\tp: \"testProductByDay\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ ·åç¼ºé·ææ°\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"b4-sample-defects\",\n" + |
| | | "\t\t\tp: \"selectSampleDefects\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"èæç»è®¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人å工使¥è¡¨\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"çµåçæ¿\",\n" + |
| | | "\t\ti: \"font icon-dianzikanban-fan\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"å®¢æ·æ¥å¾
\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ä»»å¡å±ç¤º\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"设å¤ç¶æå饱å度\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"ç³»ç»åè½\",\n" + |
| | | "\t\ti: \"el-icon-s-tools\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"æ°æ®åå
¸\",\n" + |
| | | "\t\t\ti: \"el-icon-s-tools\",\n" + |
| | | "\t\t\tu: \"enums\",\n" + |
| | | "\t\t\tp: \"selectEnumList\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è§è²ç®¡ç\",\n" + |
| | | "\t\t\ti: \"el-icon-s-tools\",\n" + |
| | | "\t\t\tu: \"role-manage\",\n" + |
| | | "\t\t\tp: \"selectRoleLists\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ç¨æ·ç®¡ç\",\n" + |
| | | "\t\t\ti: \"el-icon-s-tools\",\n" + |
| | | "\t\t\tu: \"person-manage\",\n" + |
| | | "\t\t\tp: \"selectUserList\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"客æ·ç®¡ç\",\n" + |
| | | "\t\t\ti: \"el-icon-s-tools\",\n" + |
| | | "\t\t\tu: \"custom_manage\",\n" + |
| | | "\t\t\tp: \"selectCustomPageList\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ç³»ç»æ¥å¿\",\n" + |
| | | "\t\t\ti: \"el-icon-s-tools\",\n" + |
| | | "\t\t\tu: \"system-log\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ¶æ¯è¯¦æ
\",\n" + |
| | | "\t\t\ti: \"el-icon-s-tools\",\n" + |
| | | "\t\t\tu: \"notice-detail\",\n" + |
| | | "\t\t\tp: \"abcd\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"4 éç¨è¦æ±\",\n" + |
| | | "\t\ti: \"font icon-tongyongyaoqiu\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\t\tv: \"éç¨è¦æ±\",\n" + |
| | | "\t\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\t\tu: \"\",\n" + |
| | | "\t\t\t\tg: \"4 éç¨è¦æ±\",\n" + |
| | | "\t\t\t\tp: \"\"\n" + |
| | | "\t\t\t},\n" + |
| | | "\t\t\t{\n" + |
| | | "\t\t\t\tv: \"å
¬æ£æ§\",\n" + |
| | | "\t\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\t\tu: \"\",\n" + |
| | | "\t\t\t\tg: \"4.1 å
¬æ£æ§\",\n" + |
| | | "\t\t\t\tp: \"\"\n" + |
| | | "\t\t\t},\n" + |
| | | "\t\t\t{\n" + |
| | | "\t\t\t\tv: \"ä¿å¯æ§\",\n" + |
| | | "\t\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\t\tu: \"\",\n" + |
| | | "\t\t\t\tg: \"4.2 ä¿å¯æ§\",\n" + |
| | | "\t\t\t\tp: \"\"\n" + |
| | | "\t\t\t}\n" + |
| | | "\t\t]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"5 ç»æè¦æ±\",\n" + |
| | | "\t\ti: \"font icon-jiegouyaoqiu\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"å®éªå®¤çæ³å¾å°ä½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"Aå®éªå®¤çæ³å¾å°ä½\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å
¨æè´è´£ç管çå±\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"Bå
¨æè´è´£ç管çå±\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å®éªå®¤èµè´¨\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a5-laboratory-qualifications\",\n" + |
| | | "\t\t\tg: \"Cè½åèå´åèµè´¨\",\n" + |
| | | "\t\t\tp: \"getCertificationDetail\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è½åèå´\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a5-capacity-scope\",\n" + |
| | | "\t\t\tg: \"Cè½åèå´åèµè´¨\",\n" + |
| | | "\t\t\tp: \"selectItemParameterList selectTestObjectList\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"åºææè®¾æ½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a5-laboratory-management\",\n" + |
| | | "\t\t\tg: \"Dåºææè®¾æ½\",\n" + |
| | | "\t\t\tp: \"selectItemParameter\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ç»ç»ç¸å
³æä»¶\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"Eç»ç»ç¸å
³æä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人åå²ä½ä»»è\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"F人åå²ä½ä»»è\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ²éå宣贯\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"Gæ²éå宣贯\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t}, {\n" + |
| | | "\t\tv: \"6 èµæºè¦æ±\",\n" + |
| | | "\t\ti: \"font icon-ziyuanyaoqiu\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"æ»å\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.1 æ»å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"äººåæ»è§\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a6-personnel-overview\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"selectPersonnelOverview\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人åæç»\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a6-personnel-detail\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"selectDepartmentLim\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人åå¹è®\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人åçç£\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å²ä½èè´£\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人ååºæ¬ä¿¡æ¯\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å·¥ä½å±¥å\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"奿©è®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å¹è®è®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"çç£è®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ä»»èææè®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"人åè½åçæ§è®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ²éè®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.2 人å\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"夿¥äººå管ç\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a6-external-personnel-management\",\n" + |
| | | "\t\t\tg: \"6.3 设æ½åç¯å¢æ¡ä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å®éªå®¤è®¾æ½åºæä¿¡æ¯\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.3 设æ½åç¯å¢æ¡ä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"设æ½åç¯å¢æ¡ä»¶è¦æ±\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.3 设æ½åç¯å¢æ¡ä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ç¯å¢æ¡ä»¶å¼ç¨\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.3 设æ½åç¯å¢æ¡ä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å®å
¨åºä»£è¡¨æ£æ¥\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.3 设æ½åç¯å¢æ¡ä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å®å
¨å
å¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.3 设æ½åç¯å¢æ¡ä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"åºç©å¤ç交æ¥è®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a6-waste-handover\",\n" + |
| | | "\t\t\tg: \"6.3 设æ½åç¯å¢æ¡ä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è®¾å¤æ»è§\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a6-device-overview\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"selectDeviceParameter\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"设å¤å·¥å
·æç»\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a6-device-management\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"selectDeviceParameter\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"èµæºé¢å®\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ä½ä¸æå¯¼ä¹¦\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"设å¤è¿è¡æ»è§\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è®¾å¤æ¡£æ¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"设å¤éªæ¶\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è®¾å¤æ ¡å\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è®¾å¤æ ¸æ¥\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"设å¤ç»´æ¤\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"设å¤åç¨\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è®¾å¤æ
é\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"使ç¨è®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"设å¤åç¨/å¯ç¨\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.4 设å¤\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"é弿º¯æºè®¡å\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.5 è®¡éæº¯æºæ§\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ åç©è´¨æ¸
å\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a6-standard-material-list\",\n" + |
| | | "\t\t\tg: \"6.5 è®¡éæº¯æºæ§\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ åç©è´¨éªæ¶\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.5 è®¡éæº¯æºæ§\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ åç©è´¨é¢ç¨\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a6-standard-material-requisition\",\n" + |
| | | "\t\t\tg: \"6.5 è®¡éæº¯æºæ§\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è¿ææ æ ·å¤ç½®\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.5 è®¡éæº¯æºæ§\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æå¡åä¾åºåéè´\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.6 å¤é¨æä¾ç产ååæå¡\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t},{\n" + |
| | | "\t\t\tv: \"ä¾åºå管ç\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"6.6 å¤é¨æä¾ç产ååæå¡\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"7 è¿ç¨è¦æ±\",\n" + |
| | | "\t\ti: \"font icon-guochengyaoqiu\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"æ£éªå§æå\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.1 è¦æ±ãæ 书åååè¯å®¡\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ååè¯å®¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.1 è¦æ±ãæ 书åååè¯å®¡\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å®éªå®¤çæ£æµè½åæ¡£æ¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"a7-standard-method\",\n" + |
| | | "\t\t\tg: \"7.2 æ¹æ³çéæ©ãéªè¯å确认\",\n" + |
| | | "\t\t\tp: \"selectStandardMethodList\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ 忥æ°\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.2 æ¹æ³çéæ©ãéªè¯å确认\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ åæ¹æ³çåæ´\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.2 æ¹æ³çéæ©ãéªè¯å确认\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ¹æ³éªè¯\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.2 æ¹æ³çéæ©ãéªè¯å确认\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ½æ ·\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.3 æ½æ ·\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ£æµææ ¡åç©åçå¤ç½®\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.4 æ£æµææ ¡åç©åçå¤ç½®\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ææ¯è®°å½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.5 ææ¯è®°å½\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æµéä¸ç¡®å®åº¦çè¯å®\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.6 æµéä¸ç¡®å®åº¦çè¯å®\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ç¡®ä¿ç»ææææ§\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.7 ç¡®ä¿ç»ææææ§\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ¥åç»æ\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.8 æ¥åç»æ\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æè¯è¯¦æ
\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.9 æè¯\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æè¯æ
嵿±æ»è¡¨\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.9 æè¯\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ä¸ç¬¦å项\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.10 ä¸ç¬¦åå·¥ä½\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"ä¸ç¬¦å项çåå¸\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.10 ä¸ç¬¦åå·¥ä½\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æ°æ®æ§å¶åä¿¡æ¯ç®¡ç\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"7.11 æ°æ®æ§å¶åä¿¡æ¯ç®¡ç\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\tv: \"8 ä½ç³»ç®¡çè¦æ±\",\n" + |
| | | "\t\ti: \"font icon-guanlitixiyaoqiu\",\n" + |
| | | "\t\tp: \"\",\n" + |
| | | "\t\tc: [{\n" + |
| | | "\t\t\tv: \"æ¹å¼\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.1 æ¹å¼\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"管çä½ç³»æä»¶\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.2 管çä½ç³»æä»¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æä»¶æ¸
å\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.3 管çä½ç³»æä»¶çæ§å¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æä»¶åæ§\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.3 管çä½ç³»æä»¶çæ§å¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æä»¶åæ¾åæ¶\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.3 管çä½ç³»æä»¶çæ§å¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æä»¶åæ´\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.3 管çä½ç³»æä»¶çæ§å¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"æä»¶ä½åº\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.3 管çä½ç³»æä»¶çæ§å¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"è®°å½çæ§å¶\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.4 è®°å½çæ§å¶\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"åºå¯¹é£é©åæºéçæªæ½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.5 åºå¯¹é£é©åæºéçæªæ½\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"客æ·åºæ¬ä¿¡æ¯ç®¡ç\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.6 æ¹è¿\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å®¢æ·æ»¡æåº¦\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.6 æ¹è¿\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"çº æ£æªæ½\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.7 çº æ£æªæ½\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"å
审管ç\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.8 å
审管ç\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}, {\n" + |
| | | "\t\t\tv: \"管çè¯å®¡\",\n" + |
| | | "\t\t\ti: \"font icon-erjidaohang\",\n" + |
| | | "\t\t\tu: \"\",\n" + |
| | | "\t\t\tg: \"8.9 管çè¯å®¡\",\n" + |
| | | "\t\t\tp: \"\"\n" + |
| | | "\t\t}]\n" + |
| | | "\t}\n" + |
| | | "]"; |
| | | List<ADto> aDtos = JSONArray.parseArray(menu, ADto.class); |
| | | List<BDto> bDtos = aDtos.get(9).getC(); |
| | | for (String s : name) { |
| | | BDto bDto = new BDto(); |
| | | bDto.setV(s); |
| | | bDto.setI("font icon-erjidaohang"); |
| | | bDto.setU("a6-device-overview"); |
| | | bDto.setG("6.4 设å¤"); |
| | | bDto.setP("selectDeviceParameter"); |
| | | bDtos.add(bDto); |
| | | } |
| | | for (String s : collect) { |
| | | BDto bDto = new BDto(); |
| | | bDto.setV(s); |
| | | bDto.setI("font icon-erjidaohang"); |
| | | bDto.setU("a6-personnel-overview"); |
| | | bDto.setG("6.2 人å"); |
| | | bDto.setP("selectPersonnelOverview"); |
| | | bDtos.add(bDto); |
| | | } |
| | | |
| | | return aDtos; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> treeDevice(String deviceName) { |
| | | List<Map<String, Object>> listMap = deviceMapper.treeDevice(deviceName); |
| | | return listMap; |
| | | } |
| | | |
| | | @Override |
| | | public Result<?> determineWhetherToCollectData(String managementNumber, HttpServletRequest request) { |
| | | String ip = DataAcquisition.getIp(request); |
| | | List<Device> device = baseMapper.selectList(Wrappers.<Device>lambdaQuery() |
| | | .eq(Device::getIp, ip)); |
| | | if (ObjectUtils.isEmpty(device)) { |
| | | return Result.success(false); |
| | | } |
| | | if (ObjectUtils.isEmpty(device.get(0).getFileType()) || ObjectUtils.isEmpty(device.get(0).getCollectUrl())) { |
| | | return Result.success(false); |
| | | } else { |
| | | return Result.success(true); |
| | | } |
| | | } |
| | | @Override |
| | | public void exportData(DeviceDto deviceDto, HttpServletResponse response){ |
| | | //æ¥è¯¢å¯¼åºçè´¹ç¨ç»è®¡æ°æ® |
| | | // String dates = deviceDto.getDates(); |
| | | // String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(","); |
| | | // deviceDto.setDates(null); |
| | | // List<CostStatisticsDto> deviceDtos = deviceMapper.selectList(QueryWrappers.queryWrappers(deviceDto).ge("create_time", split[0]).le("create_time", split[1] + " 23:59:59")); |
| | | // deviceDtos = deviceDtos.stream().map(dto -> { |
| | | // Set<String> uniqueTags = new HashSet<>(); |
| | | // if (dto.getInspectionItem().contains(",")) { |
| | | // for (String s : dto.getInspectionItem().split(",")) { |
| | | // uniqueTags.add(s.split("@")[0]); |
| | | // } |
| | | // } else { |
| | | // uniqueTags.add(dto.getInspectionItem().split("@")[0]); |
| | | // } |
| | | // dto.setInspectionItem(uniqueTags.toString()); |
| | | // return dto; |
| | | // }).collect(Collectors.toList()); |
| | | // |
| | | // response.setContentType("application/vnd.ms-excel"); |
| | | // response.setCharacterEncoding("UTF-8"); |
| | | // // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | // String fileName = URLEncoder.encode("æ ·åè´¹ç¨ç»è®¡å¯¼åº", "UTF-8"); |
| | | // response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | // Map<String, List<CostStatisticsDto>> groupByCompany = |
| | | // deviceDtos.stream().filter(e -> StrUtil.isNotEmpty(e.getCompany())) |
| | | // .collect(Collectors.groupingBy(CostStatisticsDto::getCompany)); |
| | | // try { |
| | | // // æ°å»ºExcelWriter |
| | | // // æ°å»ºExcelWriter |
| | | // ExcelWriter excelWriter = |
| | | // EasyExcel.write(response.getOutputStream()) |
| | | // .registerWriteHandler(new SimpleColumnWidthStyleStrategy(25)) |
| | | // .build(); |
| | | // for (Map.Entry<String, List<CostStatisticsDto>> companyDataEntry : groupByCompany.entrySet()) { |
| | | // String sheetName = companyDataEntry.getKey(); |
| | | // List<CostStatisticsDto> dataList = companyDataEntry.getValue(); |
| | | // WriteSheet mainSheet = EasyExcel.writerSheet(sheetName) |
| | | // .head(CostStatisticsDto.class) |
| | | // .registerWriteHandler(new SimpleColumnWidthStyleStrategy(25)) |
| | | // .build(); |
| | | // excelWriter.write(dataList, mainSheet); |
| | | // } |
| | | // // å
³éæµ |
| | | // excelWriter.finish(); |
| | | // } catch (IOException e) { |
| | | // throw new RuntimeException("导åºå¤±è´¥"); |
| | | // } |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.dto.DeviceStateDto; |
| | | import com.ruoyi.require.mapper.DeviceStateMapper; |
| | | import com.ruoyi.require.pojo.DeviceState; |
| | | import com.ruoyi.require.service.DeviceStateService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设å¤åç¨/å¯ç¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | @Service |
| | | public class DeviceStateServiceImpl extends ServiceImpl<DeviceStateMapper, DeviceState> implements DeviceStateService { |
| | | @Override |
| | | public IPage<DeviceStateDto> getDeviceStatePage(Integer deviceId, Page page, String processNumber) { |
| | | return baseMapper.getDeviceStatePage(deviceId, page, processNumber); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.DocumentDao; |
| | | import com.ruoyi.require.pojo.Document; |
| | | import com.ruoyi.require.service.DocumentService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class DocumentServiceImpl extends ServiceImpl<DocumentDao, Document> implements DocumentService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.mapper.FeCalibrationScheduleMapper; |
| | | import com.ruoyi.require.pojo.FeCalibrationSchedule; |
| | | import com.ruoyi.require.service.FeCalibrationScheduleService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 仪å¨è®¾å¤æ£å®/æ ¡å计å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 02:53:05 |
| | | */ |
| | | @Service |
| | | public class FeCalibrationScheduleServiceImpl extends ServiceImpl<FeCalibrationScheduleMapper, FeCalibrationSchedule> implements FeCalibrationScheduleService { |
| | | |
| | | @Override |
| | | public IPage<FeCalibrationSchedule> page(Page page, String instrumentName, String managementNumber) { |
| | | IPage<FeCalibrationSchedule> ipage = this.baseMapper.ipage(page,instrumentName, managementNumber); |
| | | return ipage; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.FeIlluminationDetectionAreaMapper; |
| | | import com.ruoyi.require.pojo.FeIlluminationDetectionArea; |
| | | import com.ruoyi.require.service.FeIlluminationDetectionAreaService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨-æ£æµåºå æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:28 |
| | | */ |
| | | @Service |
| | | public class FeIlluminationDetectionAreaServiceImpl extends ServiceImpl<FeIlluminationDetectionAreaMapper, FeIlluminationDetectionArea> implements FeIlluminationDetectionAreaService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.utils.DateImageUtil; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.framework.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.require.dto.FeIlluminationDto; |
| | | import com.ruoyi.require.dto.FeIlluminationExportDto; |
| | | import com.ruoyi.require.mapper.FeIlluminationDetectionAreaMapper; |
| | | import com.ruoyi.require.mapper.FeIlluminationMapper; |
| | | import com.ruoyi.require.pojo.FeIllumination; |
| | | import com.ruoyi.require.pojo.FeIlluminationDetectionArea; |
| | | import com.ruoyi.require.service.FeIlluminationService; |
| | | 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.Instant; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-ç
§åº¦è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:15:57 |
| | | */ |
| | | @Service |
| | | public class FeIlluminationServiceImpl extends ServiceImpl<FeIlluminationMapper, FeIllumination> implements FeIlluminationService { |
| | | |
| | | @Resource |
| | | private FeIlluminationDetectionAreaMapper feIlluminationDetectionAreaMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | |
| | | @Override |
| | | public IPage<FeIlluminationDto> getFeLightningProtection(Page page) { |
| | | return baseMapper.getFeLightningProtection(page); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç
§åº¦è®°å½ |
| | | * @param intensityIlluminationId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportFeIllumination(Integer intensityIlluminationId, HttpServletResponse response) { |
| | | FeIlluminationExportDto illuminationExportDto = baseMapper.selectFeIllumination(intensityIlluminationId); |
| | | // æ£æµäºº |
| | | String testerUrl = null; |
| | | if (illuminationExportDto.getTesterId() != null) { |
| | | testerUrl = userMapper.selectById(illuminationExportDto.getTesterId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(testerUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ£æµäººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ ¸æ¥äºº |
| | | String checkerUrl = null; |
| | | if (illuminationExportDto.getCheckerId() != null) { |
| | | checkerUrl = userMapper.selectById(illuminationExportDto.getCheckerId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(checkerUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ ¸æ¥äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<FeIlluminationDetectionArea> feIlluminationDetectionAreas = feIlluminationDetectionAreaMapper.selectList(Wrappers.<FeIlluminationDetectionArea>lambdaQuery() |
| | | .eq(FeIlluminationDetectionArea::getIntensityIlluminationId, intensityIlluminationId)); |
| | | |
| | | for (int i = 0; i < feIlluminationDetectionAreas.size(); i++) { |
| | | feIlluminationDetectionAreas.get(i).setIndex(i + 1); |
| | | } |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/illumination.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("detectionAreaList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | String finalTesterUrl = testerUrl; |
| | | String finalCheckerUrl = checkerUrl; |
| | | |
| | | // å¤ææ£æµæ¥ææ¯å¦ä¸ºç©º |
| | | LocalDateTime localDateTime = null; |
| | | if (illuminationExportDto.getTestDate() != null) { |
| | | Instant instant = illuminationExportDto.getTestDate().toInstant(); |
| | | ZoneId zoneId = ZoneId.systemDefault(); |
| | | localDateTime = instant.atZone(zoneId).toLocalDateTime(); |
| | | } |
| | | LocalDateTime finalLocalDateTime = localDateTime; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("illumination", illuminationExportDto); |
| | | put("detectionAreaList", feIlluminationDetectionAreas); |
| | | put("testerUrl", StringUtils.isNotBlank(finalTesterUrl) ? Pictures.ofLocal(imgUrl + "/" + finalTesterUrl).create() : null); |
| | | put("checkerUrl", StringUtils.isNotBlank(finalCheckerUrl) ? Pictures.ofLocal(imgUrl + "/" + finalCheckerUrl).create() : null); |
| | | put("testDateUrl", finalLocalDateTime != null ? |
| | | Pictures.ofStream(DateImageUtil.createDateImage(finalLocalDateTime)).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.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.excel.FeLightningProtectionExcel; |
| | | import com.ruoyi.require.mapper.FeLightningProtectionMapper; |
| | | import com.ruoyi.require.pojo.FeLightningProtection; |
| | | import com.ruoyi.require.service.FeLightningProtectionService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-é²é·æ£æµ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:36 |
| | | */ |
| | | @Service |
| | | public class FeLightningProtectionServiceImpl extends ServiceImpl<FeLightningProtectionMapper, FeLightningProtection> implements FeLightningProtectionService { |
| | | |
| | | @Override |
| | | public List<FeLightningProtectionExcel> exportOfLightningProtectionDetection() { |
| | | return baseMapper.exportOfLightningProtectionDetection(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.FeMeasuredQuantityMapper; |
| | | import com.ruoyi.require.pojo.FeMeasuredQuantity; |
| | | import com.ruoyi.require.service.FeMeasuredQuantityService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§-æµå®é æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:44 |
| | | */ |
| | | @Service |
| | | public class FeMeasuredQuantityServiceImpl extends ServiceImpl<FeMeasuredQuantityMapper, FeMeasuredQuantity> implements FeMeasuredQuantityService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.framework.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.require.dto.FePowerStableDto; |
| | | import com.ruoyi.require.dto.FePowerStableExportDto; |
| | | import com.ruoyi.require.mapper.FeMeasuredQuantityMapper; |
| | | import com.ruoyi.require.mapper.FePowerStableMapper; |
| | | import com.ruoyi.require.pojo.FeMeasuredQuantity; |
| | | import com.ruoyi.require.pojo.FePowerStable; |
| | | import com.ruoyi.require.service.FePowerStableService; |
| | | 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.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-çµæºç¨³å®æ§ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:16:52 |
| | | */ |
| | | @Service |
| | | public class FePowerStableServiceImpl extends ServiceImpl<FePowerStableMapper, FePowerStable> implements FePowerStableService { |
| | | |
| | | @Resource |
| | | private FeMeasuredQuantityMapper feMeasuredQuantityMapper; |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public IPage<FePowerStableDto> getLaboratoryFacilityPowerStablePage(Page page) { |
| | | return baseMapper.getLaboratoryFacilityPowerStablePage(page); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Objects> getCalibrationDate(Integer deviceId) { |
| | | return baseMapper.getCalibrationDate(deviceId); |
| | | } |
| | | |
| | | /** |
| | | * 导åºçµæºç¨³å®æ§ |
| | | * @param powerStableId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportFePowerStable(Integer powerStableId, HttpServletResponse response) { |
| | | FePowerStableExportDto powerStable = baseMapper.selectPowerStable(powerStableId); |
| | | |
| | | // æ£æµäºº |
| | | String testerUrl = null; |
| | | if (powerStable.getTesterId() != null) { |
| | | testerUrl = userMapper.selectById(powerStable.getTesterId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(testerUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ£æµäººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ ¸æ¥äºº |
| | | String checkerUrl = null; |
| | | if (powerStable.getCheckerId() != null) { |
| | | checkerUrl = userMapper.selectById(powerStable.getCheckerId()).getSignatureUrl(); |
| | | if (StringUtils.isBlank(checkerUrl)) { |
| | | throw new ErrorException("æ¾ä¸å°æ ¸æ¥äººçç¾å"); |
| | | } |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | List<FeMeasuredQuantity> feMeasuredQuantities = feMeasuredQuantityMapper.selectList(Wrappers.<FeMeasuredQuantity>lambdaQuery() |
| | | .eq(FeMeasuredQuantity::getPowerStableId, powerStableId)); |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/power-stable.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("measuredQuantityList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | String finalTesterUrl = testerUrl; |
| | | String finalCheckerUrl = checkerUrl; |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("stable", powerStable); |
| | | put("measuredQuantityList", feMeasuredQuantities); |
| | | put("testerUrl", StringUtils.isNotBlank(finalTesterUrl) ? Pictures.ofLocal(imgUrl + "/" + finalTesterUrl).create() : null); |
| | | put("checkerUrl", StringUtils.isNotBlank(finalCheckerUrl) ? Pictures.ofLocal(imgUrl + "/" + finalCheckerUrl).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.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.FeStandardSubstanceAcceptanceInspectionMapper; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptanceInspection; |
| | | import com.ruoyi.require.service.FeStandardSubstanceAcceptanceInspectionService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * éªæ¶å¼ç®±è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:30:09 |
| | | */ |
| | | @Service |
| | | public class FeStandardSubstanceAcceptanceInspectionServiceImpl extends ServiceImpl<FeStandardSubstanceAcceptanceInspectionMapper, FeStandardSubstanceAcceptanceInspection> implements FeStandardSubstanceAcceptanceInspectionService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.ruoyi.require.dto.AcceptanceDto; |
| | | import com.ruoyi.require.mapper.FeStandardSubstanceAcceptanceInspectionMapper; |
| | | import com.ruoyi.require.mapper.FeStandardSubstanceAcceptanceMapper; |
| | | import com.ruoyi.require.mapper.FeStandardSubstanceMapper; |
| | | import com.ruoyi.require.pojo.FeStandardSubstance; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptance; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceAcceptanceInspection; |
| | | import com.ruoyi.require.service.FeStandardSubstanceAcceptanceService; |
| | | import com.ruoyi.require.vo.AcceptanceDetailsVo; |
| | | import com.ruoyi.require.vo.AcceptanceVo; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨éªæ¶ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 03:29:41 |
| | | */ |
| | | @Service |
| | | public class FeStandardSubstanceAcceptanceServiceImpl extends ServiceImpl<FeStandardSubstanceAcceptanceMapper, FeStandardSubstanceAcceptance> implements FeStandardSubstanceAcceptanceService { |
| | | |
| | | @Resource |
| | | private FeStandardSubstanceAcceptanceInspectionMapper feStandardSubstanceAcceptanceInspectionMapper; |
| | | |
| | | @Resource |
| | | private FeStandardSubstanceMapper feStandardSubstanceMapper; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void addAcceptance(AcceptanceDto dto) { |
| | | FeStandardSubstanceAcceptance acceptance = dto.getAcceptance(); |
| | | List<FeStandardSubstanceAcceptanceInspection> list = dto.getList(); |
| | | this.baseMapper.insert(acceptance); |
| | | list.forEach(v->{ |
| | | v.setAcceptanceId(acceptance.getId()); |
| | | feStandardSubstanceAcceptanceInspectionMapper.insert(v); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<AcceptanceVo> getPageAcceptance(Page page, String name) { |
| | | return this.baseMapper.getPageAcceptance(page,name); |
| | | } |
| | | |
| | | @Override |
| | | public AcceptanceDetailsVo getAcceptanceDetails(Integer id) { |
| | | FeStandardSubstanceAcceptance acceptance = this.baseMapper.selectById(id); |
| | | FeStandardSubstance substance = feStandardSubstanceMapper.selectById(acceptance.getSubstanceId()); |
| | | QueryWrapper<FeStandardSubstanceAcceptanceInspection> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("acceptance_id",id); |
| | | List<FeStandardSubstanceAcceptanceInspection> list = feStandardSubstanceAcceptanceInspectionMapper.selectList(queryWrapper); |
| | | AcceptanceDetailsVo vo = new AcceptanceDetailsVo(); |
| | | vo.setSubstance(substance); |
| | | vo.setAcceptance(acceptance); |
| | | vo.setList(list); |
| | | return vo; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Integer deleteAcceptance(Integer id) { |
| | | feStandardSubstanceAcceptanceInspectionMapper.delete(new QueryWrapper<FeStandardSubstanceAcceptanceInspection>() |
| | | .lambda().eq(FeStandardSubstanceAcceptanceInspection::getAcceptanceId,id)); |
| | | return this.baseMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void exportFeStandardSubstanceAcceptance(HttpServletResponse response) { |
| | | List<FeStandardSubstanceAcceptance> list = this.list(); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | try { |
| | | String fileName = URLEncoder.encode("æ åç©è´¨éªæ¶", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | // æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet(0, "æ åç©è´¨éªæ¶").head(FeStandardSubstanceAcceptance.class).build(); |
| | | excelWriter.write(list, writeSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.require.mapper.FeStandardSubstanceMapper; |
| | | import com.ruoyi.require.mapper.FeStandardSubstanceRecordMapper; |
| | | import com.ruoyi.require.pojo.FeStandardSubstance; |
| | | import com.ruoyi.require.pojo.FeStandardSubstanceRecord; |
| | | import com.ruoyi.require.service.FeStandardSubstanceRecordService; |
| | | import com.ruoyi.require.vo.SubstanceRecordVo; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨æ¸
ååç¨å½è¿è®°å½è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-14 01:49:11 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Service |
| | | public class FeStandardSubstanceRecordServiceImpl extends ServiceImpl<FeStandardSubstanceRecordMapper, FeStandardSubstanceRecord> implements FeStandardSubstanceRecordService { |
| | | |
| | | @Resource |
| | | private FeStandardSubstanceMapper feStandardSubstanceMapper; |
| | | |
| | | @Override |
| | | public void borrowSubstance(FeStandardSubstanceRecord feStandardSubstanceRecord) { |
| | | FeStandardSubstance standardSubstance = feStandardSubstanceMapper.selectOne(Wrappers.<FeStandardSubstance>lambdaQuery() |
| | | .eq(FeStandardSubstance::getId, feStandardSubstanceRecord.getSubstanceId()) |
| | | .eq(FeStandardSubstance::getState, 0) |
| | | .last("limit 1")); |
| | | if (ObjectUtils.isEmpty(standardSubstance)){ |
| | | throw new ErrorException("该ç©è´¨å·²è¢«ååºï¼"); |
| | | } |
| | | this.baseMapper.insert(feStandardSubstanceRecord); |
| | | standardSubstance.setState(1); |
| | | feStandardSubstanceMapper.updateById(standardSubstance); |
| | | } |
| | | |
| | | @Override |
| | | public void returnSubstance(FeStandardSubstanceRecord feStandardSubstanceRecord) { |
| | | FeStandardSubstance standardSubstance = feStandardSubstanceMapper.selectOne(Wrappers.<FeStandardSubstance>lambdaQuery() |
| | | .eq(FeStandardSubstance::getId, feStandardSubstanceRecord.getSubstanceId()) |
| | | .eq(FeStandardSubstance::getState, 1)); |
| | | if (ObjectUtils.isEmpty(standardSubstance)){ |
| | | throw new ErrorException("该ç©è´¨æªè¢«é¢ç¨ï¼æ éå½è¿ï¼"); |
| | | } |
| | | standardSubstance.setState(0); |
| | | feStandardSubstanceMapper.updateById(standardSubstance); |
| | | System.out.println(feStandardSubstanceRecord); |
| | | baseMapper.update(feStandardSubstanceRecord, Wrappers.<FeStandardSubstanceRecord>lambdaUpdate() |
| | | .eq(FeStandardSubstanceRecord::getSubstanceId, feStandardSubstanceRecord.getSubstanceId()) |
| | | .eq(FeStandardSubstanceRecord::getStatus, 0)); |
| | | } |
| | | |
| | | @Override |
| | | public List<FeStandardSubstanceRecord> getSubstanceRecord(Integer id) { |
| | | QueryWrapper<FeStandardSubstanceRecord> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("substance_id",id); |
| | | List<FeStandardSubstanceRecord> list = this.baseMapper.selectList(queryWrapper); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SubstanceRecordVo> getPage(Page page, SubstanceRecordVo vo) { |
| | | return this.baseMapper.getPage(page,vo); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.require.mapper.FeStandardSubstanceMapper; |
| | | import com.ruoyi.require.pojo.FeStandardSubstance; |
| | | import com.ruoyi.require.service.FeStandardSubstanceService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ åç©è´¨æ¸
å æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-13 03:58:59 |
| | | */ |
| | | @Service |
| | | public class FeStandardSubstanceServiceImpl extends ServiceImpl<FeStandardSubstanceMapper, FeStandardSubstance> implements FeStandardSubstanceService { |
| | | |
| | | @Override |
| | | public IPage<FeStandardSubstance> page(Page page,FeStandardSubstance feStandardSubstance) { |
| | | return this.baseMapper.getPage(page,feStandardSubstance); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.framework.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.require.dto.FeTempHumDateDto; |
| | | import com.ruoyi.require.dto.FeTempHumRecordDto; |
| | | import com.ruoyi.require.mapper.FeTempHumDateMapper; |
| | | import com.ruoyi.require.pojo.FeTempHumDate; |
| | | import com.ruoyi.require.service.FeTempHumDateService; |
| | | import com.ruoyi.require.service.FeTempHumRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | 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-11-09 11:02:18 |
| | | */ |
| | | @Service |
| | | public class FeTempHumDateServiceImpl extends ServiceImpl<FeTempHumDateMapper, FeTempHumDate> implements FeTempHumDateService { |
| | | |
| | | @Autowired |
| | | private FeTempHumRecordService feTempHumRecordService; |
| | | |
| | | @Override |
| | | public IPage<FeTempHumDateDto> getFeTempHumDate(Page page) { |
| | | return baseMapper.getFeTempHumDate(page); |
| | | } |
| | | |
| | | @Override |
| | | public void exportTemperatureAndHumidityRecords(Integer dateId, HttpServletResponse response) { |
| | | FeTempHumDate feTempHumDate = baseMapper.selectById(dateId); |
| | | IPage<FeTempHumRecordDto> list = feTempHumRecordService.getFeTempHumRecordPage(new Page<>(1, -1), dateId); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | list.getRecords().forEach(i -> { |
| | | i.setMonth(i.getMorningTestTime().getMonth().getValue()); |
| | | i.setMorningTestTimeStr(i.getMorningTestTime().format(formatter)); |
| | | i.setAfternoonTimeStr(i.getAfternoonTime().format(formatter)); |
| | | }); |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/temp_hum_date.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("recordList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("testAreaName", feTempHumDate.getTestAreaName()); |
| | | map.put("experimentalYear", feTempHumDate.getMonthDate().getYear()); |
| | | map.put("experimentalMonth", feTempHumDate.getMonthDate().getMonth().getValue()); |
| | | |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("feTempHum", map); |
| | | put("recordList", list.getRecords()); |
| | | }}); |
| | | |
| | | 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.ruoyi.require.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.ruoyi.require.dto.FeTempHumRecordDto; |
| | | import com.ruoyi.require.mapper.FeTempHumRecordMapper; |
| | | import com.ruoyi.require.pojo.FeTempHumRecord; |
| | | import com.ruoyi.require.service.FeTempHumRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 设æ½åç¯å¢æ¡ä»¶-设æ½åç¯å¢æ¡ä»¶è¦æ±-æ¸©æ¹¿åº¦è®°å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-07 04:28:52 |
| | | */ |
| | | @Service |
| | | public class FeTempHumRecordServiceImpl extends ServiceImpl<FeTempHumRecordMapper, FeTempHumRecord> implements FeTempHumRecordService { |
| | | |
| | | @Override |
| | | public IPage<FeTempHumRecordDto> getFeTempHumRecordPage(Page page, Integer dateId) { |
| | | return baseMapper.getFeTempHumRecordPage(page, dateId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | 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.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.framework.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.require.dto.ForeignRegisterDto; |
| | | import com.ruoyi.require.mapper.ForeignRegisterMapper; |
| | | import com.ruoyi.require.pojo.ForeignRegister; |
| | | import com.ruoyi.require.service.ForeignRegisterService; |
| | | 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.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 夿¥äººåç»è®° æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 07:17:35 |
| | | */ |
| | | @Service |
| | | public class ForeignRegisterServiceImpl extends ServiceImpl<ForeignRegisterMapper, ForeignRegister> implements ForeignRegisterService { |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 夿¥äººåç»è®°å页æ¥è¯¢ |
| | | * @param page |
| | | * @param foreignRegister |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<ForeignRegisterDto> pageForeignRegister(Page page, ForeignRegisterDto foreignRegister) { |
| | | String beginDate = foreignRegister.getBeginDate(); |
| | | String endDate = foreignRegister.getEndDate(); |
| | | foreignRegister.setBeginDate(null); |
| | | foreignRegister.setEndDate(null); |
| | | return baseMapper.pageForeignRegister(page, QueryWrappers.queryWrappers(foreignRegister), beginDate, endDate); |
| | | } |
| | | |
| | | /** |
| | | * 导åºå¤æ¥äººåç»è®° |
| | | * @param foreignRegister |
| | | */ |
| | | @Override |
| | | public void exportForeignRegister(ForeignRegisterDto foreignRegister, HttpServletResponse response) { |
| | | String beginDate = foreignRegister.getBeginDate(); |
| | | String endDate = foreignRegister.getEndDate(); |
| | | foreignRegister.setBeginDate(null); |
| | | foreignRegister.setEndDate(null); |
| | | List<ForeignRegisterDto> register = baseMapper.getForeignRegisterList(QueryWrappers.queryWrappers(foreignRegister), beginDate, endDate); |
| | | |
| | | for (ForeignRegisterDto foreignRegisterDto : register) { |
| | | // æ·»å ååäººåæ¹å人ç¾å |
| | | foreignRegisterDto.setAccompanyingRender(StringUtils.isNotBlank(foreignRegisterDto.getAccompanyingUrl()) |
| | | ? Pictures.ofLocal(imgUrl + "/" + foreignRegisterDto.getAccompanyingUrl()).create() : null); |
| | | foreignRegisterDto.setApproveRender(StringUtils.isNotBlank(foreignRegisterDto.getApproveUrl()) |
| | | ? Pictures.ofLocal(imgUrl + "/" + foreignRegisterDto.getApproveUrl()).create() : null); |
| | | } |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/foreign-register.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("register", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("register", register); |
| | | }}); |
| | | 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.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.IncidentAcceptanceCheckMapper; |
| | | import com.ruoyi.require.pojo.IncidentAcceptanceCheck; |
| | | import com.ruoyi.require.service.IncidentAcceptanceCheckService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IncidentAcceptanceCheckServiceImpl extends ServiceImpl<IncidentAcceptanceCheckMapper, IncidentAcceptanceCheck> implements IncidentAcceptanceCheckService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.IncidentFileMapper; |
| | | import com.ruoyi.require.pojo.IncidentFile; |
| | | import com.ruoyi.require.service.IncidentFileService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IncidentFileServiceImpl extends ServiceImpl<IncidentFileMapper, IncidentFile> implements IncidentFileService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.IncidentInstallMapper; |
| | | import com.ruoyi.require.pojo.IncidentInstall; |
| | | import com.ruoyi.require.service.IncidentInstallService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IncidentInstallServiceImpl extends ServiceImpl<IncidentInstallMapper, IncidentInstall> implements IncidentInstallService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.require.dto.IncidentReportAddDto; |
| | | import com.ruoyi.require.excel.IncidentReportExport; |
| | | import com.ruoyi.require.mapper.IncidentReportMapper; |
| | | import com.ruoyi.require.pojo.*; |
| | | import com.ruoyi.require.service.*; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | 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 { |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | private IncidentSparePartsService incidentSparePartsService; |
| | | private IncidentFileService incidentFileService; |
| | | private IncidentInstallService incidentInstallService; |
| | | private IncidentAcceptanceCheckService incidentAcceptanceCheckService; |
| | | |
| | | private final NumberGenerator<IncidentReport> 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); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.IncidentSparePartsMapper; |
| | | import com.ruoyi.require.pojo.IncidentSpareParts; |
| | | import com.ruoyi.require.service.IncidentSparePartsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IncidentSparePartsServiceImpl extends ServiceImpl<IncidentSparePartsMapper, IncidentSpareParts> implements IncidentSparePartsService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.require.dto.InformationNotificationDto; |
| | | import com.ruoyi.require.mapper.InformationNotificationMapper; |
| | | import com.ruoyi.require.pojo.InformationNotification; |
| | | import com.ruoyi.require.service.InformationNotificationService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ¶æ¯éç¥ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-04-23 02:14:30 |
| | | */ |
| | | @Service |
| | | public class InformationNotificationServiceImpl extends ServiceImpl<InformationNotificationMapper, InformationNotification> implements InformationNotificationService { |
| | | |
| | | @Override |
| | | public IPage<InformationNotificationDto> getPage(Page page, String messageType) { |
| | | return baseMapper.getPage(page, messageType, SecurityUtils.getUserId().intValue()); |
| | | } |
| | | |
| | | @Override |
| | | public void markAllInformationReadOrDeleteAllReadMessages(Boolean isMarkAllInformationRead) { |
| | | if (isMarkAllInformationRead) { |
| | | baseMapper.update(new InformationNotification(), Wrappers.<InformationNotification>lambdaUpdate() |
| | | .set(InformationNotification::getViewStatus, true) |
| | | .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId())); |
| | | } else { |
| | | baseMapper.delete(Wrappers.<InformationNotification>lambdaUpdate() |
| | | .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId()) |
| | | .eq(InformationNotification::getViewStatus, true)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Boolean checkForUnreadData() { |
| | | Map<String, Integer> map1 = null; |
| | | try { |
| | | List<InformationNotification> informationNotifications = baseMapper.selectList( |
| | | Wrappers.<InformationNotification>lambdaQuery() |
| | | .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId()) |
| | | .eq(InformationNotification::getViewStatus, false) |
| | | .last("limit 1")); |
| | | return !informationNotifications.isEmpty(); |
| | | } catch (Exception e) { |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public void triggerModificationStatusToRead(Integer id) { |
| | | baseMapper.update(new InformationNotification(), Wrappers.<InformationNotification>lambdaUpdate() |
| | | .eq(InformationNotification::getId, id) |
| | | .set(InformationNotification::getViewStatus, true)); |
| | | } |
| | | |
| | | @Override |
| | | public int addInformationNotification(InformationNotification informationNotification) { |
| | | return baseMapper.insert(informationNotification); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getNumberFourTypesMessagesHomePage() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Long totalNumberOfMessages = baseMapper.selectCount(Wrappers.<InformationNotification>lambdaQuery() |
| | | .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId())); |
| | | Long totalNumberOfReadMessages = baseMapper.selectCount(Wrappers.<InformationNotification>lambdaQuery() |
| | | .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId()) |
| | | .eq(InformationNotification::getViewStatus, true)); |
| | | LocalDate today = LocalDate.now(); |
| | | LocalDate sevenDaysAgo = today.minusDays(7); |
| | | Long totalNumberOfMessagesInThePastSevenDays = baseMapper.selectCount(Wrappers.<InformationNotification>lambdaQuery() |
| | | .eq(InformationNotification::getConsigneeId, SecurityUtils.getUserId()) |
| | | .between(InformationNotification::getCreateTime, today, sevenDaysAgo)); |
| | | long remainingToDo = totalNumberOfMessages - totalNumberOfReadMessages; |
| | | map.put("totalNumberOfMessages", totalNumberOfMessages); |
| | | map.put("remainingToDo", remainingToDo); |
| | | map.put("totalNumberOfReadMessages", totalNumberOfReadMessages); |
| | | map.put("totalNumberOfMessagesInThePastSevenDays", totalNumberOfMessagesInThePastSevenDays); |
| | | return map; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.lang.UUID; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
| | | import com.alibaba.excel.write.metadata.style.WriteFont; |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.conditions.query.QueryWrapper; |
| | | 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.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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.deepoove.poi.config.ConfigureBuilder; |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.Style; |
| | | import com.deepoove.poi.util.TableTools; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.basic.mapper.StandardProductListMapper; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.basic.vo.StandardProductVO; |
| | | import com.ruoyi.common.constant.ExchangeConstants; |
| | | import com.ruoyi.common.constant.RouterKeyConstants; |
| | | import com.ruoyi.common.core.domain.entity.Custom; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.framework.util.MatrixToImageWriter; |
| | | import com.ruoyi.framework.util.RedisUtil; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.mapper.*; |
| | | import com.ruoyi.inspect.pojo.*; |
| | | import com.ruoyi.inspect.service.InsBushingService; |
| | | import com.ruoyi.inspect.service.InsOrderService; |
| | | import com.ruoyi.inspect.service.InsUnPassService; |
| | | import com.ruoyi.inspect.service.impl.InsOrderServiceImpl; |
| | | import com.ruoyi.framework.util.SheetWriteHandlerUtil; |
| | | import com.ruoyi.inspect.vo.*; |
| | | import com.ruoyi.performance.mapper.AuxiliaryOutputWorkingHoursMapper; |
| | | import com.ruoyi.performance.mapper.PerformanceShiftMapper; |
| | | import com.ruoyi.performance.mapper.ShiftTimeMapper; |
| | | import com.ruoyi.require.handler.*; |
| | | import com.ruoyi.require.pojo.InformationNotification; |
| | | import com.ruoyi.require.service.InformationNotificationService; |
| | | import com.ruoyi.require.service.InsOrderPlanService; |
| | | import com.ruoyi.system.mapper.CustomMapper; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.apache.poi.openxml4j.util.ZipSecureFile; |
| | | import org.apache.poi.ss.usermodel.FillPatternType; |
| | | import org.apache.poi.ss.usermodel.IndexedColors; |
| | | import org.apache.poi.xwpf.usermodel.*; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.net.URLEncoder; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | import java.util.concurrent.locks.ReentrantLock; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * æ£éªä»»å¡-ä¸å¡å®ç°å± |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class InsOrderPlanServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder> implements InsOrderPlanService { |
| | | |
| | | // æ¥åæ«ç è·¯å¾ |
| | | @Value("${phoneQrCode}") |
| | | private String phoneQrCode; |
| | | |
| | | @Resource |
| | | private InsReportServiceImpl insReportService; |
| | | @Resource |
| | | private InsSampleMapper insSampleMapper; |
| | | @Resource |
| | | private InsSampleUserMapper insSampleUserMapper; |
| | | @Resource |
| | | private InsOrderMapper insOrderMapper; |
| | | @Resource |
| | | private InsOrderService insOrderService; |
| | | |
| | | @Resource |
| | | private InsOrderServiceImpl insOrderServiceImpl; |
| | | |
| | | @Resource |
| | | private StandardTemplateService standardTemplateService; |
| | | @Resource |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | @Resource |
| | | private InsProductMapper insProductMapper; |
| | | @Resource |
| | | private ShiftTimeMapper shiftTimeMapper; |
| | | @Resource |
| | | private PerformanceShiftMapper performanceShiftMapper; |
| | | |
| | | @Resource |
| | | private StandardProductListMapper standardProductListMapper; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Value("${twoCode}") |
| | | private String twoCode; |
| | | |
| | | @Resource |
| | | private InsReportMapper insReportMapper; |
| | | |
| | | @Resource |
| | | private InsProductResultMapper insProductResultMapper; |
| | | |
| | | @Resource |
| | | private InsProductUserMapper insProductUserMapper; |
| | | |
| | | @Resource |
| | | private InsUnPassService insUnPassService; |
| | | |
| | | @Resource |
| | | AuxiliaryOutputWorkingHoursMapper auxiliaryOutputWorkingHoursMapper; |
| | | |
| | | @Resource |
| | | private InformationNotificationService informationNotificationService; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private CustomMapper customMapper; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Resource |
| | | private InsBushingService insBushingService; |
| | | |
| | | @Resource |
| | | private InsBushingMapper insBushingMapper; |
| | | |
| | | @Resource |
| | | private InsFiberMapper insFiberMapper; |
| | | |
| | | @Resource |
| | | private InsFibersMapper insFibersMapper; |
| | | |
| | | @Resource |
| | | private InsOrderFileMapper insOrderFileMapper; |
| | | |
| | | @Resource |
| | | private InsReportApproveConfigMapper insReportApproveConfigMapper; |
| | | |
| | | @Autowired |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | |
| | | |
| | | private ReentrantLock lock = new ReentrantLock(); |
| | | |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | |
| | | @Override |
| | | public void exportInsOrderPlanResult(Map<String, Object> data, HttpServletResponse response) { |
| | | List<Map<String,Object>> dataList = new ArrayList<>(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | Object o = getTabHeader(data.get("sonLaboratory").toString(), data.get("samples").toString()).get("tableHeader");// è·åå¨æè¡¨å¤´ |
| | | List<Map<String, Object>> tableHeader = objectMapper.readValue(JSONUtil.toJsonStr(o), new TypeReference<List<Map<String, Object>>>() { |
| | | });// è¡¨å¤´æ°æ® |
| | | Map<String, Object> table = objectMapper.readValue(JSONUtil.toJsonStr(data.get("trendsTable")), new TypeReference<Map<String, Object>>() { |
| | | }); |
| | | List<Map<String, Object>> trendsTable = getInsOrderPlanList(table); // è¡¨æ ¼æ°æ® |
| | | for (Map<String, Object> trend : trendsTable) { |
| | | Map<String, Object> addMap = new HashMap<>(); |
| | | addMap.put("å§æåå·", trend.get("entrustCode")); |
| | | addMap.put("æ ·åç¼å·", trend.get("sampleCode")); |
| | | addMap.put("ç®¡è²æ ", trend.get("bushing")); |
| | | addMap.put("å
çº¤å¸¦è²æ ", trend.get("fibers")); |
| | | addMap.put("å
çº¤è²æ ", trend.get("fiber")); |
| | | addMap.put("æ£éªé¡¹ç®åç±»", trend.get("inspectionItem")); |
| | | addMap.put("å建人", trend.get("userName")); |
| | | addMap.put("æ£æµæ¶é´", trend.get("insTime")); |
| | | addMap.put("ä¸åæ¶é´", trend.get("sendTime")); |
| | | for (Map<String, Object> map : tableHeader) { |
| | | if(Objects.isNull(trend.get(map.get("prop").toString())) || Objects.equals(trend.get(map.get("prop").toString()),"null")) { |
| | | addMap.put(map.get("label").toString(), ""); |
| | | }else { |
| | | addMap.put(map.get("label").toString(), trend.get(map.get("prop").toString())); |
| | | } |
| | | } |
| | | dataList.add(addMap); |
| | | } |
| | | List<List<String>> head = head(tableHeader); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | String fileName = URLEncoder.encode("æ£éªç»æ", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | HorizontalCellStyleStrategy horizontalCellStyleStrategy = |
| | | new HorizontalCellStyleStrategy(getHeadStyle((short) 12),new WriteCellStyle()); |
| | | |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new SheetWriteHandlerUtil(data.get("samples").toString(),head.size())) |
| | | .useDefaultStyle(true).relativeHeadRowIndex(1) |
| | | .registerWriteHandler(horizontalCellStyleStrategy) |
| | | .build(); |
| | | WriteSheet mainSheet = EasyExcel.writerSheet("Sheet0").head(head).build(); |
| | | excelWriter.write(dataList(head,dataList), mainSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¨æè¡¨å¤´ |
| | | * @param tableHeader |
| | | * @return |
| | | */ |
| | | private List<List<String>> head(List<Map<String, Object>> tableHeader) { |
| | | List<List<String>> list = new ArrayList<>(); |
| | | List<String> head0 = new ArrayList<>(); |
| | | head0.add("å§æåå·"); |
| | | List<String> head1 = new ArrayList<>(); |
| | | head1.add("æ ·åç¼å·"); |
| | | List<String> head2 = new ArrayList<>(); |
| | | head2.add("æ£éªé¡¹ç®åç±»"); |
| | | List<String> head3 = new ArrayList<>(); |
| | | head3.add("å建人"); |
| | | List<String> head4 = new ArrayList<>(); |
| | | head4.add("æ£æµæ¶é´"); |
| | | List<String> head5 = new ArrayList<>(); |
| | | head5.add("ä¸åæ¶é´"); |
| | | List<String> head6 = new ArrayList<>(); |
| | | head6.add("ç®¡è²æ "); |
| | | List<String> head7 = new ArrayList<>(); |
| | | head7.add("å
çº¤å¸¦è²æ "); |
| | | List<String> head8 = new ArrayList<>(); |
| | | head8.add("å
çº¤è²æ "); |
| | | |
| | | list.add(head0); |
| | | list.add(head1); |
| | | list.add(head6); |
| | | list.add(head7); |
| | | list.add(head8); |
| | | list.add(head2); |
| | | list.add(head3); |
| | | list.add(head4); |
| | | list.add(head5); |
| | | for (Map<String, Object> map : tableHeader) { |
| | | List<String> head = new ArrayList<>(); |
| | | head.add(map.get("label").toString()); |
| | | list.add(head); |
| | | } |
| | | return list.stream().distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * excelå¯¼åºæ°æ® |
| | | * @param head |
| | | * @param dataList |
| | | * @return |
| | | */ |
| | | private List<List<Object>> dataList(List<List<String>> head,List<Map<String,Object>> dataList) { |
| | | List<List<Object>> list = new ArrayList<>(); |
| | | for(Map<String, Object> map : dataList) { |
| | | List<Object> addList = new ArrayList<>(); |
| | | for(List<String> k : head) { |
| | | if(map.containsKey(k.get(0))) { |
| | | addList.add(map.get(k.get(0))); |
| | | } |
| | | } |
| | | list.add(addList); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 头ççç¥ |
| | | * @return |
| | | */ |
| | | public WriteCellStyle getHeadStyle(Short size){ |
| | | // 头ççç¥ |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | // èæ¯é¢è² |
| | | headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex()); |
| | | headWriteCellStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND); |
| | | // åä½ |
| | | WriteFont headWriteFont = new WriteFont(); |
| | | headWriteFont.setFontName("é»ä½");//设置åä½åå |
| | | headWriteFont.setFontHeightInPoints(size);//设置åä½å¤§å° |
| | | headWriteFont.setBold(true);//åä½å ç² |
| | | headWriteCellStyle.setWriteFont(headWriteFont); //卿 ·å¼ç¨åºç¨è®¾ç½®çåä½; |
| | | |
| | | return headWriteCellStyle; |
| | | } |
| | | @Override |
| | | public List<Map<String, Object>> getInsOrderPlanList(Map<String,Object> data) { |
| | | String sampleType = data.get("sampleType").toString(); |
| | | String sonLaboratory = data.get("sonLaboratory").toString(); |
| | | String entrustCode = data.get("entrustCode").toString(); |
| | | Integer createUser = null; |
| | | String name = ""; |
| | | if(StringUtils.isNotBlank(data.get("createUser").toString())) { |
| | | createUser = Integer.parseInt(data.get("createUser").toString()); |
| | | name = userMapper.selectById(createUser).getName(); |
| | | } |
| | | String sampleCode = data.get("sampleCode").toString(); |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | if(StringUtils.isNotBlank(data.get("insTime").toString()) && !Objects.isNull(data.get("insTime"))) { |
| | | List insTime = objectMapper.readValue(JSONUtil.toJsonStr(data.get("insTime")), List.class); |
| | | startTime = insTime.get(0).toString(); |
| | | endTime = insTime.get(1).toString(); |
| | | } |
| | | // è¡¨å¤´ä¿¡æ¯ |
| | | List<Map<String, Object>> headerS = objectMapper.readValue(JSONUtil.toJsonStr(data.get("headerS")), new TypeReference<List<Map<String, Object>>>() { |
| | | }); |
| | | // 夿æ¯å¦æ¯æ¸©åº¦å¾ªç¯ |
| | | if(sampleType.equals("温度循ç¯")) { |
| | | List<ExportInsProductVO> insOrderTemList = insOrderMapper.getInsOrderTemList(entrustCode, sampleCode, startTime, endTime,name); |
| | | List<TemperatureCycling> temList = insOrderServiceImpl.getTemList(insOrderTemList); |
| | | for (TemperatureCycling map : temList) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | resultMap.put("entrustCode", map.getEntrustCode()); //å§æåå· |
| | | resultMap.put("sampleCode", map.getSampleCode()); //æ ·åç¼å· |
| | | resultMap.put("bushing", map.getBushColor()); //å¥ç®¡ |
| | | resultMap.put("fiber", map.getColor()); //å
纤 |
| | | resultMap.put("fibers", map.getCode()); //å
纤带 |
| | | resultMap.put("userName", map.getCheckName()); //æ£éªäºº |
| | | resultMap.put("insTime", map.getInsTime()); //æ£æµæ¶é´ |
| | | resultMap.put("sendTime", map.getSendTime()); //ä¸åæ¶é´ |
| | | resultMap.put("inspectionItem", map.getSample()); //æ£éªé¡¹ç® |
| | | //温度循ç¯å项 |
| | | resultMap.put("inspectionItems", map.getInspectionItem()); |
| | | resultMap.put("inspectionItemSubclass", map.getInspectionItemSubclass()); |
| | | resultMap.put("attenuationCoefficient1310", map.getAttenuationCoefficient1310()); |
| | | resultMap.put("attenuationDifference1", map.getAttenuationDifference1()); |
| | | resultMap.put("attenuationDifference2", map.getAttenuationDifference2()); |
| | | resultMap.put("attenuationCoefficient1625", map.getAttenuationCoefficient1625()); |
| | | resultMap.put("attenuationDifference3", map.getAttenuationDifference3()); |
| | | resultMap.put("attenuationCoefficient1383", map.getAttenuationCoefficient1383()); |
| | | resultMap.put("attenuationDifference4", map.getAttenuationDifference4()); |
| | | resultMap.put("attenuationCoefficient1490", map.getAttenuationCoefficient1490()); |
| | | resultMap.put("attenuationDifference5", map.getAttenuationDifference5()); |
| | | resultMap.put("attenuationDifferenceMax", map.getAttenuationDifferenceMax()); |
| | | resultMap.put("insResult", map.getInsResult()); |
| | | maps.add(resultMap); |
| | | } |
| | | } |
| | | else { |
| | | List<Map<String, Object>> insOrderPlanList = baseMapper.getInsOrderPlanList(sonLaboratory, entrustCode, sampleCode, createUser, startTime, endTime,sampleType); |
| | | for (Map<String, Object> map : insOrderPlanList) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | resultMap.put("entrustCode", map.get("entrustCode")); //å§æåå· |
| | | resultMap.put("sampleCode", map.get("sampleCode")); //æ ·åç¼å· |
| | | resultMap.put("bushing", map.get("bushing")); //å¥ç®¡ |
| | | resultMap.put("fiber", map.get("fiber")); //å
纤 |
| | | resultMap.put("fibers", map.get("fibers")); //å
纤带 |
| | | resultMap.put("userName", map.get("userName")); //å建人 |
| | | resultMap.put("insTime", map.get("insTime")); //æ£æµæ¶é´ |
| | | resultMap.put("sendTime", map.get("sendTime")); //ä¸åæ¶é´ |
| | | resultMap.put("inspectionItem", map.get("inspectionItem")); //æ£éªé¡¹ç® |
| | | // æ¥ç表头æ¯å¦åå¨å项 |
| | | List<Map<String, Object>> collect = headerS.stream().filter(item -> |
| | | item.get("label").toString().equals(map.get("inspectionItemSubclass").toString())) |
| | | .collect(Collectors.toList()); |
| | | // æå°±åå项 没æå°±åç¶é¡¹ |
| | | if(!collect.isEmpty() && !Objects.isNull(collect)) { |
| | | resultMap.put(collect.get(0).get("prop").toString(), map.get("lastValue"));//æ£éªåé¡¹ç® æ£éªç»æ |
| | | }else { |
| | | List<Map<String, Object>> collect1 = headerS.stream().filter(item -> |
| | | item.get("label").toString().equals(map.get("inspectionItem").toString())) |
| | | .collect(Collectors.toList()); |
| | | if(!collect1.isEmpty() && !Objects.isNull(collect1)) { |
| | | resultMap.put(collect1.get(0).get("prop").toString(), map.get("lastValue"));//æ£éªé¡¹ç® æ£éªç»æ |
| | | } |
| | | } |
| | | maps.add(resultMap); |
| | | } |
| | | |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return maps.stream().distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * è·åå½åç¨æ·çå®éªå®¤ |
| | | * @return |
| | | */ |
| | | private String getCurrentUserLaboratory(){ |
| | | // è·åå½å人æå¨å®éªå®¤ |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | String departLimsId = userMapper.selectById(userId).getDepartLimsId(); |
| | | String laboratory = ""; |
| | | if(StringUtils.isNotBlank(departLimsId)) { |
| | | String[] split = departLimsId.split(","); |
| | | for (String s : split) { |
| | | if (StringUtils.isNotBlank(s) && (!Arrays.asList("1","22").contains(s))) { |
| | | laboratory = insOrderMapper.getDepartment(Integer.parseInt(s)); |
| | | } |
| | | } |
| | | } |
| | | return laboratory; |
| | | } |
| | | |
| | | /** |
| | | * 导åºå§æè´¹ç¨ |
| | | * @param data æ°æ® |
| | | */ |
| | | @Override |
| | | public void exportCommissionFees(Map<String, Object> data,HttpServletResponse response) { |
| | | String laboratory = getCurrentUserLaboratory(); |
| | | // æ¥ææ ¼å¼å |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String start = LocalDateTime.of( |
| | | LocalDate.parse(data.get("startTime").toString(), |
| | | dateTimeFormatter),LocalTime.of(00, 00, 00) |
| | | ).toString(); |
| | | String end = LocalDateTime.of( |
| | | LocalDate.parse(data.get("endTime").toString(), |
| | | dateTimeFormatter),LocalTime.of(23, 59, 59) |
| | | ).toString(); |
| | | // è·åæ°æ® |
| | | String company = data.get("company").toString(); |
| | | List<CommissionFeesDto> list = insOrderMapper.selectCommissionFees(laboratory,company, start, end); |
| | | list = list.stream().map(dto -> { |
| | | Set<String> uniqueTags = new HashSet<>(); |
| | | if (dto.getInsItem().contains(",")) { |
| | | for (String s : dto.getInsItem().split(",")) { |
| | | uniqueTags.add(s.split("@")[0]); |
| | | } |
| | | } else { |
| | | uniqueTags.add(dto.getInsItem().split("@")[0]); |
| | | } |
| | | dto.setInsItem(uniqueTags.toString()); |
| | | return dto; |
| | | }).collect(Collectors.toList()); |
| | | try { |
| | | String fileName = URLEncoder.encode(laboratory+"å§æè´¹ç¨ç»è®¡", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | // æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(),CommissionFeesDto.class).build(); |
| | | // æ ¹æ®å§æåä½è¿è¡sheetåç±» |
| | | Map<String, List<CommissionFeesDto>> collect = list.stream().collect(Collectors.groupingBy(CommissionFeesDto::getCompany)); |
| | | Iterator<Map.Entry<String, List<CommissionFeesDto>>> iterator = collect.entrySet().iterator(); |
| | | int i = 0; |
| | | while(iterator.hasNext()) { |
| | | Map.Entry<String, List<CommissionFeesDto>> entry = iterator.next(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet(i, entry.getKey()).build(); |
| | | excelWriter.write(entry.getValue(), writeSheet); |
| | | i++; |
| | | } |
| | | // WriteSheet writeSheet = EasyExcel.writerSheet().head(CommissionFeesDto.class).build(); |
| | | // excelWriter.write(list, writeSheet); |
| | | |
| | | // å°æ°æ®åå
¥ |
| | | excelWriter.finish(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void exportUnInsProducts(UnInsProductsDTO unInsProductsDTO, HttpServletResponse response) { |
| | | String laboratory = getCurrentUserLaboratory(); |
| | | //æ¥ææ ¼å¼å |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | LocalDateTime startDateTime = LocalDateTime.of(LocalDate.parse(unInsProductsDTO.getStartDate(),dateTimeFormatter),LocalTime.MIN); |
| | | LocalDateTime endDateTime = LocalDateTime.of(LocalDate.parse(unInsProductsDTO.getEndDate(),dateTimeFormatter),LocalTime.MAX); |
| | | |
| | | // è·åæ°æ® |
| | | List<UnInsProductsVO> list = baseMapper.selectUnInsProducts(laboratory, startDateTime, endDateTime,unInsProductsDTO); |
| | | try { |
| | | String fileName = URLEncoder.encode(laboratory+"å¾
æ£ä»»å¡ç»è®¡", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | // æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet().head(UnInsProductsVO.class).build(); |
| | | excelWriter.write(list, writeSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public IPage<TasksShowDto> tasksShow(Page page, String sonLaboratory) { |
| | | IPage tasksShow = insOrderMapper.getTasksShow(page, sonLaboratory); |
| | | return tasksShow; |
| | | } |
| | | |
| | | @Override |
| | | public int getCurrentMonthPlanTotalBySonLaboratory(String sonLaboratory,LocalDateTime startTime, LocalDateTime endTime) { |
| | | if(StringUtils.isNotBlank(sonLaboratory)){ |
| | | if(Objects.isNull(startTime) || Objects.isNull(endTime)) { |
| | | //è·å彿çå¼å§åç»ææ¶é´ |
| | | // 彿çå¼å§æ¶é´ï¼ç¬¬ä¸å¤© 00:00:00ï¼ |
| | | startTime = LocalDate.now() |
| | | .withDayOfMonth(1) |
| | | .atStartOfDay(); |
| | | |
| | | // 彿çç»ææ¶é´ï¼æåä¸å¤© 23:59:59.999999999ï¼ |
| | | endTime = LocalDate.now() |
| | | .with(TemporalAdjusters.lastDayOfMonth()) |
| | | .atTime(LocalTime.MAX); |
| | | } |
| | | //æ¥è¯¢å½æè¯¥åè¯éªå®¤çæ»ä»»å¡æ¡æ° |
| | | return baseMapper.selectPlanCountBySonLaboratory(sonLaboratory,startTime,endTime); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getTabHeader(String sonLaboratory,String samples) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | List<String> list = new ArrayList<>(); |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(samples)) { |
| | | samples = "[" + "\"" + samples + "\""; |
| | | } |
| | | List<Map<String, Object>> tabHeader = baseMapper.getTabHeader(sonLaboratory,samples); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Long count = 1l; |
| | | for (Map<String, Object> map : tabHeader) { |
| | | try { |
| | | List<List<String>> sample = objectMapper.readValue(JSONUtil.toJsonStr(map.get("sample").toString()), new TypeReference<List<List<String>>>() { |
| | | }); |
| | | // è·åtab页表头 |
| | | for (List<String> strings : sample) { |
| | | list.add(strings.get(0)); |
| | | } |
| | | // è·åè¡¨æ ¼è¡¨å¤´ |
| | | if(StringUtils.isNotBlank(samples)) { |
| | | if(map.containsKey("inspectionItemSubclass")) { |
| | | if(StringUtils.isNotBlank(map.get("inspectionItemSubclass").toString())) { |
| | | HashMap<String, Object> map1 = new HashMap<>(); |
| | | map1.put("label", map.get("inspectionItemSubclass").toString()); // label |
| | | map1.put("prop","lastValue"+count); // prop |
| | | maps.add(map1); |
| | | }else { |
| | | HashMap<String, Object> map1 = new HashMap<>(); |
| | | map1.put("label", map.get("inspectionItem").toString()); // label |
| | | map1.put("prop","lastValue"+count); // prop |
| | | maps.add(map1); |
| | | } |
| | | }else { |
| | | HashMap<String, Object> map1 = new HashMap<>(); |
| | | map1.put("label", map.get("inspectionItem").toString()); // label |
| | | map1.put("prop","lastValue"+count); // prop |
| | | maps.add(map1); |
| | | } |
| | | count++; |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | if (samples.contains("温度循ç¯")){ |
| | | addElementToMaps(maps, "å¾ªç¯æ¬¡æ°", "inspectionItems"); |
| | | addElementToMaps(maps, "温度ç¹", "inspectionItemSubclass"); |
| | | addElementToMaps(maps, "è¡°åç³»æ°1310", "attenuationCoefficient1310"); |
| | | addElementToMaps(maps, "è¡°åå·®1", "attenuationDifference1"); |
| | | addElementToMaps(maps, "è¡°åç³»æ°1550", "attenuationCoefficient1550"); |
| | | addElementToMaps(maps, "è¡°åå·®2", "attenuationDifference2"); |
| | | addElementToMaps(maps, "è¡°åç³»æ°1625", "attenuationCoefficient1625"); |
| | | addElementToMaps(maps, "è¡°åå·®3", "attenuationDifference3"); |
| | | addElementToMaps(maps, "è¡°å1383", "attenuationCoefficient1383"); |
| | | addElementToMaps(maps, "è¡°åå·®4", "attenuationDifference4"); |
| | | addElementToMaps(maps, "è¡°å1490", "attenuationCoefficient1490"); |
| | | addElementToMaps(maps, "è¡°åå·®5", "attenuationDifference5"); |
| | | addElementToMaps(maps, "è¡°åå·®Max", "attenuationDifferenceMax"); |
| | | addElementToMaps(maps, "æ¯å¦åæ ¼", "insResult"); |
| | | } |
| | | |
| | | Map<String, Map<String, Object>> uniqueByLabel = maps.stream() |
| | | .collect(Collectors.toMap( |
| | | map -> (String) map.get("label"), |
| | | map -> map, |
| | | (existing, replacement) -> existing, // ä¿ç第ä¸ä¸ªéå°çMap |
| | | LinkedHashMap::new |
| | | )); |
| | | // å°ç»æè½¬æ¢åList<Map<String, Object>> |
| | | List<Map<String, Object>> collect1 = new ArrayList<>(uniqueByLabel.values()); |
| | | // List<Map<String, Object>> collect1 = maps.stream().distinct().collect(Collectors.toList()); |
| | | List<String> collect = list.stream().distinct().collect(Collectors.toList()); |
| | | collect.add("温度循ç¯"); |
| | | resultMap.put("tabHeader", collect); |
| | | resultMap.put("tableHeader", collect1); |
| | | return resultMap; |
| | | } |
| | | |
| | | private static void addElementToMaps(List<Map<String, Object>> maps, String label, String prop) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("label", label); |
| | | map.put("prop", prop); |
| | | maps.add(map); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<InsOrderPlanVO> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) { |
| | | User user = userMapper.selectById(SecurityUtils.getUserId());//å½åç»å½ç人 |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.isEmpty()) { |
| | | String[] split = departLimsId.split(","); |
| | | //æ¥è¯¢å¯¹åºæ¶æåç§°(éä¿¡å®éªå®¤,çµåå®éªå®¤,æ£æµå) |
| | | String departLims = baseMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("å®éªå®¤")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | |
| | | String checkName = null; |
| | | String userName = null; |
| | | if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserId())) { |
| | | userName = userMapper.selectById(SecurityUtils.getUserId()).getName(); |
| | | if(Objects.equals(insOrderPlanDTO.getInsState(),"3")) { |
| | | userName = ""; |
| | | checkName = userMapper.selectById(SecurityUtils.getUserId()).getName(); |
| | | } |
| | | insOrderPlanDTO.setUserId(null); |
| | | } |
| | | InsOrderPlanDTO planDTO = new InsOrderPlanDTO(); |
| | | QueryWrapper<InsOrderPlanDTO> wrappers = QueryWrappers.queryWrappers(planDTO); |
| | | IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder( |
| | | page, |
| | | userName, |
| | | checkName, |
| | | insOrderPlanDTO.getSonLaboratory(), |
| | | insOrderPlanDTO.getSample(), |
| | | insOrderPlanDTO.getSampleCode(), |
| | | laboratory, |
| | | insOrderPlanDTO.getEntrustCode(), |
| | | insOrderPlanDTO.getInsState(), |
| | | wrappers, |
| | | insOrderPlanDTO.getSendTimeRange() |
| | | ); |
| | | return insOrderPage; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<InsOrderPlanTaskSwitchVo> inspectionOrderDetailsTaskSwitching(Page page, InsOrderPlanDTO insOrderPlanDTO) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | User user = userMapper.selectById(userId);//å½åç»å½ç人 |
| | | |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.equals("")) { |
| | | String[] split = departLimsId.split(","); |
| | | //æ¥è¯¢å¯¹åºæ¶æåç§°(éä¿¡å®éªå®¤,çµåå®éªå®¤,æ£æµå) |
| | | String departLims = baseMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("å®éªå®¤")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserId())) { |
| | | insOrderPlanDTO.setUserId(userId.longValue()); |
| | | } |
| | | String sonLaboratory = insOrderPlanDTO.getSonLaboratory();//è¯éªå®¤ |
| | | IPage<InsOrderPlanTaskSwitchVo> insOrderPage = insSampleMapper.inspectionOrderDetailsTaskSwitching(page, QueryWrappers.queryWrappers(insOrderPlanDTO), userId, sonLaboratory, laboratory); |
| | | return insOrderPage; |
| | | } |
| | | |
| | | //认é¢ä»»å¡ |
| | | @Override |
| | | public boolean claimInsOrderPlan(InsOrderPlanDTO entity) { |
| | | if (Objects.isNull(entity)) { |
| | | return false; |
| | | } |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | InsSampleUser insSampleUser = new InsSampleUser(entity.getInsSampleId().intValue(), userId, 0, entity.getSonLaboratory()); |
| | | return insSampleUserMapper.insert(insSampleUser) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> doInsOrder(Integer id, String laboratory) { |
| | | // InsOrder insOrder = new InsOrder(); |
| | | // insOrder.setId(id); |
| | | |
| | | InsOrder order = insOrderMapper.selectById(id); |
| | | InsOrderState insOrderState = insOrderStateMapper.selectOne(new LambdaQueryWrapper<InsOrderState>() |
| | | .eq(InsOrderState::getInsOrderId, id) |
| | | .eq(InsOrderState::getLaboratory, laboratory)); |
| | | |
| | | if (BeanUtil.isEmpty(insOrderState.getInsTime())) { |
| | | order.setInsTime(LocalDateTime.now()); |
| | | insOrderMapper.updateById(order); |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate().eq(InsOrderState::getInsOrderId, id).eq(InsOrderState::getLaboratory, laboratory).set(InsOrderState::getInsTime, LocalDateTime.now()).set(InsOrderState::getInsState, 1)); |
| | | } |
| | | Map<String, Object> map = insOrderService.getInsOrderAndSample(id, laboratory); |
| | | List<SampleProductDto> list = JSON.parseArray(JSON.toJSONString(map.get("sampleProduct")), SampleProductDto.class); |
| | | for (SampleProductDto samples : list) { |
| | | if (BeanUtil.isEmpty(samples.getInsProduct())) continue; |
| | | samples.setBushing(insBushingService.selectBushingBySampleId(samples.getId())); |
| | | } |
| | | map.put("sampleProduct", list.stream().sorted(Comparator.comparing(SampleProductDto::getId)).collect(Collectors.toList())); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<InsProduct> getInsProduct(Integer id, Integer type, String laboratory, HttpServletRequest request) { |
| | | List<InsProduct> insProducts = new ArrayList<>(); |
| | | switch (type) { |
| | | case 0: |
| | | //æ ·å |
| | | insProducts = insSampleMapper.getInsProduct1(id, laboratory); |
| | | if(!insProducts.isEmpty()) { |
| | | boolean flag = false; |
| | | for(InsProduct insProduct : insProducts) { |
| | | if("温度循ç¯".equals(insProduct.getInspectionItem())) { |
| | | flag = true; |
| | | break; |
| | | } |
| | | } |
| | | if(flag) { |
| | | insProducts = insSampleMapper.getInsProduct5(id, laboratory); |
| | | } |
| | | } |
| | | break; |
| | | case 1: |
| | | //å
纤带 |
| | | insProducts = insSampleMapper.getInsProduct2(id, laboratory); |
| | | break; |
| | | case 2: |
| | | //å
纤 |
| | | insProducts = insSampleMapper.getInsProduct3(id, laboratory); |
| | | break; |
| | | case 3: |
| | | //å¥ç®¡ |
| | | insProducts = insSampleMapper.getInsProduct4(id, laboratory); |
| | | break; |
| | | } |
| | | |
| | | //妿æ¯å¤§æ ·åä¸ç项ç®ä¸ºç©º,é£ä¹æ¥è¯¢ç¬¬ä¸ä¸ªå
纤çé¡¹ç® |
| | | if (ObjectUtils.isEmpty(insProducts) && type == 0) { |
| | | //æ¥è¯¢ç¬¬ä¸ä¸ªå
纤çid |
| | | List<InsFiber> insFibers = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery() |
| | | .eq(InsFiber::getInsBushingId, insBushingMapper.selectList(Wrappers.<InsBushing>lambdaQuery() |
| | | .eq(InsBushing::getInsSampleId, id) |
| | | .isNotNull(InsBushing::getStandNum) |
| | | .isNotNull(InsBushing::getTestNum)).get(0).getId())); |
| | | if(CollectionUtils.isNotEmpty(insFibers)) { |
| | | insProducts = insSampleMapper.getInsProduct3(insFibers.get(0).getId(),laboratory); |
| | | } |
| | | // 妿å
纤ä¸ç项ç®ä¸ºç©º,é£ä¹æ¥è¯¢ç¬¬ä¸ä¸ªå
纤带çé¡¹ç® |
| | | else { |
| | | List<InsFibers> insFibersS = insFibersMapper.selectList(Wrappers.<InsFibers>lambdaQuery() |
| | | .eq(InsFibers::getInsBushingId, insBushingMapper.selectList(Wrappers.<InsBushing>lambdaQuery() |
| | | .eq(InsBushing::getInsSampleId, id) |
| | | .isNotNull(InsBushing::getTestNum) |
| | | ).get(0).getId())); |
| | | //妿å
纤带ä¸ä¸ºç©ºï¼æ¥è¯¢å
çº¤å¸¦ä¸æ¯å¦é
æå
纤 |
| | | if(!insFibersS.isEmpty()){ |
| | | List<InsFiber> insFiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsFibersId, insFibersS.get(0).getId())); |
| | | if(!insFiberList.isEmpty()){ |
| | | insProducts = insSampleMapper.getInsProduct3(insFiberList.get(0).getId(),laboratory); |
| | | }else{ |
| | | insProducts = insSampleMapper.getInsProduct6(insFibersS.get(0).getId(),laboratory); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | Set<Integer> set = new HashSet<>(); |
| | | Map<Integer, String> map2 = new HashMap<>(); |
| | | if (BeanUtil.isEmpty(insProducts)) return null; |
| | | getTemplateThing(set, map2, insProducts); |
| | | return insProducts; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> checkSubmitPlan(Integer orderId, String laboratory,String temperature,String humidity) { |
| | | List<String> collect = new ArrayList<>(); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId)); |
| | | List<Integer> ids = insSamples.stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, ids) |
| | | .eq(InsProduct::getSonLaboratory, laboratory) |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsResult, 0)); |
| | | if (insProducts.size() > 0) { |
| | | collect = insProducts.stream().map(insProduct -> { |
| | | return insProduct.getInspectionItem() + "-" + insProduct.getInspectionItemSubclass(); |
| | | }).collect(Collectors.toList()); |
| | | insProductMapper.update(null,new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getTemperature,temperature) |
| | | .set(InsProduct::getHumidity,humidity) |
| | | .in(InsProduct::getInsSampleId,ids)); |
| | | } |
| | | return collect; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<InsOrderFile> getFileList(Page page, InsOrderFile insOrderFile) { |
| | | Integer insOrderId = insOrderFile.getInsOrderId(); |
| | | insOrderFile.setInsOrderId(null); |
| | | IPage<InsOrderFile> insOrderFileIPage = insOrderFileMapper.getFileList(page, QueryWrappers.queryWrappers(insOrderFile),insOrderId); |
| | | return insOrderFileIPage; |
| | | } |
| | | |
| | | @Override |
| | | public int uploadFile(Integer orderId, MultipartFile file) { |
| | | String urlString; |
| | | String pathName; |
| | | String path; |
| | | String filename = file.getOriginalFilename(); |
| | | String contentType = file.getContentType(); |
| | | InsOrderFile insOrderFile = new InsOrderFile(); |
| | | insOrderFile.setInsOrderId(orderId); |
| | | insOrderFile.setFileName(filename); |
| | | if (contentType != null && contentType.startsWith("image/")) { |
| | | // æ¯å¾ç |
| | | path = imgUrl; |
| | | insOrderFile.setType(1); |
| | | } else { |
| | | // æ¯æä»¶ |
| | | path = wordUrl; |
| | | insOrderFile.setType(2); |
| | | } |
| | | try { |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = UUID.randomUUID() + "_" + file.getOriginalFilename(); |
| | | urlString = realpath + "/" + pathName; |
| | | file.transferTo(new File(urlString)); |
| | | insOrderFile.setFileUrl(pathName); |
| | | return insOrderFileMapper.insert(insOrderFile); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.err.println("éä»¶ä¸ä¼ é误"); |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | //åæ¢è®°å½æ¨¡çæ¥è¯¢æ£éªå
容 |
| | | @Override |
| | | public Map<String, Object> getReportModel(Integer sampleId, String sonLaboratory) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //å
æ¥åºå¥ç®¡ |
| | | List<InsBushing> insBushings = insBushingMapper.selectList(Wrappers.<InsBushing>lambdaQuery().eq(InsBushing::getInsSampleId, sampleId)); |
| | | List<InsFibersVO> fibers = new ArrayList<>(); |
| | | List<InsFiber> fiber = new ArrayList<>(); |
| | | List<InsBushing> bush = new ArrayList<>(); |
| | | for (InsBushing insBushing : insBushings) { |
| | | //ä¿åå¥ç®¡(æ¾å¥ç®¡) |
| | | List<InsProduct> insProductsByBush = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsBushId, insBushing.getId()) |
| | | .eq(InsProduct::getSonLaboratory,sonLaboratory) |
| | | .eq(InsProduct::getState,1) |
| | | .and(i->i.like(InsProduct::getInspectionItem,"æ¾å¥ç®¡") |
| | | .or() |
| | | .like(InsProduct::getInspectionItemSubclass,"æ¾å¥ç®¡")) |
| | | ); |
| | | List<Integer> collectByBush = insProductsByBush.stream() |
| | | .map(InsProduct::getInsResult) |
| | | .filter(sm -> ObjectUtils.isNotEmpty(sm) && sm != 2).collect(Collectors.toList()); |
| | | //1ï¼å·²æ£éªï¼0ï¼æªæ£éª,2:卿£ |
| | | int bushState = 0; |
| | | if(insProductsByBush.size() == collectByBush.size()){ |
| | | bushState = 1; |
| | | }else if(!collectByBush.isEmpty() && collectByBush.size()<insProductsByBush.size()){ |
| | | bushState = 2; |
| | | } |
| | | insBushing.setState(bushState); |
| | | if(!insProductsByBush.isEmpty()){ |
| | | bush.add(insBushing); |
| | | } |
| | | //åæ¥è¯¢åºææçå
纤带 |
| | | List<InsFibers> insFibers = insFibersMapper.selectList(Wrappers.<InsFibers>lambdaQuery().eq(InsFibers::getInsBushingId, insBushing.getId())); |
| | | |
| | | List<InsFiber> insFiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsBushingId, insBushing.getId())); |
| | | if (CollectionUtils.isNotEmpty(insFibers)) { |
| | | for (InsFibers insFiberS : insFibers) { |
| | | //æ¥è¯¢å
纤带ä¸çå
纤é
ç½® |
| | | List<InsFiber> fiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsFibersId, insFiberS.getId())); |
| | | if(fiberList.isEmpty()){ |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState,1) |
| | | .eq(InsProduct::getSonLaboratory,sonLaboratory) |
| | | .eq(InsProduct::getInsFibersId, insFiberS.getId())); |
| | | // è¿æ»¤å
纤æ¥å¤´æè |
| | | if(CollectionUtils.isNotEmpty(insProducts)) { |
| | | insProducts = insProducts.stream().filter(item -> !item.getInspectionItem().equals("å
纤æ¥å¤´æè")).collect(Collectors.toList()); |
| | | } |
| | | //设置å¥ç®¡çæ£éªç¶æ |
| | | insFiberS.setState(getInsState(insProducts)); |
| | | InsFibersVO insFibersVO = new InsFibersVO(); |
| | | BeanUtil.copyProperties(insFiberS,insFibersVO); |
| | | insFibersVO.setIsExistProduct(!insProducts.isEmpty());//æ¯å¦å卿£éªé¡¹ |
| | | insFibersVO.setBushingColor(insBushing.getColor()); |
| | | //妿å
纤带ä¸çé¡¹ç®æ²¡æå
纤æ¥å¤´æè项ç®ï¼ææ·»å å
çº¤å¸¦ä¿¡æ¯ |
| | | if(CollectionUtils.isNotEmpty(insProducts)) { |
| | | fibers.add(insFibersVO); |
| | | } |
| | | }else{ |
| | | InsFibersVO insFibersVO = new InsFibersVO(); |
| | | BeanUtil.copyProperties(insFiberS,insFibersVO); |
| | | insFibersVO.setBushingColor(insBushing.getColor()); |
| | | //æ¥è¯¢å
纤带ä¸çæ£éªé¡¹ |
| | | List<InsProduct> fibersProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState,1) |
| | | .eq(InsProduct::getSonLaboratory,sonLaboratory) |
| | | .eq(InsProduct::getInsFibersId, insFiberS.getId())); |
| | | insFibersVO.setIsExistProduct(!fibersProducts.isEmpty());//æ¯å¦å卿£éªé¡¹ |
| | | if(!fibersProducts.isEmpty()){ |
| | | //设置å
çº¤å¸¦è²æ çæ£éªç¶æ |
| | | insFibersVO.setState(getInsState(fibersProducts)); |
| | | } |
| | | //æ·»å å
çº¤å¸¦ä¿¡æ¯ |
| | | fibers.add(insFibersVO); |
| | | for (InsFiber insFiber : fiberList) { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState,1) |
| | | .eq(InsProduct::getSonLaboratory,sonLaboratory) |
| | | .eq(InsProduct::getInsFiberId, insFiber.getId())); |
| | | // è¿æ»¤å
纤æ¥å¤´æè |
| | | if(CollectionUtils.isNotEmpty(insProducts)) { |
| | | insProducts = insProducts.stream().filter(item -> !item.getInspectionItem().equals("å
纤æ¥å¤´æè")).collect(Collectors.toList()); |
| | | } |
| | | //设置å
çº¤è²æ çæ£éªç¶æ |
| | | insFiber.setState(getInsState(insProducts)); |
| | | //妿å
纤ä¸çé¡¹ç®æ²¡æå
纤æ¥å¤´æè项ç®ï¼ææ·»å å
çº¤ä¿¡æ¯ |
| | | if(CollectionUtils.isNotEmpty(insProducts)) { |
| | | fiber.add(insFiber); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //妿å¥ç®¡ä¸æ²¡æå
çº¤å¸¦å°±åªæå
çº¤äº |
| | | else if (CollectionUtils.isNotEmpty(insFiberList)) { |
| | | for (InsFiber insFiber : insFiberList) { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState,1) |
| | | .eq(InsProduct::getSonLaboratory,sonLaboratory) |
| | | .eq(InsProduct::getInsFiberId, insFiber.getId())); |
| | | // è¿æ»¤å
纤æ¥å¤´æè |
| | | if(CollectionUtils.isNotEmpty(insProducts)) { |
| | | insProducts = insProducts.stream().filter(item -> !item.getInspectionItem().equals("å
纤æ¥å¤´æè")).collect(Collectors.toList()); |
| | | } |
| | | //设置å
çº¤è²æ çæ£éªç¶æ |
| | | insFiber.setState(getInsState(insProducts)); |
| | | if(CollectionUtils.isNotEmpty(insProducts)){ |
| | | fiber.add(insFiber); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | map.put("å
纤带", fibers); |
| | | map.put("å
纤", fiber); |
| | | map.put("å¥ç®¡", bush); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 夿æ£éªé¡¹æ¯å¦æ£æµå®ï¼è¿åæ£æµç¶æ |
| | | * @param insProducts |
| | | * @return |
| | | */ |
| | | private Integer getInsState(List<InsProduct> insProducts){ |
| | | List<Integer> collect = insProducts.stream().map(InsProduct::getInsResult) |
| | | .filter(sm -> ObjectUtils.isNotEmpty(sm) && sm != 2).collect(Collectors.toList()); |
| | | if (insProducts.size() == collect.size()) { |
| | | return 1;//å·²æ£éª |
| | | } else if(!collect.isEmpty() && collect.size()<insProducts.size()){ |
| | | return 2;//卿£éª |
| | | } |
| | | return 0;//æªæ£éª |
| | | } |
| | | |
| | | //æ¸©åº¦å¾ªç¯æ¥çåè¡¨æ°æ®(å
æ¬éè¿æ ·åid,å¾ªç¯æ¬¡æ°,温度,å¾ªç¯æ¬¡æ°è¿è¡çé) |
| | | @Override |
| | | public Map<String, Object> temCycle(Integer sampleId, String inspectionItem, String inspectionItemSubclass) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //æ ·åä¿¡æ¯ |
| | | SampleVo sampleVo = insSampleMapper.getDetailById(sampleId); |
| | | map.put("sampleVo", sampleVo); |
| | | List<ProductVo> productVos = new ArrayList<>(); |
| | | //å
æ¥åºè¿ä¸ªæ ·å䏿åªäºç®¡è²æ ,å
纤带,å
çº¤è²æ |
| | | //å
æ¥åºå¥ç®¡ |
| | | List<InsBushing> insBushings = insBushingMapper.selectList(Wrappers.<InsBushing>lambdaQuery().eq(InsBushing::getInsSampleId, sampleId)); |
| | | if (insBushings.size() > 0) { |
| | | //éä¿¡--æ¸©åº¦å¾ªç¯ |
| | | for (InsBushing insBushing : insBushings) { |
| | | //åæ¥è¯¢åºææçå
纤带 |
| | | List<InsFibers> insFibers = insFibersMapper.selectList(Wrappers.<InsFibers>lambdaQuery().eq(InsFibers::getInsBushingId, insBushing.getId())); |
| | | if (CollectionUtils.isNotEmpty(insFibers)) { |
| | | for (InsFibers insFiber : insFibers) { |
| | | //æ¥åºå
çº¤å¸¦ä¸ææçå
纤 |
| | | List<InsFiber> fiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsFibersId, insFiber.getId())); |
| | | for (InsFiber fiber : fiberList) { |
| | | //åæ ¹æ®å
³èçå
纤é
ç½®çidåå¾ªç¯æ¬¡æ°åæ¸©åº¦åæ ·åidè¿è¡æ¥è¯¢æ£éªé¡¹ç® |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sampleId) |
| | | .eq(InsProduct::getInspectionItem, inspectionItem) |
| | | .eq(InsProduct::getInspectionItemSubclass, inspectionItemSubclass) |
| | | .eq(InsProduct::getInsFiberId, fiber.getId())); |
| | | for (InsProduct insProduct : insProducts) { |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | ProductVo productVo = new ProductVo(); |
| | | productVo.setCode(insFiber.getCode()); |
| | | productVo.setColor(fiber.getColor()); |
| | | productVo.setBushColor(insBushing.getColor()); |
| | | if (ObjectUtils.isNotEmpty(insProductResult)) { |
| | | insProduct.setInsProductResult(insProductResult); |
| | | } |
| | | //æ±åçæ¡ä»¶ä¸1次循ç¯20度常温ç计ç®å¼ |
| | | InsProductResult insProductResult1 = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sampleId) |
| | | .eq(InsProduct::getInspectionItem, "1") |
| | | .eq(InsProduct::getInspectionItemSubclass, "20â(常温)") |
| | | .eq(InsProduct::getInspectionItemClass, insProduct.getInspectionItemClass()) |
| | | .eq(InsProduct::getInsFiberId, fiber.getId())).getId())); |
| | | if (ObjectUtils.isNotEmpty(insProductResult1) && !insProductResult1.getComValue().equals("[]")) { |
| | | String[] splitStr = insProductResult1.getComValue().split(":"); |
| | | insProduct.setComplue(splitStr[splitStr.length-1].split("\"")[1]); |
| | | } |
| | | productVo.setInsProduct(insProduct); |
| | | productVos.add(productVo); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | //妿å¥ç®¡ä¸æ²¡æå
çº¤å¸¦å°±åªæå
çº¤äº |
| | | List<InsFiber> insFiberList = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsBushingId, insBushing.getId())); |
| | | for (InsFiber fiber : insFiberList) { |
| | | //åæ ¹æ®å
³èçå
纤é
ç½®çidåå¾ªç¯æ¬¡æ°åæ¸©åº¦åæ ·åidè¿è¡æ¥è¯¢æ£éªé¡¹ç® |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sampleId) |
| | | .eq(InsProduct::getInspectionItem, inspectionItem) |
| | | .eq(InsProduct::getInspectionItemSubclass, inspectionItemSubclass) |
| | | .eq(InsProduct::getInsFiberId, fiber.getId())); |
| | | for (InsProduct insProduct : insProducts) { |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | ProductVo productVo = new ProductVo(); |
| | | productVo.setCode("-"); |
| | | productVo.setColor(fiber.getColor()); |
| | | productVo.setBushColor(fiber.getBushColor()); |
| | | insProduct.setInsProductResult(insProductResult); |
| | | //æ±åçæ¡ä»¶ä¸1次循ç¯20度常温ç计ç®å¼ |
| | | InsProductResult insProductResult1 = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sampleId) |
| | | .eq(InsProduct::getInspectionItem, "1") |
| | | .eq(InsProduct::getInspectionItemSubclass, "20â(常温)") |
| | | .eq(InsProduct::getInspectionItemClass, insProduct.getInspectionItemClass()) |
| | | .eq(InsProduct::getInsFiberId, fiber.getId())).getId())); |
| | | if (ObjectUtils.isNotEmpty(insProductResult1) && !insProductResult1.getComValue().equals("[]")) { |
| | | String[] splitStr = insProductResult1.getComValue().split(":"); |
| | | insProduct.setComplue(splitStr[splitStr.length-1].split("\"")[1]); |
| | | } |
| | | productVo.setInsProduct(insProduct); |
| | | productVos.add(productVo); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | productVos = productVos.stream().sorted(Comparator.comparing(productVo -> productVo.getInsProduct().getInspectionItemClass())).collect(Collectors.toList()); |
| | | } else { |
| | | //çµå--ç循ç¯å温åè¯éª |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, sampleId) |
| | | .eq(InsProduct::getInspectionItem, inspectionItem)); |
| | | for (InsProduct insProduct : insProducts) { |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | ProductVo productVo = new ProductVo(); |
| | | if (ObjectUtils.isNotEmpty(insProductResult)) { |
| | | insProduct.setInsProductResult(insProductResult); |
| | | } |
| | | productVo.setInsProduct(insProduct); |
| | | productVos.add(productVo); |
| | | } |
| | | } |
| | | map.put("productVos", productVos); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> upPlanUser2(Integer orderId) { |
| | | List<Integer> sampleId = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)).stream().map(InsSample::getId).collect(Collectors.toList()); |
| | | List<String> sonLaboratory = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getState, 1).in(InsProduct::getInsSampleId, sampleId)).stream().map(InsProduct::getSonLaboratory).distinct().collect(Collectors.toList()); |
| | | return sonLaboratory; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getSagTemperatureProducts(Integer sampleId) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //æ ·åä¿¡æ¯ |
| | | SampleVo sampleVo = insSampleMapper.getDetailById(sampleId); |
| | | map.put("sampleVo", sampleVo); |
| | | //çµå:å¼§å-æ¸©åº¦ç¹æ®é¡¹ |
| | | List<ProductVo> productVos = new ArrayList<>(); |
| | | List<InsProduct> insProducts = insProductMapper.findSagTemperatureProducts(sampleId,"å¼§å-温度"); |
| | | for (InsProduct insProduct : insProducts) { |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | ProductVo productVo = new ProductVo(); |
| | | if (ObjectUtils.isNotEmpty(insProductResult)) { |
| | | insProduct.setInsProductResult(insProductResult); |
| | | } |
| | | productVo.setInsProduct(insProduct); |
| | | productVos.add(productVo); |
| | | } |
| | | map.put("productVos", productVos); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getSampleInfoByOrderId(Integer orderId,String sonLaboratory) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(!Objects.isNull(orderId)){ |
| | | //æ£éªå
容对象 |
| | | List<InsProductVO> insProductVOS = insProductMapper.selectProductByOrderId(orderId,sonLaboratory); |
| | | //æ ¹æ®æ ·åidåç» |
| | | Map<Integer, List<InsProductVO>> groupMap = insProductVOS.stream().collect(Collectors.groupingBy(InsProductVO::getSampleId)); |
| | | List<InsProductVO> sampleList = new ArrayList<>(); |
| | | for (Integer key : groupMap.keySet()) { |
| | | AtomicInteger insSum = new AtomicInteger(0); |
| | | List<String> inspectNameList = new ArrayList<>(); |
| | | InsProductVO insProductVO = new InsProductVO(); |
| | | groupMap.get(key).forEach(k->{ |
| | | if(StringUtils.isNotBlank(k.getInspectName())){ |
| | | insSum.getAndIncrement(); |
| | | inspectNameList.add(k.getInspectName()); |
| | | } |
| | | insProductVO.setId(k.getSampleId()); |
| | | insProductVO.setSampleCode(k.getSampleCode()); |
| | | }); |
| | | if(CollectionUtils.isEmpty(inspectNameList)){ |
| | | insProductVO.setState(0); |
| | | }else if(inspectNameList.size() < groupMap.get(key).size()){ |
| | | insProductVO.setState(1); |
| | | }else if(inspectNameList.size() == groupMap.get(key).size()){ |
| | | insProductVO.setState(2); |
| | | } |
| | | insProductVO.setInspectName(inspectNameList.stream().distinct().collect(Collectors.joining(","))); |
| | | sampleList.add(insProductVO); |
| | | } |
| | | map.put("insSamples",sampleList); |
| | | map.put("insProductVOS",insProductVOS); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) |
| | | public void saveInsContext(Map<String, Object> insContext, Integer currentTable, Integer currentSampleId, Integer orderId, String sonLaboratory, Boolean isDelete) { |
| | | try{ |
| | | if(lock.tryLock(10,TimeUnit.SECONDS)){ |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | insContext.forEach((k, v) -> { |
| | | JSONObject jo = JSON.parseObject(JSON.toJSONString(v)); |
| | | InsProduct insProduct = new InsProduct(); |
| | | insProduct.setId(Integer.parseInt(k)); |
| | | InsProduct product = insProductMapper.selectById(insProduct.getId()); |
| | | if (currentTable.equals(product.getTemplateId()) && currentSampleId.equals(product.getInsSampleId())) { |
| | | List<InsProductResult> oldResults = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | |
| | | InsProductResult newResult = new InsProductResult(); |
| | | if (CollectionUtils.isNotEmpty(oldResults)) { |
| | | BeanUtil.copyProperties(oldResults.get(0), newResult); |
| | | } |
| | | newResult.setInsProductId(Integer.parseInt(k)); |
| | | /*æ ¡éªä¸ä¸result表*/ |
| | | if (oldResults.size() > 1) { |
| | | for (int i = 1; i < oldResults.size(); i++) { |
| | | insProductResultMapper.deleteById(oldResults.get(i)); |
| | | } |
| | | } |
| | | // ä¿åçæ°æ®å°æ°ä½æ°å¿
须大äºçäºtellæå¤§çå°æ°ä½æ° |
| | | String tells = product.getTell(); |
| | | Integer digit = null; |
| | | if(StringUtils.isEmpty(tells)) { |
| | | digit = -1; |
| | | }else { |
| | | // æ¾å°å°æ°ä½æ°æå¤çæ°å¼ |
| | | Map<String, Object> stringObjectMap = maxDecimalNumber(tells); |
| | | digit = Integer.parseInt(stringObjectMap.get("maxNumber").toString()); |
| | | } |
| | | if (!Arrays.asList("åºååºå","æ¯å¨ç²å³").contains(product.getInspectionItem())) { |
| | | //æ£éªå¼ |
| | | if (jo.get("insValue") != null) { |
| | | JSONArray jsonArray = JSON.parseArray(JSON.toJSONString(jo.get("insValue"))); |
| | | List<Map<String, Object>> iv = new ArrayList<>(); |
| | | for (Object o : jsonArray) { |
| | | JSONObject insValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String val = ""; |
| | | if(Objects.nonNull(JSON.parseObject(JSON.toJSONString(insValue.get("v"))).get("v"))){ |
| | | val = JSON.parseObject(JSON.toJSONString(insValue.get("v"))).get("v").toString(); |
| | | } |
| | | // 妿å¯ä»¥è½¬æ¢ä¸ºæ°åï¼å°±è¦è¿è¡ä½æ°çæ¯è¾ |
| | | map.put("v", completion(val, digit)); |
| | | map.put("r", JSON.toJSONString(insValue.get("r"))); |
| | | map.put("c", JSON.toJSONString(insValue.get("c"))); |
| | | map.put("w", insValue.get("w")); |
| | | try { |
| | | if ((insValue.get("u") == null || insValue.get("u").equals("")) && StrUtil.isNotEmpty(val)) { |
| | | map.put("u", userId + ""); |
| | | } else { |
| | | map.put("u", insValue.get("u")); |
| | | } |
| | | iv.add(map); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | newResult.setInsValue(JSON.toJSONString(iv)); |
| | | } |
| | | } |
| | | if (!Arrays.asList("åºååºå","æ¯å¨ç²å³").contains(product.getInspectionItem())) { |
| | | //计ç®å¼ |
| | | if (jo.get("comValue") != null && !Objects.equals(jo.get("comValue"), "")) { |
| | | JSONArray jsonArray2 = JSON.parseArray(JSON.toJSONString(jo.get("comValue"))); |
| | | List<Map<String, Object>> cv = new ArrayList<>(); |
| | | for (Object o : jsonArray2) { |
| | | JSONObject comValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("r", JSON.toJSONString(comValue.get("r"))); |
| | | map.put("c", JSON.toJSONString(comValue.get("c"))); |
| | | // 妿å¯ä»¥è½¬æ¢ä¸ºæ°åï¼å°±è¦è¿è¡ä½æ°çæ¯è¾ |
| | | map.put("v", completion(JSON.parseObject(JSON.toJSONString(comValue.get("v"))).get("v").toString(), digit)); |
| | | cv.add(map); |
| | | } |
| | | newResult.setComValue(JSON.toJSONString(cv)); |
| | | } |
| | | } |
| | | //æç»å¼ |
| | | try { |
| | | JSONObject resValue = JSON.parseObject(JSON.toJSONString(jo.get("resValue"))); |
| | | if (resValue.get("v") != null) { |
| | | Object o = JSON.parseObject(JSON.toJSONString(resValue.get("v"))).get("v"); |
| | | // 妿å¯ä»¥è½¬æ¢ä¸ºæ°åï¼å°±è¦è¿è¡ä½æ°çæ¯è¾ |
| | | insProduct.setLastValue(completion(o.equals("") ? null : (o.toString()), digit)); |
| | | } |
| | | } catch (Exception e) { |
| | | insProduct.setLastValue("");//'' |
| | | } |
| | | //设å¤ç¼å· |
| | | if (jo.get("equipValue") != null) { |
| | | JSONArray jsonArray2 = JSON.parseArray(JSON.toJSONString(jo.get("equipValue"))); |
| | | List<Map<String, Object>> ev = new ArrayList<>(); |
| | | for (Object o : jsonArray2) { |
| | | JSONObject equipValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("v", JSON.parseObject(JSON.toJSONString(equipValue.get("v"))).get("v")); |
| | | ev.add(map); |
| | | } |
| | | newResult.setEquipValue(JSON.toJSONString(ev)); |
| | | } |
| | | //设å¤åç§° |
| | | if (jo.get("equipName") != null) { |
| | | JSONArray jsonArray2 = JSON.parseArray(JSON.toJSONString(jo.get("equipName"))); |
| | | List<Map<String, Object>> ev = new ArrayList<>(); |
| | | for (Object o : jsonArray2) { |
| | | JSONObject equipValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("v", JSON.parseObject(JSON.toJSONString(equipValue.get("v"))).get("v")); |
| | | ev.add(map); |
| | | } |
| | | newResult.setEquipName(JSON.toJSONString(ev)); |
| | | } |
| | | //ç»è®º |
| | | try { |
| | | JSONObject insResult = JSON.parseObject(JSON.toJSONString(jo.get("insResult"))); |
| | | String ir = JSON.parseObject(JSON.toJSONString(insResult.get("v"))).get("v") + ""; |
| | | insProduct.setInsResult(Integer.parseInt(ir)); |
| | | if (product.getInspectionItem().equals("ç循ç¯") || product.getInspectionItem().equals("温åè¯éª")) { |
| | | List<Integer> collect = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getSpecialItemParentId, product.getId())).stream() |
| | | .map(InsProduct::getInsResult) |
| | | .collect(Collectors.toList()); |
| | | if (collect.contains(null)) { |
| | | insProduct.setInsResult(2); |
| | | } else if (collect.contains(0)) { |
| | | insProduct.setInsResult(0); |
| | | } else { |
| | | insProduct.setInsResult(1); |
| | | } |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | insProduct.setInsResult(2);//å¾
å® |
| | | if (product.getInspectionItem().equals("åºååºå") && product.getInspectionItemSubclass().equals("å¼¹æ§æ¨¡é") |
| | | && Arrays.asList("/", "-").contains(product.getAsk())) { |
| | | insProduct.setInsResult(3);// ä¸å¤å® |
| | | } |
| | | // 妿æ¯å¼§åçç»è®ºä¹æ¹ä¸ºä¸å¤å® |
| | | if(product.getInspectionItem().equals("å¼§å-温度")) { |
| | | insProduct.setInsResult(3);// ä¸å¤å® |
| | | } |
| | | } |
| | | if (Objects.isNull(newResult.getId())) { |
| | | newResult.setCreateUser(userId); |
| | | newResult.setUpdateUser(userId); |
| | | insProductResultMapper.insert(newResult); |
| | | } else { |
| | | newResult.setUpdateUser(userId); |
| | | newResult.setUpdateTime(LocalDateTime.now()); |
| | | insProductResultMapper.updateById(newResult); |
| | | } |
| | | /*妿æ¯ç¬¬ä¸æ¬¡éæ©è®¾å¤ä¿¡æ¯,ä¸è¿æå
¶ä½æ ·å乿åä¸ä¸ªæ£éªé¡¹ç®,é£ä¹æææ ·åç该项ç®é½ç¨è¿ä¸ªè®¾å¤ä¿¡æ¯*/ |
| | | //å
æ¥è¯¢æ¯å¦è¿æå
¶ä½æ ·å |
| | | Integer insSampleId = product.getInsSampleId(); |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, insSampleMapper.selectById(insSampleId).getInsOrderId())); |
| | | //妿æå¤ä¸ªæ ·åæè
æ¯ä¸æ¯ééç±»åå°±åä¸ä¸ªè®¾å¤ |
| | | if (insSamples.size() > 1 && !product.getInspectionItemType().equals("1")) { |
| | | //åå¨å
¶ä½æ ·å,æ¥è¯¢æ¯å¦æåä¸ç§æ£éªé¡¹ç® |
| | | for (InsSample sample : insSamples.stream().filter(insSample -> !insSample.getId().equals(insSampleId)).collect(Collectors.toList())) { |
| | | InsProduct product1 = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, sample.getId()) |
| | | .eq(InsProduct::getInspectionItem, product.getInspectionItem()) |
| | | .eq(InsProduct::getInspectionItemEn, product.getInspectionItemEn()) |
| | | .eq(InsProduct::getInspectionItemSubclass, product.getInspectionItemSubclass()) |
| | | .eq(InsProduct::getInspectionItemSubclassEn, product.getInspectionItemSubclassEn()) |
| | | .eq(InsProduct::getTemplateId, product.getTemplateId()) |
| | | .eq(InsProduct::getStandardMethodListId, product.getStandardMethodListId()) |
| | | .eq(InsProduct::getInsBushId, product.getInsBushId()) |
| | | .eq(InsProduct::getInsFibersId, product.getInsFibersId()) |
| | | .eq(InsProduct::getInsFiberId, product.getInsFiberId()) |
| | | ); |
| | | if (ObjectUtils.isNotEmpty(product1)) { |
| | | //妿åå¨é¡¹ç®,æ¥è¯¢æ¯å¦æè¡¨ |
| | | InsProductResult productResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, product1.getId())); |
| | | if (ObjectUtils.isEmpty(productResult)) { |
| | | //没æè¡¨æ°å»ºè¡¨ |
| | | productResult = new InsProductResult(); |
| | | productResult.setInsProductId(product1.getId()); |
| | | productResult.setEquipValue(newResult.getEquipValue()); |
| | | productResult.setEquipName(newResult.getEquipValue()); |
| | | productResult.setCreateUser(userId); |
| | | productResult.setUpdateUser(userId); |
| | | insProductResultMapper.insert(productResult); |
| | | } else if (ObjectUtils.isEmpty(productResult.getEquipValue())) { |
| | | //æè¡¨å¤ææ¯å¦æè®¾å¤ |
| | | productResult.setEquipValue(newResult.getEquipValue()); |
| | | productResult.setEquipName(newResult.getEquipValue()); |
| | | productResult.setUpdateUser(userId); |
| | | productResult.setUpdateTime(LocalDateTime.now()); |
| | | insProductResultMapper.updateById(productResult); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | insProduct.setUpdateUser(userId); |
| | | insProductMapper.updateById(insProduct); |
| | | // å½åæ ·åæ¯å¦æ¯å
纤é
ç½®çå
纤æ¥å¤´æè |
| | | if ((!Objects.isNull(product.getInsFiberId()) || !Objects.isNull(product.getInsFibersId())) && product.getInspectionItem().equals("å
纤æ¥å¤´æè")) { |
| | | // æ¥æ¾åæ ·åä¸çå
纤æå
纤带çå
纤æ¥å¤´æè |
| | | List<InsProduct> insProducts = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getInsSampleId, product.getInsSampleId()) |
| | | .eq(InsProduct::getInspectionItem, product.getInspectionItem()) |
| | | .eq(InsProduct::getInspectionItemSubclass, product.getInspectionItemSubclass()) |
| | | .and(item -> item |
| | | .isNotNull(InsProduct::getInsFiberId) |
| | | .or() |
| | | .isNotNull(InsProduct::getInsFibersId))); |
| | | // è¦å¤å¶çresult |
| | | InsProductResult copyResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, product.getId())); |
| | | |
| | | for (InsProduct insProduct1 : insProducts) { |
| | | InsProduct copyInsProduct = insProductMapper.selectById(product.getId()); // å¤å¶çinsProduct |
| | | if (!insProduct1.getId().equals(copyInsProduct.getId())) { |
| | | copyInsProduct.setId(insProduct1.getId()); // å°å¤å¶çinsProductçid设置为被å¤å¶çid |
| | | copyInsProduct.setInsFibersId(insProduct1.getInsFibersId()); // å
纤带id |
| | | copyInsProduct.setInsFiberId(insProduct1.getInsFiberId()); // å
纤id |
| | | copyInsProduct.setInsBushId(insProduct1.getInsBushId()); // å¥ç®¡id |
| | | insProductMapper.updateById(copyInsProduct); |
| | | // èµå¼insProductResult |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct1.getId())); |
| | | if (Objects.isNull(insProductResult)) { |
| | | copyResult.setId(null); |
| | | copyResult.setInsProductId(insProduct1.getId()); |
| | | insProductResultMapper.insert(copyResult); |
| | | } else { |
| | | copyResult.setId(insProductResult.getId()); |
| | | copyResult.setInsProductId(insProduct1.getId()); |
| | | insProductResultMapper.updateById(copyResult); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | insProductUserMapper.insert(new InsProductUser(null, userId, LocalDateTime.now(), insProduct.getId())); |
| | | |
| | | insProduct = insProductMapper.selectById(insProduct); |
| | | //æ¥è¯¢æ£éªåä¿¡æ¯ |
| | | InsSample insSample = insSampleMapper.selectById(insProduct.getInsSampleId()); |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | //æ¥è¯¢ç¶æ£éªé¡¹ |
| | | InsProduct parentInsProduct; |
| | | if (ObjectUtil.isNotNull(insProduct.getSpecialItemParentId())) { |
| | | parentInsProduct = insProductMapper.selectById(insProduct.getSpecialItemParentId()); |
| | | } else { |
| | | parentInsProduct = null; |
| | | } |
| | | if (!Objects.isNull(parentInsProduct)) { |
| | | if ("温åè¯éª".equals(parentInsProduct.getInspectionItem()) || "ç循ç¯".equals(parentInsProduct.getInspectionItem())) { |
| | | // 温åè¯éªä»¥åç循ç¯çå é¤ |
| | | if (isDelete) { |
| | | String inspectionItem = insProduct.getInspectionItem(); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId())) |
| | | .stream() |
| | | .filter(item -> item.getInspectionItem().equals(inspectionItem)).collect(Collectors.toList()); |
| | | for (InsProduct insProduct1 : insProducts) { |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct1.getId())); |
| | | if (!Objects.isNull(insProductResult)) { |
| | | if (insProductResult.getInsProductId().equals(Integer.parseInt(k))) { |
| | | continue; |
| | | } |
| | | String insValue = insProductResult.getInsValue(); |
| | | List<Map> maps = com.alibaba.fastjson2.JSON.parseArray(insValue, Map.class); |
| | | if (maps.size() > 1) { |
| | | maps.remove(maps.size() - 1); |
| | | insProductResult.setInsValue(com.alibaba.fastjson2.JSON.toJSONString(maps)); |
| | | insProductResultMapper.updateById(insProductResult); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 温åè¯éªä»¥åçå¾ªç¯æ¥è¯¢ |
| | | // çå¾ªç¯ææå项 |
| | | List<InsProduct> c = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId())); |
| | | //éè¿inspectionItemåç» |
| | | Map<String, List<InsProduct>> collect1 = c.stream().collect(Collectors.groupingBy(InsProduct::getInspectionItem)); |
| | | HashMap<Integer, InsProductResult> map1 = new HashMap<>(); |
| | | Integer maxKey = Integer.MIN_VALUE; |
| | | for (Map.Entry<String, List<InsProduct>> m : collect1.entrySet()) { |
| | | List<InsProduct> thermalCycleCollect = m.getValue(); |
| | | if (!thermalCycleCollect.isEmpty()) { |
| | | for (InsProduct product1 : thermalCycleCollect) { |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, product1.getId())); |
| | | if (!Objects.isNull(insProductResult)) { |
| | | List<Map> maps = com.alibaba.fastjson2.JSON.parseArray(insProductResult.getInsValue(), Map.class); |
| | | map1.put(maps.size(), insProductResult); |
| | | } |
| | | if (!map1.isEmpty()) { |
| | | for (Map.Entry<Integer, InsProductResult> entry : map1.entrySet()) { |
| | | if (entry.getKey() > maxKey) { |
| | | maxKey = entry.getKey(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (maxKey != Integer.MIN_VALUE) { |
| | | InsProductResult insProductResult = map1.get(maxKey); |
| | | List<Map> maps = com.alibaba.fastjson2.JSON.parseArray(insProductResult.getInsValue(), Map.class); |
| | | maps.get(maps.size() - 1).put("v", "");//æåä¸ä¸ªå¼ä¸ºç©º |
| | | if (maps.get(maps.size() - 1).containsKey("w")) { |
| | | maps.get(maps.size() - 1).put("w", ""); |
| | | } |
| | | for (InsProduct product1 : thermalCycleCollect) { |
| | | InsProductResult insProductResult1 = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, product1.getId())); |
| | | if (!Objects.isNull(insProductResult1)) { |
| | | if (!insProductResult1.getInsProductId().equals(insProductResult.getInsProductId())) { |
| | | List<Map> maps1 = com.alibaba.fastjson2.JSON.parseArray(insProductResult1.getInsValue(), Map.class); |
| | | if (maps1.size() < maxKey) { |
| | | int number = maxKey - maps1.size(); |
| | | for (int i = 0; i < number; i++) { |
| | | maps1.add(maps.get(maps.size() - 1)); |
| | | } |
| | | insProductResult1.setInsValue(com.alibaba.fastjson2.JSON.toJSONString(maps1)); |
| | | insProductResultMapper.updateById(insProductResult1); |
| | | } |
| | | } |
| | | } else { |
| | | if (maxKey != Integer.MIN_VALUE) { |
| | | InsProductResult insProductResult2 = map1.get(maxKey); |
| | | List<Map> maps1 = com.alibaba.fastjson2.JSON.parseArray(insProductResult2.getInsValue(), Map.class); |
| | | for (Map map : maps1) { |
| | | map.put("v", ""); |
| | | if (map.containsKey("w")) { |
| | | map.put("w", ""); |
| | | } |
| | | } |
| | | insProductResult2.setInsValue(com.alibaba.fastjson2.JSON.toJSONString(maps1)); |
| | | insProductResult2.setId(null); |
| | | insProductResult2.setInsProductId(product1.getId()); |
| | | insProductResultMapper.insert(insProductResult2); |
| | | } |
| | | } |
| | | } |
| | | maxKey = Integer.MIN_VALUE; |
| | | map1.clear(); |
| | | } |
| | | } |
| | | } |
| | | // 妿æ¯å¯¼çº¿æ¸©åº¦ç弿´æ°ï¼é£ä¹å°±è¦å¤æèå¼ åæ¥ç»æ¯å¦åæ ¼ |
| | | InsProduct insProduct1 = insProductMapper.selectById(Integer.parseInt(k)); |
| | | if (insProduct1.getInspectionItemSubclass().equals("导线温度")) { |
| | | // æ ¹æ®ç¶id以忣éªé¡¹æ¥æ¥æ¾åä¸å¾ªç¯ä¸çèå¼ åæ¥ç» |
| | | List<InsProduct> insProducts2 = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .eq(InsProduct::getInspectionItem, insProduct1.getInspectionItem())); |
| | | List<Double> wire = new ArrayList<>(); // 导线温度çå¼ |
| | | List<Double> strain = new ArrayList<>(); // èå¼ çå¼ |
| | | List<Double> joint = new ArrayList<>(); // æ¥ç»çå¼ |
| | | |
| | | boolean strainFlag = true; // èå¼ æ¯å¦åæ ¼ |
| | | boolean jointFlag = true; // æ¥ç»æ¯å¦åæ ¼ |
| | | boolean strainPending = false; // æ¯å¦æå¾
å® |
| | | boolean jointPending = false; // æ¯å¦æå¾
å® |
| | | for (InsProduct insProduct2 : insProducts2) { |
| | | if (insProduct2.getInspectionItemSubclass().equals("导线温度")) { |
| | | String insValue = ""; |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct2.getId())); |
| | | if (!Objects.isNull(insProductResult)) { |
| | | insValue = insProductResult.getInsValue(); |
| | | List<Map> maps = com.alibaba.fastjson2.JSON.parseArray(insValue, Map.class); |
| | | if (maps.size() > 0) { |
| | | for (Map map : maps) { |
| | | if (Strings.isNotEmpty(map.get("v").toString())) { |
| | | wire.add(Double.parseDouble(map.get("v").toString())); |
| | | } else { |
| | | wire.add(-1.0); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (insProduct2.getInspectionItemSubclass().equals("èå¼ æ¸©åº¦")) { |
| | | String insValue = ""; |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct2.getId())); |
| | | if (!Objects.isNull(insProductResult)) { |
| | | insValue = insProductResult.getInsValue(); |
| | | List<Map> maps = com.alibaba.fastjson2.JSON.parseArray(insValue, Map.class); |
| | | if (maps.size() > 0) { |
| | | for (Map map : maps) { |
| | | if (Strings.isNotEmpty(map.get("v").toString())) { |
| | | strain.add(Double.parseDouble(map.get("v").toString())); |
| | | } else { |
| | | strain.add(-1.0); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | strain.add(-1.0); |
| | | } |
| | | } |
| | | if (insProduct2.getInspectionItemSubclass().equals("æ¥ç»æ¸©åº¦")) { |
| | | String insValue = ""; |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct2.getId())); |
| | | if (!Objects.isNull(insProductResult)) { |
| | | insValue = insProductResult.getInsValue(); |
| | | List<Map> maps = com.alibaba.fastjson2.JSON.parseArray(insValue, Map.class); |
| | | if (maps.size() > 0) { |
| | | for (Map map : maps) { |
| | | if (Strings.isNotEmpty(map.get("v").toString())) { |
| | | joint.add(Double.parseDouble(map.get("v").toString())); |
| | | } else { |
| | | joint.add(-1.0); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | joint.add(-1.0); |
| | | } |
| | | } |
| | | } |
| | | // å¦æå¯¼çº¿æ¸©åº¦çå¼å¤§äºèå¼ åæ¥ç»çå¼ï¼é£ä¹å°±æ¯åæ ¼ |
| | | if (!strain.isEmpty() && !wire.isEmpty() && (strain.size() == wire.size())) { |
| | | if (wire.contains(-1.0) || strain.contains(-1.0)) { |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getInsResult, 2) |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .eq(InsProduct::getInspectionItem, insProduct1.getInspectionItem()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "èå¼ æ¸©åº¦")); |
| | | strainPending = true; |
| | | } else { |
| | | for (int i = 0; i < wire.size(); i++) { |
| | | if (wire.get(i) <= strain.get(i)) { |
| | | strainFlag = false; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (joint.size() > 0 && wire.size() > 0 && (joint.size() == wire.size())) { |
| | | if (wire.contains(-1.0) || joint.contains(-1.0)) { |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getInsResult, 2) |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .eq(InsProduct::getInspectionItem, insProduct1.getInspectionItem()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "æ¥ç»æ¸©åº¦")); |
| | | jointPending = true; |
| | | } else { |
| | | for (int i = 0; i < wire.size(); i++) { |
| | | if (wire.get(i) <= joint.get(i)) { |
| | | jointFlag = false; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (!strainPending) { |
| | | if (strainFlag) { |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getInsResult, 1) |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .eq(InsProduct::getInspectionItem, insProduct1.getInspectionItem()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "èå¼ æ¸©åº¦")); |
| | | } else { |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getInsResult, 0) |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .eq(InsProduct::getInspectionItem, insProduct1.getInspectionItem()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "èå¼ æ¸©åº¦")); |
| | | } |
| | | } |
| | | if (!jointPending) { |
| | | if (jointFlag) { |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getInsResult, 1) |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .eq(InsProduct::getInspectionItem, insProduct1.getInspectionItem()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "æ¥ç»æ¸©åº¦")); |
| | | } else { |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getInsResult, 0) |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .eq(InsProduct::getInspectionItem, insProduct1.getInspectionItem()) |
| | | .eq(InsProduct::getInspectionItemSubclass, "æ¥ç»æ¸©åº¦")); |
| | | } |
| | | } |
| | | } |
| | | // æ¥æ¾æ¯å¦ææªæ£æµçæ¬¡æ° |
| | | List<Integer> insResult = Arrays.asList(0, 1, 3); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .and(w -> w.notIn(InsProduct::getInsResult, insResult) |
| | | .or() |
| | | .isNull(InsProduct::getInsResult))); |
| | | if (insProducts.isEmpty()) { |
| | | List<InsProduct> insProducts1 = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .eq(InsProduct::getSpecialItemParentId, parentInsProduct.getId()) |
| | | .eq(InsProduct::getInsResult, 0)); |
| | | if (!insProducts1.isEmpty()) { |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getInsResult, 0) |
| | | .eq(InsProduct::getId, parentInsProduct.getId())); |
| | | } else { |
| | | insProductMapper.update(null, new LambdaUpdateWrapper<InsProduct>() |
| | | .set(InsProduct::getInsResult, 1) |
| | | .eq(InsProduct::getId, parentInsProduct.getId())); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | //æ·»å å·¥æ¶è®°å½ |
| | | InsProduct finalInsProduct = insProduct; |
| | | WorkTimeDTO workTimeDTO = new WorkTimeDTO(userId, insOrder, insSample, finalInsProduct, parentInsProduct, currentSampleId, k, oldResults, newResult); |
| | | String jsonStr; |
| | | try { |
| | | jsonStr = JackSonUtil.marshal(workTimeDTO); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | String routerKey; |
| | | switch (sonLaboratory){ |
| | | case "ææè¯éªå®¤": |
| | | routerKey = RouterKeyConstants.CL_KEY; |
| | | break; |
| | | case "æºæ¢°æ§è½è¯éªå®¤": |
| | | routerKey = RouterKeyConstants.JX_KEY; |
| | | break; |
| | | case "çµåè¯éªå®¤": |
| | | routerKey = RouterKeyConstants.DL_KEY; |
| | | break; |
| | | default: |
| | | routerKey = RouterKeyConstants.GX_KEY; |
| | | break; |
| | | } |
| | | sendQueueMessage(ExchangeConstants.WORK_TIME_EXCHANGE,routerKey,jsonStr); |
| | | |
| | | insSample.setInsState(1); |
| | | //æªæ£éªçæ£éªé¡¹æ°é |
| | | Long unInsCount = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .and(wrapper -> wrapper |
| | | .isNull(InsProduct::getInsResult) |
| | | .or() |
| | | .eq(InsProduct::getInsResult, 2) |
| | | )); |
| | | if (0 == unInsCount) { |
| | | insSample.setInsState(2); |
| | | } |
| | | insSampleMapper.updateById(insSample); |
| | | /*æ ¡éªä¸ä¸result表*/ |
| | | List<InsProductResult> insProductResults = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | if (insProductResults.size() > 1) { |
| | | for (int i = 1; i < insProductResults.size(); i++) { |
| | | insProductResultMapper.deleteById(insProductResults.get(i)); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | String sampleIdStr = insContext.keySet().stream().findFirst().orElse(null); |
| | | if (sampleIdStr != null) { |
| | | int count = insProductMapper.selectInsProductCountByOrderId(orderId); |
| | | if (count == 0) { |
| | | insOrderStateMapper.update(new InsOrderState(), Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getLaboratory, sonLaboratory) |
| | | .set(InsOrderState::getInsState, 2)); |
| | | insOrderMapper.update(null, new LambdaUpdateWrapper<InsOrder>() |
| | | .set(InsOrder::getState, 4) |
| | | .eq(InsOrder::getId, orderId)); |
| | | } else { |
| | | insOrderStateMapper.update(new InsOrderState(), Wrappers.<InsOrderState>lambdaUpdate() |
| | | .eq(InsOrderState::getInsOrderId, orderId) |
| | | .eq(InsOrderState::getLaboratory, sonLaboratory) |
| | | .set(InsOrderState::getInsState, 1)); |
| | | insOrderMapper.update(null, new LambdaUpdateWrapper<InsOrder>() |
| | | .set(InsOrder::getInsState, 1) |
| | | .eq(InsOrder::getId, orderId)); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("å·¥æ¶è®¡ç®å¤±è´¥-->å½åæ ·åID:{},æ£éªè¯¦æ
:{}",currentSampleId,insContext); |
| | | throw new RuntimeException(e); |
| | | }finally { |
| | | if(lock.isLocked())lock.unlock(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥æ¾å°æ°ä½æ°æå¤çæ°å¼ |
| | | */ |
| | | public Map<String,Object> maxDecimalNumber(String tells) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Pattern pattern = Pattern.compile("[-+]?\\d*\\.?\\d+"); |
| | | Matcher matcher = pattern.matcher(tells); |
| | | String tell = ""; |
| | | Integer maxNumber = 0; |
| | | while (matcher.find()) { |
| | | String group = matcher.group(); |
| | | Integer length = 0; |
| | | if(group.contains(".")) { |
| | | length = group.split("\\.")[1].length(); |
| | | }else { |
| | | length = 0; |
| | | } |
| | | if(length > maxNumber) { |
| | | maxNumber = length; |
| | | tell = group; |
| | | } |
| | | } |
| | | map.put("tell",tell); |
| | | map.put("maxNumber",maxNumber); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * å°æ°ä½æ°çè¡¥å
¨ |
| | | */ |
| | | public String completion(String value, Integer digit) { |
| | | if(NumberUtil.isDouble(value)) { |
| | | int length = 0; |
| | | String[] splits = value.split("\\."); |
| | | if(splits.length>1){ |
| | | length = splits[1].length(); |
| | | } |
| | | if(digit > length) { |
| | | int difference = digit - length; |
| | | for (int i = 0; i < difference; i++) { |
| | | value += "0"; |
| | | } |
| | | } |
| | | } |
| | | return value; |
| | | } |
| | | |
| | | //äº¤æ¥ |
| | | @Override |
| | | public int upPlanUser(Integer userId, Integer orderId, String sonLaboratory) { |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setUserId(userId); |
| | | insSampleUser.setInsSampleId(orderId); |
| | | insSampleUser.setState(0); |
| | | insSampleUser.setSonLaboratory(sonLaboratory); |
| | | return insSampleUserMapper.insert(insSampleUser); |
| | | } |
| | | |
| | | //æ ¹æ®åå
æ ¼çææ¬å
容计ç®å®é
è¡é« |
| | | private int estimateCellHeight(CellRenderData cellRenderData) { |
| | | // å设é»è®¤è¡é«æ¯40 |
| | | int defaultHeight = 40; |
| | | // è·ååå
æ ¼ä¸çæææ®µè½ |
| | | List<ParagraphRenderData> paragraphs = cellRenderData.getParagraphs(); |
| | | int estimatedHeight = 0; |
| | | try { |
| | | // éåæ®µè½ï¼ä¼°ç®æ¯ä¸ªæ®µè½çé«åº¦ |
| | | for (ParagraphRenderData paragraph : paragraphs) { |
| | | List<RenderData> contents = paragraph.getContents(); |
| | | for (RenderData content : contents) { |
| | | if (content instanceof TextRenderData) { |
| | | TextRenderData text = (TextRenderData) content; |
| | | Style style = text.getStyle(); |
| | | // å设æ¯è¡ææ¬çé«åº¦ä¸ºåä½å¤§å°ç1.2å |
| | | Double fontSize = Objects.isNull(style.getFontSize()) ? 12.0 : style.getFontSize(); |
| | | int lines = (int) Math.ceil(text.getText().length() / 15.0); // å设æ¯è¡çº¦15个å符 |
| | | int textHeight = (int) (fontSize * 1.2 * lines); |
| | | // ç´¯å æ®µè½çé«åº¦ |
| | | estimatedHeight += textHeight; |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception ignored){} |
| | | // è¿åæå¤§å¼ï¼ç¡®ä¿é«åº¦ä¸ä½äºé»è®¤é«åº¦ |
| | | return Math.max(estimatedHeight, defaultHeight); |
| | | } |
| | | |
| | | /** |
| | | * åééåæ¶æ¯ |
| | | * @param exchange äº¤æ¢æºåç§° |
| | | * @param routerKey è·¯ç±ä¸»é® |
| | | * @param jsonStr æ¶æ¯å
容 |
| | | */ |
| | | public void sendQueueMessage(String exchange,String routerKey,String jsonStr){ |
| | | rabbitTemplate.convertAndSend(exchange,routerKey,jsonStr); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int verifyPlan(Integer orderId, String laboratory, Integer type, String tell) { |
| | | int num = (type == 1 ? 5 : 4); |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate().eq(InsOrderState::getInsOrderId, orderId).eq(InsOrderState::getLaboratory, laboratory).set(InsOrderState::getInsTime, now).set(InsOrderState::getInsState, num).set(InsOrderState::getVerifyTell, tell).set(InsOrderState::getVerifyUser, SecurityUtils.getUserId())); |
| | | Long count = insOrderStateMapper.selectCount(Wrappers.<InsOrderState>lambdaQuery().eq(InsOrderState::getInsOrderId, orderId).ne(InsOrderState::getInsState, 5)); |
| | | if (count == 0 && num == 5) { |
| | | List<InsUnPass> insUnPasses = new ArrayList<>(); |
| | | /*æ ·åä¸ç项ç®åªè¦æä¸ä¸ªé¡¹ç®ä¸åæ ¼åæ£éªç»æä¸º0,å¦å为1*/ |
| | | //è¿éçinsSamplesæ¯è®¢åä¸çæææ ·åå
æ¬("/") |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId)); |
| | | for (InsSample insSample : insSamples) { |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getInsSampleId, insSample.getId()).eq(InsProduct::getState, 1)); |
| | | List<Integer> results = insProducts.stream().map(InsProduct::getInsResult).filter(Objects::nonNull).collect(Collectors.toList()); |
| | | if (results.contains(0)) { |
| | | insSample.setInsResult(0); |
| | | } else { |
| | | insSample.setInsResult(1); |
| | | } |
| | | insSampleMapper.updateById(insSample); |
| | | /*夿 ¸éè¿åï¼å°ä¸åæ ¼ç项ç®ä¿¡æ¯æ·»å å°ins_un_pass表ä¸*/ |
| | | for (InsProduct insProduct : insProducts) { |
| | | if (insProduct.getInsResult() == 0) { |
| | | InsUnPass insUnPass = new InsUnPass(); |
| | | insUnPass.setId(null); |
| | | insUnPass.setModel(insSample.getModel()); |
| | | insUnPass.setSample(insSample.getSample()); |
| | | insUnPass.setInspectionItem(insProduct.getInspectionItem()); |
| | | insUnPass.setInspectionItemSubclass(insProduct.getInspectionItemSubclass()); |
| | | insUnPass.setLastValue(insProduct.getLastValue()); |
| | | insUnPass.setEntrustCode(insOrderMapper.selectById(orderId).getEntrustCode()); |
| | | List<Integer> userIds = insProductUserMapper.selectList(Wrappers.<InsProductUser>lambdaQuery().eq(InsProductUser::getInsProductId, insProduct.getId())).stream().map(InsProductUser::getCreateUser).distinct().collect(Collectors.toList()); |
| | | if(!userIds.isEmpty()){ |
| | | String name = userMapper.selectBatchIds(userIds).stream().map(User::getName).collect(Collectors.joining(",")); |
| | | insUnPass.setName(name); |
| | | insUnPasses.add(insUnPass); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | insUnPassService.saveBatch(insUnPasses); |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | String oldSampleStr = insOrder.getSample(); |
| | | //samplesæ¯è¿æ»¤ææ²¡ææ£éªé¡¹ç®çæ ·å |
| | | List<SampleProductDto> samples = insSampleMapper.selectSampleProductListByOrderId(orderId); |
| | | //æ¥è¯¢è®¢åä¸çå»éåçæ ·ååç§° |
| | | List<String> unqeSampleList = samples.stream().map(InsSample::getSample).distinct().collect(Collectors.toList()); |
| | | if(unqeSampleList.size()==1){ |
| | | insOrder.setSample(unqeSampleList.get(0)); |
| | | } |
| | | InsReport insReport = new InsReport(); |
| | | insReport.setCode(insOrder.getEntrustCode()); |
| | | insReport.setInsOrderId(orderId); |
| | | List<Map<String, Object>> tables = new ArrayList<>(); |
| | | Set<String> standardMethod = new HashSet<>(); |
| | | Set<String> deviceSet = new HashSet<>(); |
| | | Set<String> models = new HashSet<>(); |
| | | AtomicReference<Integer> productSize = new AtomicReference<>(0); |
| | | String[] monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; |
| | | Set<String> resultCh = new HashSet<>(); |
| | | Set<String> resultEn = new HashSet<>(); |
| | | //è·åæ£éªé¡¹ç®æ°é |
| | | Set<String> unEqualSet = new HashSet<>(); |
| | | //çµåè¯éªå®¤ï¼é¢æ/éææ ·ååå· |
| | | List<String> modelDl = new ArrayList<>(); |
| | | /*åºç¡æ¥å(æ ¹æ®ç»å¶çåå§è®°å½æ¨¡çå½¢æ)*/ |
| | | BasicReportHandler basicReportHandler = new BasicReportHandler(baseMapper, this,insSampleMapper); |
| | | basicReportHandler.doWrite(samples,insReport,tables,standardMethod,models,unEqualSet,modelDl,deviceSet); |
| | | productSize.getAndSet(unEqualSet.size()); |
| | | String sampleStr = insOrder.getSample(); |
| | | if(!modelDl.isEmpty()){ |
| | | String model = modelDl.stream().distinct().findFirst().orElse(""); |
| | | sampleStr += model; |
| | | } |
| | | /*å
纤æ¥å¤´æèçæ¥åæ ·å¼*/ |
| | | //æ¥è¯¢è®¢åä¸æææ ·åçæ£éªé¡¹ç®,妿æå
纤æ¥å¤´æèåéæ°æå»ºè¡¨æ ¼ |
| | | List<Map<String, Object>> tables4 = new ArrayList<>(); |
| | | //å½å订åä¸çæææ£éªé¡¹ |
| | | List<InsProduct> insProducts0 = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).distinct().collect(Collectors.toList()))); |
| | | if (insProducts0.stream().map(InsProduct::getInspectionItem).collect(Collectors.toList()).contains("å
纤æ¥å¤´æè")){ |
| | | //å¤çå
纤æ¥å¤´æèæ¥å |
| | | FiberOpticConnectorLossReportHandler lossReportHandler = new FiberOpticConnectorLossReportHandler(insProductMapper); |
| | | lossReportHandler.doWrite(insProducts0,insSamples,insReport,tables4); |
| | | } |
| | | String url; |
| | | try { |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/report-template.docx"); |
| | | File file = File.createTempFile("temp", ".tmp"); |
| | | OutputStream outputStream = new FileOutputStream(file); |
| | | IOUtils.copy(inputStream, outputStream); |
| | | url = file.getAbsolutePath(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | StringBuilder standardMethod2 = new StringBuilder(); |
| | | for (String s : standardMethod) { |
| | | standardMethod2.append("ã").append(s); |
| | | } |
| | | standardMethod2.replace(0, 1, ""); |
| | | tables.forEach(table -> { |
| | | table.put("tableSize", tables.size() + 1); |
| | | }); |
| | | List<DeviceVO> deviceList = new ArrayList<>(); |
| | | if (!deviceSet.isEmpty()) { |
| | | deviceSet.forEach(d->deviceList.add(insOrderMapper.selectDeviceList(d))); |
| | | } |
| | | Map<String, String> codeStr = new HashMap<>(); |
| | | codeStr.put("æ¥åç¼å·", insReport.getCode()); |
| | | codeStr.put("æ ·ååç§°", insOrder.getSample()); |
| | | codeStr.put("è§æ ¼åå·", samples.get(0).getModel()); |
| | | codeStr.put("åæ¾æ¥æ", now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | String codePath; |
| | | try { |
| | | String content = phoneQrCode+ insOrder.getEntrustCode() + "&type=word"; |
| | | codePath = new MatrixToImageWriter().code(content, twoCode); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | String modelStr = ""; |
| | | for (String model : models) { |
| | | modelStr += "," + model; |
| | | } |
| | | String finalModelStr = modelStr; |
| | | String sampleEn = insSampleMapper.getSampleEn(insOrder.getSample()); |
| | | insOrder.setSample(sampleStr); |
| | | String orderType = insOrderMapper.getEnumLabelByValue(insOrder.getOrderType()); |
| | | String formType = insOrderMapper.getEnumLabelByValue(insOrder.getFormType()); |
| | | ConfigureBuilder builder = Configure.builder(); |
| | | builder.useSpringEL(true); |
| | | List<DeviceVO> finalDeviceList = deviceList; |
| | | Integer userId = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery() |
| | | .eq(InsSampleUser::getInsSampleId, orderId) |
| | | .eq(InsSampleUser::getState,0) |
| | | .orderByDesc(InsSampleUser::getCreateTime) |
| | | .last("limit 1")).getUserId(); |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(userId).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | if (ObjectUtils.isEmpty(signatureUrl) || signatureUrl.isEmpty()) { |
| | | throw new ErrorException("æ¾ä¸å°æ£éªäººçç¾å"); |
| | | } |
| | | //妿æ¯ä¸å¤©ç§æè½¯å¾®ç¼å(02)ï¼æ¥åå±ç¤ºå§æåä½ä¸ºä¸å¤©ç§æå
ç¼æ»å(01) |
| | | Custom custom = customMapper.selectById(insOrder.getCompanyId()); |
| | | if(!Objects.isNull(custom) && Objects.equals("ä¸å¤©ç§æè½¯å¾®ç¼å",custom.getCompany())){ |
| | | //ä¸å¤©ç§æå
ç¼æ»å客æ·ä¿¡æ¯ |
| | | custom = customMapper.selectOne(Wrappers.<Custom>lambdaQuery() |
| | | .eq(Custom::getCompany,"ä¸å¤©ç§æå
ç¼æ»å") |
| | | .eq(Custom::getCode2,"01").last("limit 1")); |
| | | } |
| | | //åæ ¼æ°é |
| | | long qualifiedCount = insProducts0.stream().filter(f->f.getInsResult()==1).count(); |
| | | //æ ¼å¼åä¸åæ ¼é¡¹ç® |
| | | joinUnqualifiedItemChars(resultCh,resultEn,insProducts0); |
| | | String resultChStr = "便®å§æè¦æ±ï¼ææ£é¡¹ç®å符åè¦æ±ã"; |
| | | String resultEnStr = "According to commissioned requirements, all the tested items meet the requirements."; |
| | | if (!resultCh.isEmpty() && qualifiedCount>0) { |
| | | resultChStr = "便®å§æè¦æ±ï¼" + String.join("ã",resultCh) + "ææ£é¡¹ç®ä¸ç¬¦åè¦æ±ï¼å
¶ä½ææ£é¡¹ç®å符åè¦æ±ã"; |
| | | resultEnStr = "According to commissioned requirements," + String.join("ã",resultEn) + " these inspected items do not meet the requirements, all other inspected items meet the requirements."; |
| | | }else if(!resultCh.isEmpty() && qualifiedCount==0){ |
| | | resultChStr = "便®å§æè¦æ±ï¼ææ£é¡¹ç®åä¸ç¬¦åè¦æ±ã"; |
| | | resultEnStr = "According to commissioned requirements, all the tested items do not meet the requirements."; |
| | | } |
| | | |
| | | //å
纤éä»¶è¡¨æ ¼æ°æ® |
| | | List<Map<String, Object>> tables2 = new ArrayList<>(); |
| | | //æ¾å¥ç®¡éä»¶è¡¨æ ¼æ°æ® |
| | | List<Map<String, Object>> tables5 = new ArrayList<>(); |
| | | //å°ºå¯¸åæ°éä»¶è¡¨æ ¼æ°æ® |
| | | List<Map<String, Object>> tables6 = new ArrayList<>(); |
| | | /*å
纤é
ç½®çæ£éªæ¥å*/ |
| | | //å
夿æ¯å¦æå
纤é
ç½® |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).distinct().collect(Collectors.toList())) |
| | | .and(i->i.isNull(InsProduct::getInspectionItemClass).or().eq(InsProduct::getInspectionItemClass,"")) |
| | | );//ç¨æ£éªå项忮µåºå«å
纤é
ç½®ä¸æ¸©åº¦å¾ªç¯ |
| | | //æ¥è¯¢å
¨è²è°±ï¼è¿æ»¤è²æ å¹¶æåº |
| | | List<String> colorList = DictUtils.getDictCache("è²æ ").stream() |
| | | .sorted(Comparator.comparing(SysDictData::getDictSort)) |
| | | .map(SysDictData::getDictValue) |
| | | .collect(Collectors.toList()); |
| | | //æ¾å¥ç®¡éä»¶å¤ç |
| | | long piperCount = insProducts.stream().filter(f->!Objects.isNull(f.getInsBushId())).count(); |
| | | if(piperCount>0){ |
| | | PiperConfigReportHandler piperConfigReportHandler = new PiperConfigReportHandler(insProductMapper); |
| | | piperConfigReportHandler.doWrite(samples,insReport,tables5,colorList); |
| | | } |
| | | //è¿æ»¤æå
纤é
ç½®çé¡¹ç® |
| | | long fiberCount = insProducts.stream().filter(f->!Objects.isNull(f.getInsFiberId())).count(); |
| | | FiberConfigReportHandler lossReportHandler = new FiberConfigReportHandler(insProductMapper,insSampleMapper); |
| | | if (fiberCount>0) { |
| | | lossReportHandler.doWrite(samples,insReport,tables2,colorList); |
| | | } else{ |
| | | //æé¤å
纤æ¥å¤´æèåå°ºå¯¸åæ° |
| | | List<InsProduct> filterLists = insProducts.stream() |
| | | .filter(f->!Arrays.asList("å
纤æ¥å¤´æè","å°ºå¯¸åæ°","温度循ç¯").contains(f.getInspectionItem())&&f.getSonLaboratory().equals("å
纤è¯éªå®¤")).collect(Collectors.toList()); |
| | | lossReportHandler.writeFiberEnclosureTableRow(filterLists,tables2,insReport); |
| | | } |
| | | //è¿æ»¤æå
纤带é
ç½®çé¡¹ç® |
| | | long fibersCount = insProducts.stream().filter(f->!Objects.isNull(f.getInsFibersId())).count(); |
| | | FiberOpticRibbonReportHandler fiberOpticRibbonReportHandler = new FiberOpticRibbonReportHandler(insProductMapper,insSampleMapper); |
| | | if (fibersCount>0) { |
| | | fiberOpticRibbonReportHandler.doWrite(samples,insReport,tables6,colorList); |
| | | } else{ |
| | | //è¿æ»¤å°ºå¯¸åæ°é¡¹ç® |
| | | List<InsProductFiberVO> productList = new ArrayList<>(); |
| | | insSamples.stream() |
| | | .map(InsSample::getId).distinct() |
| | | .forEach(id->productList.addAll(insProductMapper.selectProductBySampleId(id))); |
| | | List<InsProductFiberVO> vos = productList.stream().filter(f->f.getInspectionItem().equals("å°ºå¯¸åæ°")).collect(Collectors.toList()); |
| | | if(!vos.isEmpty()){ |
| | | fiberOpticRibbonReportHandler.writeFiberOpticRibbonEnclosureTableRow(vos,tables6,insReport); |
| | | } |
| | | } |
| | | tables2.forEach(table2 -> table2.put("tableSize2", tables2.size())); |
| | | tables5.forEach(table5 -> table5.put("tableSize5", tables5.size())); |
| | | tables6.forEach(table6 -> table6.put("tableSize6", tables6.size())); |
| | | |
| | | /*温度循ç¯çæ£éªæ¥å*/ |
| | | //å
夿æ¯å¦ææ¸©åº¦å¾ªç¯ |
| | | List<InsProduct> insProducts3 = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).distinct().collect(Collectors.toList())) |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .isNotNull(InsProduct::getInspectionItemClass)//ç¨æ£éªå项忮µåºå«å
纤é
ç½®ä¸æ¸©åº¦å¾ªç¯ |
| | | .isNotNull(InsProduct::getInsFiberId)); //ç¨å
纤åºå«ç循ç¯åæ¸©åº¦å¾ªç¯ |
| | | List<Map<String, Object>> tables3 = new ArrayList<>(); |
| | | if (!insProducts3.isEmpty()) { |
| | | //å¤çæ¸©åº¦å¾ªç¯æ¥å |
| | | TemperatureCyclingReportHandler1 cyclingReportHandler = new TemperatureCyclingReportHandler1(insProductMapper, insFiberMapper, insProductResultMapper); |
| | | cyclingReportHandler.doWrite(samples,insReport,tables3); |
| | | } |
| | | |
| | | /*温åè¯éªçæ£éªæ¥å*/ |
| | | List<InsProduct> insProducts1 = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).distinct().collect(Collectors.toList())) |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .isNull(InsProduct::getInspectionItemClass)//ç¨æ£éªå项忮µåºå«æ¸©åè¯éªä¸çå¾ªç¯ |
| | | .isNull(InsProduct::getInsFiberId) //ç¨å
纤åºå«æ¸©åè¯éªåæ¸©åº¦å¾ªç¯ |
| | | .eq(InsProduct::getInspectionItem, "1")); //温åè¯éªç循ç¯åªæ1次 |
| | | if (!insProducts1.isEmpty()) { |
| | | //å¤ç温åè¯éªæ¥å |
| | | TemperatureTestReportHandler testReportHandler = new TemperatureTestReportHandler(insProductMapper, insProductResultMapper); |
| | | testReportHandler.doWrite(samples,insReport,tables3); |
| | | } |
| | | |
| | | /*ç循ç¯çæ£éªæ¥å*/ |
| | | List<InsProduct> insProducts2 = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).distinct().collect(Collectors.toList())) |
| | | .isNotNull(InsProduct::getSpecialItemParentId) //åºå常è§é¡¹ç® |
| | | .isNotNull(InsProduct::getInspectionItemClass)//ç¨æ£éªå项忮µåºå«æ¸©åè¯éªä¸çå¾ªç¯ |
| | | .isNull(InsProduct::getInsFiberId)); //ç¨å
纤åºå«ç循ç¯åæ¸©åº¦å¾ªç¯ |
| | | if (!insProducts2.isEmpty()) { |
| | | //å¤ççå¾ªç¯æ¥å |
| | | ThermalCycleReportHandler cycleReportHandler = new ThermalCycleReportHandler(insProductMapper, insProductResultMapper); |
| | | cycleReportHandler.doWrite(samples,insReport,tables3); |
| | | } |
| | | //åæ ¹åç´çç§çæ£éªæ¥å |
| | | tables3.forEach(table3 -> { |
| | | table3.put("tableSize3", tables3.size()); |
| | | }); |
| | | /*è·åéä»¶å¾çç±»å*/ |
| | | List<Map<String, Object>> images = new ArrayList<>(); |
| | | List<InsOrderFile> insOrderFiles = insOrderFileMapper.selectList(Wrappers.<InsOrderFile>lambdaQuery().eq(InsOrderFile::getType, 1).eq(InsOrderFile::getInsOrderId, orderId)); |
| | | if (CollectionUtils.isNotEmpty(insOrderFiles)) { |
| | | insOrderFiles.forEach(insOrderFile -> { |
| | | Map<String, Object> image = new HashMap<>(); |
| | | PictureRenderData pictureRenderData = Pictures.ofLocal(imgUrl + "/" + insOrderFile.getFileUrl()).sizeInCm(17, 20).create(); |
| | | image.put("url", pictureRenderData); |
| | | image.put("report", insReport); |
| | | images.add(image); |
| | | }); |
| | | } |
| | | //å§æäººåçµè¯åæ®µå¤æ |
| | | if (ObjectUtils.isEmpty(insOrder.getPrepareUser())) { |
| | | insOrder.setPrepareUser("/"); |
| | | } |
| | | if (ObjectUtils.isEmpty(insOrder.getPhone())) { |
| | | insOrder.setPhone("/"); |
| | | } |
| | | //æ¥è¯¢å®¡æ¹ç¾åé
ç½® |
| | | Map<String,Object> urlMap = insReportApproveConfigMapper.selectApprovalConfigByLaboratory(insOrder.getLaboratory()); |
| | | String writeUrl = imgUrl + "/" + (Objects.isNull(urlMap.get("writeUrl"))?"":urlMap.get("writeUrl").toString());//ç¼å¶äººç¾åurl |
| | | String examineUrl = imgUrl + "/" + (Objects.isNull(urlMap.get("examineUrl"))?"":urlMap.get("examineUrl").toString());//å®¡æ ¸äººç¾åurl |
| | | String ratifyUrl = imgUrl + "/" + (Objects.isNull(urlMap.get("ratifyUrl"))?"":urlMap.get("ratifyUrl").toString());//æ¹å人ç¾åurl |
| | | //è·ååºæçæ¥åä¸ç¨ç« |
| | | String sealUrl; |
| | | try { |
| | | sealUrl = insReportMapper.getLaboratoryByName(insOrder.getLaboratory()); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¥åä¸ç¨ç« "); |
| | | } |
| | | |
| | | //æ£éªé¡¹ç®çç¯å¢ |
| | | InsProduct insProduct = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getState, 1).eq(InsProduct::getInsSampleId, samples.get(0).getId())).get(0); |
| | | String environment = ""; |
| | | environment = (ObjectUtils.isNotEmpty(insProduct.getTemperature()) ? insProduct.getTemperature() + "â " : "") + (ObjectUtils.isNotEmpty(insProduct.getHumidity()) ? insProduct.getHumidity() + "%" : ""); |
| | | String finalEnvironment = environment; |
| | | Custom finalCustom = custom; |
| | | String finalSealUrl = imgUrl + "/" +sealUrl; |
| | | String finalResultChStr = resultChStr; |
| | | String finalResultEnStr = resultEnStr; |
| | | ZipSecureFile.setMinInflateRatio(0.001); |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("order", insOrder); |
| | | put("report", insReport); |
| | | put("environment", finalEnvironment); |
| | | put("custom", finalCustom); |
| | | put("sampleSize", samples.size()); |
| | | put("tables", tables); |
| | | put("tableSize", tables.size() + 1); |
| | | put("tables2", tables2.isEmpty()?null:tables2); |
| | | put("tableSize2", tables2.size()); |
| | | put("tables3", tables3.isEmpty()?null:tables3); |
| | | put("tableSize3", tables3.size()); |
| | | put("tables4", tables4.isEmpty()?null:tables4); |
| | | put("tableSize4", tables4.size()); |
| | | put("tables5", tables5.isEmpty()?null:tables5); |
| | | put("tableSize5", tables5.size()); |
| | | put("tables6", tables6.isEmpty()?null:tables6); |
| | | put("tableSize6", tables6.size()); |
| | | put("standardMethod", (standardMethod2.toString().equals("null") ? "" : standardMethod2)); |
| | | put("deviceList", finalDeviceList); |
| | | put("twoCode", Pictures.ofLocal(codePath).create()); |
| | | put("models", finalModelStr.replace(",", "")); |
| | | put("productSize", productSize); |
| | | put("createTime", now.format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | put("createTimeEn", monthNames[now.getMonthValue() - 1] + " " + now.getDayOfMonth() + ", " + now.getYear()); |
| | | put("insTime", insOrder.getInsTime().format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | put("insTimeEn", monthNames[insOrder.getInsTime().getMonthValue() - 1] + " " + insOrder.getInsTime().getDayOfMonth() + ", " + insOrder.getInsTime().getYear()); |
| | | put("writeUrl", new FilePictureRenderData(100,50, writeUrl)); |
| | | put("insUrl", new FilePictureRenderData(100,50,imgUrl + "/" + signatureUrl)); |
| | | put("images", images.isEmpty()?null:images); |
| | | put("examineUrl", new FilePictureRenderData(100,50,examineUrl)); |
| | | put("ratifyUrl", new FilePictureRenderData(100,50,ratifyUrl)); |
| | | put("sampleEn", sampleEn); |
| | | put("orderType", orderType); |
| | | put("getTime", insOrder.getExamineTime().format(DateTimeFormatter.ofPattern("yyyyå¹´MMæddæ¥"))); |
| | | put("getTimeEn", monthNames[insOrder.getExamineTime().getMonthValue() - 1] + " " + insOrder.getExamineTime().getDayOfMonth() + ", " + insOrder.getExamineTime().getYear()); |
| | | put("seal1", new FilePictureRenderData(600,600, finalSealUrl)); |
| | | put("seal2", new FilePictureRenderData(600,600, finalSealUrl)); |
| | | put("formTypeCh", formType); |
| | | put("formTypeEn", insOrder.getFormType()); |
| | | put("resultCh", finalResultChStr); |
| | | put("resultEn", finalResultEnStr); |
| | | }}); |
| | | // æ´æ°æ°æ®åºä¸çç¾åæ¥æ |
| | | insOrderService.update(Wrappers.<InsOrder>lambdaUpdate() |
| | | .eq(InsOrder::getId, insOrder.getId()) |
| | | .set(InsOrder::getIssuingDate, now)); |
| | | try { |
| | | String name = insReport.getCode().replace("/", "") + ".docx"; |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name))); |
| | | insReport.setUrl("/word/" + name); |
| | | insReport.setIsExamine(-9);//æªå®¡æ ¸ç¶æä¸º-9 |
| | | insReport.setIsRatify(-9);//æªæ¹åç¶æä¸º-9 |
| | | insReportMapper.insert(insReport); |
| | | insOrder.setInsState(5); |
| | | insOrder.setSample(oldSampleStr); |
| | | insOrderMapper.updateById(insOrder); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | // å¤çåå¹¶åå
æ ¼çé®é¢ |
| | | String path = wordUrl + "/" + insReport.getCode().replace("/", "") + ".docx"; |
| | | // word 转 pdf |
| | | String tempUrlPdf = insReportService.wordToPdfTemp((StrUtil.isBlank(insReport.getUrlS()) ? insReport.getUrl() : insReport.getUrlS()).replace("/word", wordUrl)); |
| | | insReportMapper.update(null,new LambdaUpdateWrapper<InsReport>() |
| | | .set(InsReport::getTempUrlPdf,tempUrlPdf) |
| | | .eq(InsReport::getId,insReport.getId())); |
| | | try { |
| | | ZipSecureFile.setMinInflateRatio(0.0001);//è§£å³éä»¶æä»¶è¿å¤§å¼åçZipBomå¼å¸¸ |
| | | FileInputStream stream = new FileInputStream(path); |
| | | XWPFDocument document = new XWPFDocument(stream); |
| | | List<XWPFTable> xwpfTables = document.getTables(); |
| | | for (int i = 0; i < xwpfTables.size(); i++) { |
| | | Set<String> set1 = new HashSet<>(); |
| | | Map<String, Map<String, Integer>> maps = new HashMap<>(); |
| | | for (int j = 0; j < xwpfTables.get(i).getRows().size(); j++) { |
| | | for (int k = 0; k < xwpfTables.get(i).getRows().get(j).getTableCells().size(); k++) { |
| | | if (xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().indexOf("â") > -1) { |
| | | String[] split = xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().split("â"); |
| | | if (set1.add(split[1])) { |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | map.put("sr", j); |
| | | map.put("sc", k); |
| | | map.put("er", j + 0); |
| | | map.put("ec", k + 0); |
| | | maps.put(split[1], map); |
| | | } else { |
| | | Map<String, Integer> map1 = maps.get(split[1]); |
| | | if (j == map1.get("sr")) { |
| | | map1.put("ec", map1.get("ec") + 1); |
| | | } else if (k == map1.get("sc")) { |
| | | map1.put("er", map1.get("er") + 1); |
| | | } |
| | | } |
| | | String str = xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getText().split("â")[0]; |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).removeParagraph(0); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).setText(str); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER); |
| | | xwpfTables.get(i).getRows().get(j).getTableCells().get(k).getParagraphArray(0).setAlignment(ParagraphAlignment.CENTER); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // åå
æ ¼æåº, é¿å
æ ¼å¼éä¹± |
| | | List<Map.Entry<String, Map<String, Integer>>> entries = new ArrayList<>(maps.entrySet()); |
| | | entries.sort((o1, o2) -> o1.getValue().get("sc") - o2.getValue().get("sc")); |
| | | |
| | | // æç
§é¡ºåºæ·»å è¿éå |
| | | List<String> list = new ArrayList<>(); |
| | | for (Map.Entry<String, Map<String, Integer>> entry : entries) { |
| | | list.add(entry.getKey()); |
| | | } |
| | | /*List<String> list = new ArrayList<>(); |
| | | for (String s : maps.keySet()) { |
| | | list.add(s); |
| | | }*/ |
| | | for (int a = list.size() - 1; a >= 0; a--) { |
| | | Map<String, Integer> v = maps.get(list.get(a)); |
| | | for (int j = 0; j < v.get("er") - v.get("sr") + 1; j++) { |
| | | if (v.get("ec") > v.get("sc")) { |
| | | try { |
| | | TableTools.mergeCellsHorizonal(xwpfTables.get(i), v.get("sr") + j, v.get("sc"), v.get("ec")); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | } |
| | | if (v.get("er") > v.get("sr")) { |
| | | try { |
| | | TableTools.mergeCellsVertically(xwpfTables.get(i), v.get("sc"), v.get("sr"), v.get("er")); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | } |
| | | } |
| | | FileOutputStream fileOutputStream = new FileOutputStream(path); |
| | | document.write(fileOutputStream); |
| | | fileOutputStream.close(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | //å¤çä¸è±ææ¢è¡çé®é¢ |
| | | try { |
| | | FileInputStream stream1 = new FileInputStream(path); |
| | | XWPFDocument document1 = new XWPFDocument(stream1); |
| | | List<XWPFTable> xwpfTables1 = document1.getTables(); |
| | | for (int i = 1; i < xwpfTables1.size() - (deviceList == null ? 1 : 2); i++) { |
| | | for (int j = 0; j < xwpfTables1.get(i).getRows().size(); j++) { |
| | | for (int k = 0; k < xwpfTables1.get(i).getRows().get(j).getTableCells().size(); k++) { |
| | | if (xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).getText().contains("@")) { |
| | | String text = xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).getText(); |
| | | String[] split = text.split("@"); |
| | | xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).removeParagraph(0); |
| | | XWPFParagraph xwpfParagraph = xwpfTables1.get(i).getRows().get(j).getTableCells().get(k).addParagraph(); |
| | | XWPFRun run = xwpfParagraph.createRun(); |
| | | run.setText(split.length>0?split[0]:""); |
| | | if (split.length>1 && ObjectUtils.isNotNull(split[1])) { |
| | | run.addBreak(); |
| | | run.setText(split[1]); |
| | | } |
| | | xwpfParagraph.setAlignment(ParagraphAlignment.CENTER); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | FileOutputStream fileOutputStream1 = new FileOutputStream(path); |
| | | document1.write(fileOutputStream1); |
| | | fileOutputStream1.close(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } else if(num != 5) { |
| | | //夿 ¸ä¸éè¿å°æå¤æ ¸çè´è´£äººå»æ |
| | | Integer id = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery().eq(InsSampleUser::getInsSampleId, orderId).orderByDesc(InsSampleUser::getId).last("limit 1")).getId(); |
| | | insSampleUserMapper.deleteById(id); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | /** |
| | | * æ ¼å¼åä¸åæ ¼é¡¹ç®å符串 |
| | | * @param resultCh ä¸åæ ¼é¡¹ç®ä¸æå表 |
| | | * @param resultEn ä¸åæ ¼é¡¹ç®è±æå表 |
| | | * @param insProducts0 æ£éªé¡¹å表 |
| | | */ |
| | | private void joinUnqualifiedItemChars(Set<String> resultCh, Set<String> resultEn, List<InsProduct> insProducts0) { |
| | | if(!insProducts0.isEmpty()){ |
| | | insProducts0.stream().filter(f->f.getInsResult()==0).forEach(e->{ |
| | | String chinaStr = String.join("-",e.getInspectionItem(),e.getInspectionItemSubclass()); |
| | | String englishStr = String.join("-",e.getInspectionItemEn(),e.getInspectionItemSubclassEn()); |
| | | resultCh.add(chinaStr); |
| | | resultEn.add(englishStr); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | public void getTemplateThing |
| | | (Set<Integer> set, Map<Integer, String> map2, List<InsProduct> insProducts) { |
| | | for (InsProduct product : insProducts) { |
| | | if (product.getSpecialItemParentId()!=null) { |
| | | product.setTemplate(new ArrayList<>()); |
| | | continue; |
| | | } |
| | | String thing = null; |
| | | if (product.getSpecialItemParentId() == null && set.add(product.getTemplateId())) { |
| | | map2.put(product.getTemplateId(), standardTemplateService.getStandTempThingById(product.getTemplateId()) + ""); |
| | | thing = map2.get(product.getTemplateId()); |
| | | } |
| | | if (StrUtil.isNotEmpty(thing)) { |
| | | JSONObject sheet = JSON.parseObject(JSON.toJSONString(JSON.parseArray(JSON.toJSONString(JSON.parseObject(thing).get("data"))).get(0))); |
| | | JSONObject config = JSON.parseObject(JSON.toJSONString(sheet.get("config"))); |
| | | List<JSONObject> cellData = JSON.parseArray(JSON.toJSONString(sheet.get("celldata")), JSONObject.class); |
| | | Map<String, Object> style = new HashMap<>(); |
| | | style.put("rowlen", config.get("rowlen")); |
| | | style.put("columnlen", config.get("columnlen")); |
| | | product.setTemplate(cellData); |
| | | product.setStyle(style); |
| | | product.setTemplateName(standardTemplateService.getStandTempNameById(product.getTemplateId())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode) { |
| | | List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId)); |
| | | List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList()); |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, ids) |
| | | .eq(InsProduct::getSonLaboratory, laboratory) |
| | | .eq(InsProduct::getState, 1) |
| | | .and(wrapper -> wrapper |
| | | .isNull(InsProduct::getInsResult) |
| | | .or() |
| | | .eq(InsProduct::getInsResult, 2) |
| | | ) |
| | | .isNull(InsProduct::getInsFiberId) |
| | | .isNull(InsProduct::getInsFibersId)); |
| | | insProducts.addAll(insProductMapper.selectFiberInsProduct(ids, laboratory)); |
| | | if (insProducts.size() > 0) { |
| | | String str = ""; |
| | | HashSet<String> set = new HashSet<>(); |
| | | int count = 0; |
| | | for (InsProduct product : insProducts) { |
| | | //妿æ¯å
ç¼çæ¸©åº¦å¾ªç¯ |
| | | if (product.getInspectionItem().equals("温度循ç¯") && insOrderMapper.selectById(orderId).getSampleType().equals("å
ç¼")) { |
| | | //æ¥è¯¢é£äºå¾ªç¯æ¸©åº¦çæ£éªé¡¹ç®çç»è®ºæ¯å¦å
¨é¨æ£éª |
| | | List<InsProduct> insProductList = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery().eq(InsProduct::getInsSampleId, product.getInsSampleId()) |
| | | .isNotNull(InsProduct::getInsFiberId).like(InsProduct::getInspectionItemSubclass, "â")); |
| | | List<Integer> collect = insProductList.stream().filter(insProduct -> insProduct.getInsResult() != null).map(InsProduct::getInsResult).collect(Collectors.toList()); |
| | | List<Integer> tt = new ArrayList<>(); |
| | | tt.add(1); |
| | | if (collect.contains(0)) { |
| | | product.setLastValue("ä¸åæ ¼"); |
| | | product.setInsResult(0); |
| | | } else if (collect.size() == insProductList.size() && collect.stream().distinct().collect(Collectors.toList()).containsAll(tt)) { |
| | | product.setLastValue("åæ ¼"); |
| | | product.setInsResult(1); |
| | | } |
| | | insProductMapper.updateById(product); |
| | | } |
| | | //妿æ¯çå¾ªç¯æè
æ¯æ¸©åè¯éª |
| | | else if (product.getInspectionItem().equals("ç循ç¯") || product.getInspectionItem().equals("温åè¯éª")) { |
| | | //æ¥è¯¢è¿äºé¡¹ç®ä¸çå
¶ä»æ£éªé¡¹ç®æ¯å¦å
¨é¨æ£éª |
| | | List<InsProduct> insProductList = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, product.getInsSampleId()) |
| | | .like(InsProduct::getInspectionItemSubclass, "温度")); |
| | | List<Integer> collect = insProductList.stream().filter(insProduct -> insProduct.getInsResult() != null).map(InsProduct::getInsResult).collect(Collectors.toList()); |
| | | List<Integer> tt = new ArrayList<>(); |
| | | tt.add(1); |
| | | if (collect.contains(0)) { |
| | | product.setLastValue("ä¸åæ ¼"); |
| | | product.setInsResult(0); |
| | | } else if (collect.size() == insProductList.size() && collect.stream().distinct().collect(Collectors.toList()).containsAll(tt)) { |
| | | product.setLastValue("åæ ¼"); |
| | | product.setInsResult(1); |
| | | } |
| | | insProductMapper.updateById(product); |
| | | } |
| | | //妿æ¯çµåçåºååºåæ£éªé¡¹ç®æè
æ¯ç²å³è¯éª,ç»è®ºæ¹æä¸å¤å® |
| | | else if (product.getInspectionItem().equals("åºååºå") || product.getInspectionItem().contains("ç²å³è¯éª")){ |
| | | product.setInsResult(3); |
| | | insProductMapper.updateById(product); |
| | | } |
| | | //妿æ¯é²æ¯é¤åçç¹æ§è¯éª |
| | | else if (product.getInspectionItem().equals("鲿¯é¤åçç¹æ§è¯éª")){ |
| | | product.setInsResult(1);//é»è®¤åæ ¼ |
| | | //éè¦å»å¤æå¡«åçæ£éªæ°æ®æ¯å¦æä¸åæ ¼ |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, product.getId())); |
| | | cn.hutool.json.JSONObject jsonObject = new cn.hutool.json.JSONObject(insProductResult.getComValue()); |
| | | // æ£æ¥ arr2 |
| | | cn.hutool.json.JSONArray arr2 = jsonObject.getJSONArray("arr2"); |
| | | for (int i = 0; i < arr2.size(); i++) { |
| | | cn.hutool.json.JSONObject obj = arr2.getJSONObject(i); |
| | | if (obj.getInt("state") == 2) { |
| | | product.setInsResult(0); |
| | | break; |
| | | } |
| | | } |
| | | // æ£æ¥ arr3 |
| | | cn.hutool.json.JSONArray arr3 = jsonObject.getJSONArray("arr3"); |
| | | for (int i = 0; i < arr3.size(); i++) { |
| | | cn.hutool.json.JSONObject obj = arr3.getJSONObject(i); |
| | | if (obj.getInt("state") == 2) { |
| | | product.setInsResult(0); |
| | | break; |
| | | } |
| | | } |
| | | insProductMapper.updateById(product); |
| | | } |
| | | else { |
| | | String notDetected = product.getInspectionItem() + " " + product.getInspectionItemSubclass(); |
| | | if(!set.contains(notDetected)) { |
| | | count++; |
| | | str += "<br/>" + count + "ï¼" + product.getInspectionItem() + " " + product.getInspectionItemSubclass() + "<br/>"; |
| | | set.add(notDetected); |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(str)) { |
| | | throw new ErrorException("<strong>åå¨å¾
æ£éªç项ç®ï¼</strong><br/>" + str); |
| | | } |
| | | } |
| | | insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate().eq(InsOrderState::getInsOrderId, orderId).eq(InsOrderState::getLaboratory, laboratory).set(InsOrderState::getInsTime, LocalDateTime.now()).set(InsOrderState::getInsState, 3).set(InsOrderState::getVerifyUser, verifyUser)); |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | InformationNotification info = new InformationNotification(); |
| | | info.setCreateUser(insProductMapper.selectUserById(userId).get("name")); |
| | | info.setMessageType("2"); |
| | | info.setTheme("夿 ¸éç¥"); |
| | | info.setContent("æ¨æä¸æ¡æ£éªä»»å¡å¾
夿 ¸æ¶æ¯"); |
| | | info.setSenderId(userId); |
| | | info.setConsigneeId(verifyUser); |
| | | info.setViewStatus(false); |
| | | info.setJumpPath("b1-inspect-order-plan"); |
| | | informationNotificationService.addInformationNotification(info); |
| | | //夿 ¸äºº--æ£éªåç¸å
³è´è´£äºº |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | | insSampleUser.setUserId(verifyUser); |
| | | insSampleUser.setInsSampleId(orderId); |
| | | insSampleUser.setState(1); |
| | | insSampleUser.setSonLaboratory(laboratory); |
| | | insSampleUserMapper.insert(insSampleUser); |
| | | /*æ ¡éªä¸ä¸result表*/ |
| | | CompletableFuture.supplyAsync(() -> { |
| | | List<Integer> ips = insProducts.stream().map(InsProduct::getId).distinct().collect(Collectors.toList()); |
| | | for (Integer ip : ips) { |
| | | List<InsProductResult> insProductResults = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery() |
| | | .eq(InsProductResult::getInsProductId, ip)); |
| | | if (insProductResults.size() > 1) { |
| | | for (int i = 1; i < insProductResults.size(); i++) { |
| | | insProductResultMapper.deleteById(insProductResults.get(i)); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | }); |
| | | // å 餿°éé鿬¡æ° |
| | | String key = "frequency" + ":" + entrustCode + ":*"; |
| | | RedisUtil.delsLike(key); |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getEquipName(Integer orderId,String sonLaboratory) { |
| | | List<Integer> ids = insSampleMapper.selectList(new LambdaQueryWrapper<InsSample>() |
| | | .eq(InsSample::getInsOrderId, orderId)) |
| | | .stream() |
| | | .map(InsSample::getId) |
| | | .collect(Collectors.toList()); |
| | | // æ¥çå忝å¦éæ©äºè®¾å¤ |
| | | List<String> strList = new ArrayList<>(); |
| | | HashSet<String> set = new HashSet<>(); |
| | | List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>() |
| | | .in(InsProduct::getInsSampleId, ids) |
| | | .eq(InsProduct::getSonLaboratory, sonLaboratory) |
| | | .eq(InsProduct::getState, 1)); |
| | | if (CollectionUtils.isNotEmpty(productList)) { |
| | | List<InsProduct> collect = productList.stream() |
| | | .filter(item -> Objects.isNull(item.getSpecialItemParentId()) || StringUtils.isEmpty(item.getSpecialItemParentId()+"")) |
| | | .collect(Collectors.toList()); |
| | | for (InsProduct product : collect) { |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, product.getId())); |
| | | if(Objects.nonNull(insProductResult)){ |
| | | if(Objects.isNull(insProductResult.getEquipName()) || StringUtils.isEmpty(insProductResult.getEquipName())) { |
| | | strList.add(product.getInspectionItem() + " " + product.getInspectionItemSubclass()); |
| | | }else { |
| | | List<Map> maps = JSONArray.parseArray(insProductResult.getEquipName(), Map.class); |
| | | if(CollectionUtils.isNotEmpty(maps)) { |
| | | List<Map> mapList = maps.stream().filter(item -> StringUtils.isEmpty(item.get("v") + "")).collect(Collectors.toList()); |
| | | if(mapList.size() == maps.size()) { |
| | | strList.add(product.getInspectionItem() + " " + product.getInspectionItemSubclass()); |
| | | } |
| | | // for (Map map : maps) { |
| | | // if(StringUtils.isEmpty(map.get("v")+"")){ |
| | | // strList.add(product.getInspectionItem() + " " + product.getInspectionItemSubclass()); |
| | | // } |
| | | // } |
| | | }else { |
| | | strList.add(product.getInspectionItem() + " " + product.getInspectionItemSubclass()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return strList.stream().distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) |
| | | public int saveInsContext2(InsProductResultDTO insProductResult) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | try { |
| | | //æ£éªç»æ |
| | | Map<String,Object> insValueMap = JackSonUtil.unmarshal(insProductResult.getInsValue(), Map.class); |
| | | //saveInsContext2æ¹æ³æå¤ä¸ªæ¨¡æ¿è°ç¨ï¼éæ ¹æ®æ¨¡æ¿åç§°åå¼å¤ç |
| | | switch (insProductResult.getTemplateName()){ |
| | | case "æ¶ç©ºå°çº¿åºååºå": |
| | | //ä¿åå¼¹æ§æ¨¡é忣éªç»è®º |
| | | if(Objects.nonNull(insValueMap.get("elasticityModulus"))){ |
| | | String elasticityModulus = insValueMap.get("elasticityModulus").toString(); |
| | | insProductMapper.update(null,Wrappers.<InsProduct>lambdaUpdate() |
| | | .set(InsProduct::getInsResult,3)//ç»è®ºè®¾ä¸ºä¸å¤å® |
| | | .set(InsProduct::getElasticityModulus,elasticityModulus) |
| | | .eq(InsProduct::getId,insProductResult.getInsProductId()) |
| | | ); |
| | | } |
| | | //å é¤å¼¹æ§æ¨¡ékey |
| | | insValueMap.remove("elasticityModulus"); |
| | | insProductResult.setInsValue(JackSonUtil.marshal(insValueMap)); |
| | | break; |
| | | case "ç²å³è¯éª": |
| | | //ä¿åæ£éªç»æ |
| | | if(Objects.nonNull(insValueMap.get("damage"))){ |
| | | String damage = insValueMap.get("damage").toString(); |
| | | Integer insResult = "符å".equals(damage)?1:0; |
| | | insProductMapper.update(null,Wrappers.<InsProduct>lambdaUpdate() |
| | | .set(InsProduct::getInsResult,insResult) |
| | | .set(InsProduct::getLastValue,damage) |
| | | .eq(InsProduct::getId,insProductResult.getInsProductId()) |
| | | ); |
| | | } |
| | | break; |
| | | } |
| | | List<InsProductResult> oldResults = new ArrayList<>(); |
| | | InsProductResult insProductResult1 = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>().eq(InsProductResult::getInsProductId, insProductResult.getInsProductId())); |
| | | //æ°å¢ææ´æ°æ£éªè®°å½ |
| | | if (ObjectUtils.isNull(insProductResult1)){ |
| | | insProductResultMapper.insert(insProductResult); |
| | | }else { |
| | | insProductResult.setId(insProductResult1.getId()); |
| | | oldResults.add(insProductResult1); |
| | | insProductResultMapper.updateById(insProductResult); |
| | | } |
| | | //æ·»å å·¥æ¶è®°å½ |
| | | InsOrder insOrder = insOrderMapper.selectById(insProductResult.getOrderId()); |
| | | InsSample insSample = insSampleMapper.selectById(insProductResult.getSampleId()); |
| | | InsProduct insProduct = insProductMapper.selectById(insProductResult.getInsProductId()); |
| | | InsProductResult newInsResult = new InsProductResult(); |
| | | BeanUtil.copyProperties(insProductResult,newInsResult); |
| | | WorkTimeDTO workTimeDTO = new WorkTimeDTO(userId,insOrder,insSample,insProduct,null,insProductResult.getSampleId(), String.valueOf(insProductResult.getInsProductId()),oldResults ,newInsResult); |
| | | String jsonStr = JackSonUtil.marshal(workTimeDTO); |
| | | //计ç®å·¥æ¶ |
| | | //TODO:è¯¥æ¹æ³ç®ååªæçµåç¨ï¼é»è®¤è·¯ç±ä½¿ç¨çµåç |
| | | sendQueueMessage(ExchangeConstants.WORK_TIME_EXCHANGE,RouterKeyConstants.DL_KEY,jsonStr); |
| | | }catch (Exception e){ |
| | | throw new RuntimeException(e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | // è·å两个localDateTimeçæ¯ä¸å¤© |
| | | public static List<LocalDateTime> getLocalDateTimesBetween(LocalDateTime start, LocalDateTime end) { |
| | | List<LocalDateTime> localDateTimes = new ArrayList<>(); |
| | | LocalDate currentDate = start.toLocalDate(); |
| | | LocalDateTime currentLocalDateTime = start; |
| | | while (!currentDate.isAfter(end.toLocalDate())) { |
| | | localDateTimes.add(currentLocalDateTime); |
| | | currentLocalDateTime = currentLocalDateTime.plusDays(1); |
| | | currentDate = currentDate.plusDays(1); |
| | | } |
| | | return localDateTimes; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£éªé¡¹å¯¹åºæ ååºé
ç½®çå·¥æ¶ä¿¡æ¯ |
| | | * @param insProduct |
| | | * @return |
| | | */ |
| | | public StandardProductVO getInspectWorkHourAndGroup(InsProduct insProduct){ |
| | | StandardProductVO standardProductVO = new StandardProductVO(); |
| | | if(!Objects.isNull(insProduct)){ |
| | | //æ¥è¯¢å¯¹åºæ ååº |
| | | List<StandardProductVO> productVO = standardProductListMapper.getStandardProductByInsProduct( |
| | | insProduct.getLaboratory(), |
| | | insProduct.getSampleType(), |
| | | insProduct.getSample(), |
| | | insProduct.getModel(), |
| | | insProduct.getInspectionItem(), |
| | | insProduct.getInspectionItemSubclass(), |
| | | insProduct.getSonLaboratory(), |
| | | insProduct.getStandardMethodListId()); |
| | | if(!productVO.isEmpty()){ |
| | | standardProductVO = productVO.get(0); |
| | | } |
| | | //æåºé´çæ£éªé¡¹ï¼åæ£éªé¡¹åçå·¥æ¶ä¿¡æ¯ |
| | | if(StringUtils.isNotBlank(insProduct.getSection()) && StringUtils.isNotBlank(standardProductVO.getSection())){ |
| | | try { |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | //åºé´è®¾ç½® |
| | | List<String> sectionList = (List<String>)objectMapper.readValue(standardProductVO.getSection(), List.class); |
| | | //éä¸åºé´ç䏿 |
| | | int i = sectionList.indexOf(insProduct.getSection()); |
| | | //è·å对åºä¸æ çå·¥æ¶åå·¥æ¶åç» |
| | | List<Double> hourList = (List<Double>)objectMapper.readValue(standardProductVO.getManHour(), List.class); |
| | | standardProductVO.setManHour(String.valueOf(hourList.get(i))); |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
| | | return standardProductVO; |
| | | } |
| | | |
| | | public static String getWeek(String dayStr) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | try { |
| | | Date date = sdf.parse(dayStr); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); |
| | | int day = calendar.get(Calendar.DAY_OF_MONTH); |
| | | return getWeekDay(dayOfWeek); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static String getWeekDay(int dayOfWeek) { |
| | | switch (dayOfWeek) { |
| | | case Calendar.MONDAY: |
| | | return "å¨ä¸"; |
| | | case Calendar.TUESDAY: |
| | | return "å¨äº"; |
| | | case Calendar.WEDNESDAY: |
| | | return "å¨ä¸"; |
| | | case Calendar.THURSDAY: |
| | | return "å¨å"; |
| | | case Calendar.FRIDAY: |
| | | return "å¨äº"; |
| | | case Calendar.SATURDAY: |
| | | return "å¨å
"; |
| | | case Calendar.SUNDAY: |
| | | return "卿¥"; |
| | | default: |
| | | return "æªç¥"; |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.aspose.words.Document; |
| | | import com.aspose.words.License; |
| | | import com.aspose.words.SaveFormat; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.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.deepoove.poi.XWPFTemplate; |
| | | import com.deepoove.poi.data.FilePictureRenderData; |
| | | import com.itextpdf.text.BadElementException; |
| | | import com.itextpdf.text.DocumentException; |
| | | import com.itextpdf.text.pdf.PdfContentByte; |
| | | import com.itextpdf.text.pdf.PdfReader; |
| | | import com.itextpdf.text.pdf.PdfStamper; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.dto.ReportPageDto; |
| | | import com.ruoyi.inspect.mapper.InsOrderMapper; |
| | | import com.ruoyi.inspect.mapper.InsOrderStateMapper; |
| | | import com.ruoyi.inspect.mapper.InsReportApproveConfigMapper; |
| | | import com.ruoyi.inspect.mapper.InsReportMapper; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | | import com.ruoyi.inspect.pojo.InsOrderState; |
| | | import com.ruoyi.inspect.pojo.InsReport; |
| | | import com.ruoyi.process.mapper.ProcessReportMapper; |
| | | import com.ruoyi.process.pojo.ProcessReport; |
| | | import com.ruoyi.require.service.InsReportService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.serializer.StringRedisSerializer; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.*; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLEncoder; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | | import java.nio.file.Paths; |
| | | import java.nio.file.StandardCopyOption; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.atomic.AtomicLong; |
| | | import java.util.stream.Collectors; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipFile; |
| | | import java.util.zip.ZipOutputStream; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | * @description é对表ãins_report(æ£éªæ¥å)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2024-03-17 22:10:02 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class InsReportServiceImpl extends ServiceImpl<InsReportMapper, InsReport> |
| | | implements InsReportService { |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private InsReportMapper insReportMapper; |
| | | |
| | | @Resource |
| | | ProcessReportMapper processReportMapper; |
| | | |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Value("${file.licenseUrl}") |
| | | private String licenseUrl; |
| | | |
| | | @Value("${file.path}") |
| | | private String imgUrl; |
| | | |
| | | @Resource |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Resource |
| | | private ThreadPoolTaskExecutor threadPoolTaskExecutor; |
| | | |
| | | @Resource |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | |
| | | private static final String SYNC_REPORT_KEY_PREFIX = "syncApprovalReport_lock_"; |
| | | |
| | | @Resource |
| | | private InsReportApproveConfigMapper insReportApproveConfigMapper; |
| | | |
| | | @Override |
| | | public IPage<ReportPageDto> pageInsReport(Page page, ReportPageDto reportPageDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | User user = userMapper.selectById(SecurityUtils.getUserId());//å½åç»å½ç人 |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.isEmpty()) { |
| | | String[] split = departLimsId.split(","); |
| | | //æ¥è¯¢å¯¹åºæ¶æåç§°(éä¿¡å®éªå®¤,çµåå®éªå®¤,æ£æµå) |
| | | String departLims = insOrderMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("å®éªå®¤")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | QueryWrapper<ReportPageDto> wrapper = QueryWrappers.queryWrappers(reportPageDto); |
| | | if(Objects.nonNull(reportPageDto.getCreateTimeRange())){ |
| | | wrapper.gt(reportPageDto.getCreateTimeRange().size()>1,"create_time",reportPageDto.getCreateTimeRange().get(0)) |
| | | .lt(reportPageDto.getCreateTimeRange().size()>1,"create_time",reportPageDto.getCreateTimeRange().get(1)); |
| | | } |
| | | return insReportMapper.pageInsReport(page, wrapper ,laboratory); |
| | | } |
| | | |
| | | @Override |
| | | public int inReport(String url, Integer id) { |
| | | InsReport insReport = new InsReport(); |
| | | insReport.setId(id); |
| | | insReport.setUrlS(url); |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | |
| | | // è¿å |
| | | @Override |
| | | public int upReportUrl(Integer id) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | String fileName = insReport.getUrlS().replace("/word/", ""); |
| | | if(Strings.isNotEmpty(fileName)) { |
| | | String path = wordUrl + File.separator + fileName; |
| | | File file = new File(path); |
| | | if (file.exists()) { |
| | | file.delete(); |
| | | } |
| | | } |
| | | return insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate().eq(InsReport::getId, id).set(InsReport::getUrlS, null)); |
| | | } |
| | | |
| | | @Override |
| | | public void downReport(Integer id,Integer type, HttpServletResponse response) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | String url = ""; |
| | | // 0 ä¸è½½docx 1 ä¸è½½pdf |
| | | if(type == 0) { |
| | | url = Strings.isNotEmpty(insReport.getUrlS()) ? insReport.getUrlS() : insReport.getUrl(); |
| | | }else { |
| | | url = insReport.getTempUrlPdf(); |
| | | } |
| | | if(Strings.isEmpty(url)){ |
| | | throw new ErrorException("æ¥åå°å为空"); |
| | | } |
| | | File file = new File(wordUrl + File.separator + url.replace("/word/", "")); |
| | | try { |
| | | String fileName = file.getName(); |
| | | if(fileName.indexOf("_") != -1) { |
| | | fileName = fileName.split("_")[1]; |
| | | } |
| | | fileName = URLEncoder.encode(fileName, "UTF-8"); |
| | | response.setContentType("application/octet-stream"); |
| | | response.setHeader("Content-disposition","attachment;filename=" + fileName); |
| | | ServletOutputStream stream = response.getOutputStream(); |
| | | FileInputStream fileInputStream = new FileInputStream(file); |
| | | byte[] bytes = new byte[1024]; |
| | | int byteRead; |
| | | while((byteRead = fileInputStream.read(bytes)) != -1){ |
| | | stream.write(bytes, 0, byteRead); |
| | | stream.flush(); |
| | | } |
| | | fileInputStream.close(); |
| | | stream.close(); |
| | | }catch (Exception e){ |
| | | throw new ErrorException("ä¸è½½å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //æäº¤ |
| | | @Override |
| | | public int writeReport(Integer id) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | insReport.setId(id); |
| | | insReport.setState(1); |
| | | insReport.setWriteTime(LocalDateTime.now());//æäº¤æ¶é´ |
| | | insReport.setWriteUserId(SecurityUtils.getUserId().intValue());//æäº¤äºº |
| | | //è·åæäº¤äººçç¾åå°å |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(SecurityUtils.getUserId().intValue()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°ç¼å¶äººçç¾å"); |
| | | } |
| | | //ç³»ç»çææ¥åå°å |
| | | String url = insReport.getUrl(); |
| | | //æå¨ä¸ä¼ æ¥åå°å |
| | | String urlS = insReport.getUrlS(); |
| | | wordInsertUrl(new HashMap<String, Object>() {{ |
| | | put("writeUrl", new FilePictureRenderData(100,50,imgUrl + "/" + signatureUrl)); |
| | | }}, (urlS == null ? url : urlS).replace("/word", wordUrl)); |
| | | // ä¿®æ¹ä¸´æ¶pdf |
| | | String tempUrlPdf = wordToPdfTemp((StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl)); |
| | | insReport.setTempUrlPdf("/word/" + tempUrlPdf); |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | @Override |
| | | public int examineReport(Integer id, Integer isExamine, String examineTell) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | insReport.setIsExamine(isExamine); |
| | | if (ObjectUtils.isNotEmpty(examineTell)) { |
| | | insReport.setExamineTell(examineTell); |
| | | } |
| | | insReport.setExamineUserId(SecurityUtils.getUserId().intValue());//å®¡æ ¸äºº |
| | | insReport.setExamineTime(LocalDateTime.now());//å®¡æ ¸æ¶é´ |
| | | if (isExamine == 0) { |
| | | //å¦æå®¡æ ¸ä¸éè¿ |
| | | insReport.setState(0);//æäº¤ç¶ææ¹ä¸ºå¾
æäº¤ |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | //è·åå®¡æ ¸äººçç¾åå°å |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(insReport.getExamineUserId()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°å®¡æ ¸äººçç¾å"); |
| | | } |
| | | //ç³»ç»çææ¥åå°å |
| | | String url = insReport.getUrl(); |
| | | //æå¨ä¸ä¼ æ¥åå°å |
| | | String urlS = insReport.getUrlS(); |
| | | wordInsertUrl(new HashMap<String, Object>() {{ |
| | | put("examineUrl", new FilePictureRenderData(100,50,imgUrl + "/" + signatureUrl)); |
| | | }}, (urlS == null ? url : urlS).replace("/word", wordUrl)); |
| | | // ä¿®æ¹ä¸´æ¶pdf |
| | | String tempUrlPdf = wordToPdfTemp((StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl)); |
| | | insReport.setTempUrlPdf("/word/" + tempUrlPdf); |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | |
| | | //æ¹å |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int ratifyReport(Integer id, Integer isRatify, String ratifyTell) { |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | insReport.setIsRatify(isRatify); |
| | | if (ObjectUtils.isNotEmpty(ratifyTell)) { |
| | | insReport.setRatifyTell(ratifyTell); |
| | | } |
| | | insReport.setRatifyUserId(SecurityUtils.getUserId().intValue());//æ¹å人 |
| | | insReport.setRatifyTime(LocalDateTime.now());//æ¹åæ¶é´ |
| | | if (isRatify == 0) { |
| | | //妿æ¹åä¸éè¿ |
| | | insReport.setState(0);//æäº¤ç¶ææ¹ä¸ºå¾
æäº¤ |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | //è·åæ¹å人çç¾åå°å |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(insReport.getRatifyUserId()).getSignatureUrl(); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¹å人çç¾å"); |
| | | } |
| | | //è·ååºæçæ¥åä¸ç¨ç« |
| | | String sealUrl; |
| | | try { |
| | | String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory(); |
| | | sealUrl = insReportMapper.getLaboratoryByName(laboratory); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°æ¥åä¸ç¨ç« "); |
| | | } |
| | | if (sealUrl == null) throw new ErrorException("æ¾ä¸å°æ¥åä¸ç¨ç« "); |
| | | //ç³»ç»çææ¥åå°å |
| | | String url = insReport.getUrl(); |
| | | //æå¨ä¸ä¼ æ¥åå°å |
| | | String urlS = insReport.getUrlS(); |
| | | String finalUrl = (urlS == null ? url : urlS).replace("/word", wordUrl); |
| | | wordInsertUrl(new HashMap<String, Object>() {{ |
| | | put("ratifyUrl", new FilePictureRenderData(100,50,imgUrl + "/" + signatureUrl)); |
| | | put("seal1", new FilePictureRenderData(600,600,imgUrl + "/" + sealUrl)); |
| | | put("seal2", new FilePictureRenderData(600,600,imgUrl + "/" + sealUrl)); |
| | | }}, finalUrl); |
| | | wordToPdf(finalUrl, sealUrl); |
| | | |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(insReportMapper.selectById(id).getInsOrderId()); |
| | | insOrder.setState(4); |
| | | insOrderMapper.updateById(insOrder); |
| | | // ä¿®æ¹ä¸´æ¶pdf |
| | | String tempUrlPdf = wordToPdfTemp((StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl)); |
| | | insReport.setTempUrlPdf("/word/" + tempUrlPdf); |
| | | /*æ°å¢cnas7.8æ¥åç»æ*/ |
| | | ProcessReport processReport = new ProcessReport(); |
| | | processReport.setInsReportCode(insReport.getCode()); |
| | | processReportMapper.insert(processReport); |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | |
| | | @Override |
| | | public int wordInsertUrl(Map<String, Object> map, String url) { |
| | | XWPFTemplate template = XWPFTemplate.compile(url).render(map); |
| | | try { |
| | | template.writeAndClose(Files.newOutputStream(Paths.get(url))); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | //æ¥åæ¹éä¸è½½ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public String downAll(String ids) { |
| | | List<Long> list = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList()); |
| | | List<InsReport> insReports = insReportMapper.selectBatchIds(list); |
| | | String zipFilePath = null; |
| | | // ä¸´æ¶æä»¶å¤¹è·¯å¾ |
| | | try { |
| | | String tempFolderPath = wordUrl + "/tempFolder"; |
| | | File tempFolder = new File(tempFolderPath); |
| | | if (tempFolder.exists()) { |
| | | deleteDirectory(tempFolder); // å 餿§çä¸´æ¶æä»¶å¤¹ |
| | | } |
| | | tempFolder.mkdirs(); // å建æ°çä¸´æ¶æä»¶å¤¹ |
| | | for (InsReport insReport : insReports) { |
| | | File sourceFile = new File((ObjectUtils.isNotEmpty(insReport.getUrlS()) ? insReport.getUrlS() : insReport.getUrl()).replace("/word", wordUrl)); |
| | | // ä¸è½½æä»¶åç§°å»é¤æ¶é´ |
| | | String destinationFileName = sourceFile.getName(); |
| | | if(destinationFileName.indexOf("_") != -1) { |
| | | destinationFileName = destinationFileName.split("_")[1]; |
| | | } |
| | | File destinationFile = new File(tempFolder, destinationFileName); |
| | | Files.copy(sourceFile.toPath(), destinationFile.toPath(), StandardCopyOption.REPLACE_EXISTING); |
| | | } |
| | | // åç¼©ä¸´æ¶æä»¶å¤¹ |
| | | zipFilePath = wordUrl + "/zip/output.zip"; |
| | | zipDirectory(tempFolderPath, zipFilePath); |
| | | |
| | | // æ¸
çä¸´æ¶æä»¶å¤¹ |
| | | deleteDirectory(tempFolder); |
| | | |
| | | System.out.println("ZIPæä»¶åå»ºå®æï¼"); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return "/word/zip/output.zip"; |
| | | } |
| | | |
| | | //æ¹éä¸ä¼ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int upAll(MultipartFile file) { |
| | | if (file != null) { |
| | | // æ ¹æ®æä»¶åæ¥è¯¢id |
| | | String fileName = file.getOriginalFilename(); |
| | | String code = fileName.replace(".docx", "").replace("JCZX", "JCZX/"); |
| | | if(fileName.lastIndexOf("_") != -1) { |
| | | code = code.substring(file.getOriginalFilename().lastIndexOf("_") + 1); |
| | | } |
| | | //æ¥è¯¢æªå®¡æ ¸çæ¥åæ°æ® |
| | | InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().eq(InsReport::getCode, code).eq(InsReport::getIsExamine,-9)); |
| | | if (ObjectUtils.isEmpty(insReport)) { |
| | | throw new ErrorException("没æç¼å·ä¸º" + code + "çæ¥åæè¯¥æ¥åå·²å®¡æ ¸éè¿"); |
| | | } |
| | | // 妿UrlSæå¼ å
å°è¯¥æä»¶å é¤ |
| | | if(Strings.isNotEmpty(insReport.getUrlS())) { |
| | | String url = wordUrl + File.separator + insReport.getUrlS().replace("/word/", ""); |
| | | File file1 = new File(url); |
| | | if(file1.exists()) { |
| | | file1.delete(); |
| | | } |
| | | } |
| | | String urlString; |
| | | String pathName; |
| | | String path = wordUrl; |
| | | File realpath = new File(path); |
| | | if (!realpath.exists()) { |
| | | realpath.mkdirs(); |
| | | } |
| | | pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + insReport.getCode().replace("/", "") + ".docx"; |
| | | urlString = realpath + "/" + pathName; |
| | | // å¤å¶æä»¶å°æå®è·¯å¾ |
| | | try { |
| | | Files.copy(file.getInputStream(), new File(urlString).toPath(), StandardCopyOption.REPLACE_EXISTING); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | inReport("/word/" + pathName, insReport.getId()); |
| | | } |
| | | // File tempFile = null; |
| | | // File unzipDir = null; |
| | | // try { |
| | | // tempFile = File.createTempFile(wordUrl, ".zip"); |
| | | // file.transferTo(tempFile); |
| | | // |
| | | // unzipDir = new File("uploaded_files"); |
| | | // if (!unzipDir.exists()) { |
| | | // unzipDir.mkdir(); |
| | | // } |
| | | // unzip(tempFile, unzipDir); |
| | | // // å¤çè§£ååçæä»¶ |
| | | // File[] files = unzipDir.listFiles(); |
| | | // if (files != null) { |
| | | // for (File f : files) { |
| | | // // æ ¹æ®æä»¶åæ¥è¯¢id |
| | | // String name = f.getName(); |
| | | // String code = f.getName().replace(".docx", "").replace("JCZX", "JCZX/"); |
| | | // if(f.getName().lastIndexOf("_") != -1) { |
| | | // code = code.substring(f.getName().lastIndexOf("_") + 1); |
| | | // } |
| | | // //InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().eq(InsReport::getCode, f.getName().replace(".docx", "").replace("JCZX", "JCZX/"))); |
| | | // InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().eq(InsReport::getCode, code)); |
| | | // if (ObjectUtils.isEmpty(insReport)) { |
| | | // throw new ErrorException("æ²¡ææ¾å° " + f.getName() + " è¿ä¸ªæä»¶å¯¹åºçæ¥åæ°æ®"); |
| | | // } |
| | | // // 妿UrlSæå¼ å
å°è¯¥æä»¶å é¤ |
| | | // if(Strings.isNotEmpty(insReport.getUrlS())) { |
| | | // String url = wordUrl + File.separator + insReport.getUrlS().replace("/word/", ""); |
| | | // File file1 = new File(url); |
| | | // if(file1.exists()) { |
| | | // file1.delete(); |
| | | // } |
| | | // } |
| | | // String urlString; |
| | | // String pathName; |
| | | // try { |
| | | // String path = wordUrl; |
| | | // File realpath = new File(path); |
| | | // if (!realpath.exists()) { |
| | | // realpath.mkdirs(); |
| | | // } |
| | | // pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + insReport.getCode().replace("/", "") + ".docx"; |
| | | // urlString = realpath + "/" + pathName; |
| | | // // å¤å¶æä»¶å°æå®è·¯å¾ |
| | | // Files.copy(f.toPath(), new File(urlString).toPath(), StandardCopyOption.REPLACE_EXISTING); |
| | | // inReport("/word/" + pathName, insReport.getId()); |
| | | // } |
| | | // catch (IOException e) { |
| | | // throw new ErrorException("æä»¶ä¸ä¼ 失败"); |
| | | // } |
| | | // } |
| | | // } |
| | | // } catch (IOException e) { |
| | | // throw new ErrorException("æä»¶å¤ç失败"); |
| | | // } finally { |
| | | // if (tempFile != null && tempFile.exists()) { |
| | | // tempFile.delete(); |
| | | // } |
| | | // // éå½å é¤è§£åç®å½åå
¶ä¸çæä»¶ |
| | | // if (unzipDir.exists()) { |
| | | // deleteDirectory(unzipDir); // å 餿§çä¸´æ¶æä»¶å¤¹ |
| | | // } |
| | | // } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void withdraw(Map<String,Object> map) { |
| | | Integer id = Integer.parseInt(map.get("id").toString()); |
| | | List<String> list = JSONArray.parseArray(map.get("laboratory").toString(), String.class); |
| | | Integer insOrderId = insReportMapper.selectById(id).getInsOrderId(); |
| | | List<InsOrderState> insOrderStateS = insOrderStateMapper.selectList(new LambdaQueryWrapper<InsOrderState>() |
| | | .eq(InsOrderState::getInsOrderId, insOrderId) |
| | | .in(CollectionUtils.isNotEmpty(list),InsOrderState::getLaboratory, list)); |
| | | if(CollectionUtils.isNotEmpty(insOrderStateS)) { |
| | | List<Integer> collect = insOrderStateS.stream().map(InsOrderState::getId).collect(Collectors.toList()); |
| | | // ä¿®æ¹è¯¥ååè¯éªå®¤çç¶æä¸ºå¾
夿 ¸ï¼å 餿¥åä¿¡æ¯ |
| | | insOrderStateMapper.update(null,new LambdaUpdateWrapper<InsOrderState>() |
| | | .set(InsOrderState::getInsState,3) // å¾
夿 ¸ |
| | | .in(InsOrderState::getId,collect)); |
| | | insReportMapper.delete(new LambdaQueryWrapper<InsReport>().eq(InsReport::getId,id)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getLaboratoryByReportId(Integer id) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | Integer insOrderId = insReportMapper.selectById(id).getInsOrderId(); |
| | | insOrderStateMapper.selectList(new LambdaQueryWrapper<InsOrderState>() |
| | | .eq(InsOrderState::getInsOrderId,insOrderId)) |
| | | .forEach(insOrderState -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("label",insOrderState.getLaboratory()); |
| | | map.put("value",insOrderState.getLaboratory()); |
| | | list.add(map); |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getReportCountInfo(ReportPageDto reportPageDto) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | User user = userMapper.selectById(SecurityUtils.getUserId());//å½åç»å½ç人 |
| | | //è·åå½å人æå±å®éªå®¤id |
| | | String departLimsId = user.getDepartLimsId(); |
| | | String laboratory = null; |
| | | if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.isEmpty()) { |
| | | String[] split = departLimsId.split(","); |
| | | //æ¥è¯¢å¯¹åºæ¶æåç§°(éä¿¡å®éªå®¤,çµåå®éªå®¤,æ£æµå) |
| | | String departLims = insOrderMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("å®éªå®¤")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | QueryWrapper<ReportPageDto> wrapper = QueryWrappers.queryWrappers(reportPageDto); |
| | | if(Objects.nonNull(reportPageDto.getCreateTimeRange())){ |
| | | wrapper.gt(reportPageDto.getCreateTimeRange().size()>1,"create_time",reportPageDto.getCreateTimeRange().get(0)) |
| | | .lt(reportPageDto.getCreateTimeRange().size()>1,"create_time",reportPageDto.getCreateTimeRange().get(1)); |
| | | |
| | | } |
| | | map.put("unSubmitCount",insReportMapper.findReportCountInfo(wrapper,laboratory,"ir.write_user_id").size()); |
| | | map.put("unExamineCount",insReportMapper.findReportCountInfo(wrapper,laboratory,"ir.is_examine").size()); |
| | | map.put("unRatifyCount",insReportMapper.findReportCountInfo(wrapper,laboratory,"ir.is_ratify").size()); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void batchApprovalReport(List<Integer> ids) { |
| | | redisTemplate.setKeySerializer(new StringRedisSerializer()); |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | String key = SYNC_REPORT_KEY_PREFIX+userId; |
| | | //æ§è¡åå é¤ä¹åçkeys |
| | | deleteRedisKeys(key); |
| | | synchronized (key) { |
| | | redisTemplate.opsForValue().set(key,1); |
| | | RequestContextHolder.setRequestAttributes(RequestContextHolder.getRequestAttributes(),true); |
| | | //弿¥æ§è¡å®¡æ¹æä½ |
| | | CompletableFuture.runAsync(() -> { |
| | | try { |
| | | runBatchApproval(ids,key); |
| | | }catch (Exception e){ |
| | | //å é¤key |
| | | deleteRedisKeys(key); |
| | | redisTemplate.opsForValue().set(key+"_exception",e.getMessage()); |
| | | } |
| | | },threadPoolTaskExecutor); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å é¤redis key |
| | | * @param key |
| | | */ |
| | | private void deleteRedisKeys(String key){ |
| | | redisTemplate.delete(key); |
| | | redisTemplate.delete(key+"_num"); |
| | | redisTemplate.delete(key+"_count"); |
| | | redisTemplate.delete(key+"_surplus"); |
| | | redisTemplate.delete(key+"_exception"); |
| | | } |
| | | |
| | | /** |
| | | * æ§è¡å®¡æ¹æä½ |
| | | * @param ids æ¥åidå表 |
| | | */ |
| | | private void runBatchApproval(List<Integer> ids,String keyPrefix) { |
| | | if(ids.isEmpty()){ |
| | | return; |
| | | } |
| | | long start = System.currentTimeMillis(); |
| | | String surplusKey = keyPrefix + "_surplus";//å©ä½æ¡æ° |
| | | String numKey = keyPrefix + "_num";//æ»è¿åº¦ |
| | | String countKey = keyPrefix + "_count";//æ»æ¡æ° |
| | | redisTemplate.opsForValue().set(countKey, ids.size()); |
| | | redisTemplate.opsForValue().set(surplusKey, ids.size()); |
| | | Object countObj = redisTemplate.opsForValue().get(countKey); |
| | | long parsed2 = Long.parseLong(String.valueOf(countObj)); |
| | | AtomicLong count = new AtomicLong(parsed2); |
| | | for (Integer id : ids) { |
| | | //ä¸å¡ä»£ç |
| | | InsReport insReport = insReportMapper.selectById(id); |
| | | String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory(); |
| | | //è·åç¾ååå°ç« |
| | | String sealUrl; |
| | | String writeUrl; |
| | | String examineUrl; |
| | | String ratifyUrl; |
| | | int writeId; |
| | | int examineId; |
| | | int ratifyId; |
| | | try { |
| | | sealUrl = insReportMapper.getLaboratoryByName(laboratory);//å°ç« |
| | | Map<String,Object> urlMap = insReportApproveConfigMapper.selectApprovalConfigByLaboratory(laboratory);//ç¾å |
| | | writeUrl = imgUrl + "/" + (Objects.isNull(urlMap.get("writeUrl"))?"":urlMap.get("writeUrl").toString());//ç¼å¶äººç¾åurl |
| | | examineUrl = imgUrl + "/" + (Objects.isNull(urlMap.get("examineUrl"))?"":urlMap.get("examineUrl").toString());//å®¡æ ¸äººç¾åurl |
| | | ratifyUrl = imgUrl + "/" + (Objects.isNull(urlMap.get("ratifyUrl"))?"":urlMap.get("ratifyUrl").toString());//æ¹å人ç¾åurl |
| | | writeId = Integer.parseInt(urlMap.get("writeId").toString());//ç¼å¶äºº |
| | | examineId = Integer.parseInt(urlMap.get("examineId").toString());//å®¡æ ¸äººç¾ |
| | | ratifyId =Integer.parseInt(urlMap.get("ratifyId").toString());//æ¹å人 |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ¾ä¸å°ç¾ååå°ç« "); |
| | | } |
| | | //设置æ¥åä¿¡æ¯ |
| | | insReport.setIsExamine(1); |
| | | insReport.setIsRatify(1); |
| | | insReport.setState(1); |
| | | insReport.setWriteUserId(writeId); |
| | | insReport.setExamineUserId(examineId); |
| | | insReport.setRatifyUserId(ratifyId); |
| | | if(Objects.isNull(insReport.getWriteTime())){ |
| | | insReport.setWriteTime(LocalDateTime.now()); |
| | | } |
| | | if(Objects.isNull(insReport.getExamineTime())){ |
| | | insReport.setExamineTime(LocalDateTime.now()); |
| | | } |
| | | if(Objects.isNull(insReport.getRatifyTime())){ |
| | | insReport.setRatifyTime(LocalDateTime.now()); |
| | | } |
| | | //æ´æ°è®¢åç¶æ |
| | | InsOrder insOrder = new InsOrder(); |
| | | insOrder.setId(insReport.getInsOrderId()); |
| | | insOrder.setState(4); |
| | | insOrderMapper.updateById(insOrder); |
| | | //ç³»ç»çææ¥åå°å |
| | | String url = insReport.getUrl(); |
| | | //æå¨ä¸ä¼ æ¥åå°å |
| | | String urlS = insReport.getUrlS(); |
| | | String finalUrl = (StringUtils.isBlank(urlS) ? url : urlS).replace("/word", wordUrl); |
| | | wordInsertUrl(new HashMap<String, Object>() {{ |
| | | put("writeUrl", new FilePictureRenderData(100,50,writeUrl)); |
| | | put("examineUrl", new FilePictureRenderData(100,50,examineUrl)); |
| | | put("ratifyUrl", new FilePictureRenderData(100,50,ratifyUrl)); |
| | | put("seal1", new FilePictureRenderData(600,600,imgUrl + "/" +sealUrl)); |
| | | put("seal2", new FilePictureRenderData(600,600,imgUrl + "/" +sealUrl)); |
| | | }}, finalUrl); |
| | | wordToPdf(finalUrl, sealUrl); |
| | | // ä¿®æ¹ä¸´æ¶pdf |
| | | String tempUrlPdf = wordToPdfTemp((StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl)); |
| | | insReport.setTempUrlPdf("/word/" + tempUrlPdf); |
| | | //æ´æ°æ¥åç¶æ |
| | | insReportMapper.updateById(insReport); |
| | | //æ´æ°redisçkey |
| | | Object o = redisTemplate.opsForValue().get(numKey); |
| | | if (Objects.isNull(o)) { |
| | | redisTemplate.opsForValue().set(numKey, 1); |
| | | } else { |
| | | long parsed = Long.parseLong(String.valueOf(o)); |
| | | redisTemplate.opsForValue().set(numKey, parsed + 1); |
| | | } |
| | | redisTemplate.opsForValue().set(surplusKey, count.decrementAndGet()); |
| | | } |
| | | long end = System.currentTimeMillis(); |
| | | long useTime = (end-start)/1000; |
| | | log.info("线ç¨{}æ¥å审æ¹ç»æï¼èæ¶:{}s",keyPrefix,useTime); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getBatchApprovalProgress() { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | String key = SYNC_REPORT_KEY_PREFIX + userId; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("hasProgress",false); |
| | | map.put("hasNum",0); |
| | | map.put("hasCount",0); |
| | | map.put("surplus",0); |
| | | Object o = redisTemplate.opsForValue().get(key); |
| | | if(Objects.nonNull(o)){ |
| | | map.put("hasProgress",true); |
| | | } |
| | | Object o1 = redisTemplate.opsForValue().get(key+"_num"); |
| | | Object o2 = redisTemplate.opsForValue().get(key+"_count"); |
| | | Object surplus = redisTemplate.opsForValue().get(key+"_surplus"); |
| | | Object exception = redisTemplate.opsForValue().get(key+"_exception"); |
| | | if(Objects.nonNull(surplus)){ |
| | | map.put("surplus",surplus); |
| | | } |
| | | if (Objects.nonNull(o1)&&Objects.nonNull(o2)){ |
| | | //å¾å°è¿åº¦ |
| | | BigDecimal multiply = new BigDecimal(String.valueOf(o1)).divide(new BigDecimal(String.valueOf(o2)), 2,BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(100)); |
| | | map.put("hasNum",multiply); |
| | | map.put("hasCount",Long.parseLong(String.valueOf(o2))); |
| | | } |
| | | map.put("hasException",exception); |
| | | return map; |
| | | } |
| | | |
| | | //è§£åæä»¶å¤¹ |
| | | private void unzip(File zipFile, File destDir) throws IOException { |
| | | try (ZipFile zip = new ZipFile(zipFile)) { |
| | | Enumeration<? extends ZipEntry> entries = zip.entries(); |
| | | while (entries.hasMoreElements()) { |
| | | ZipEntry entry = entries.nextElement(); |
| | | File file = new File(destDir, entry.getName()); |
| | | if (entry.isDirectory()) { |
| | | file.mkdirs(); |
| | | } else { |
| | | file.getParentFile().mkdirs(); |
| | | try (InputStream in = zip.getInputStream(entry); |
| | | OutputStream out = new FileOutputStream(file)) { |
| | | byte[] buffer = new byte[1024]; |
| | | int len; |
| | | while ((len = in.read(buffer)) > 0) { |
| | | out.write(buffer, 0, len); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // å缩æä»¶å¤¹ |
| | | public static void zipDirectory(String sourceDirPath, String zipFilePath) throws IOException { |
| | | try (ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFilePath))) { |
| | | Path sourceDir = Paths.get(sourceDirPath); |
| | | Files.walk(sourceDir) |
| | | .filter(path -> !Files.isDirectory(path)) |
| | | .forEach(path -> { |
| | | ZipEntry zipEntry = new ZipEntry(sourceDir.relativize(path).toString()); |
| | | try { |
| | | zipOut.putNextEntry(zipEntry); |
| | | Files.copy(path, zipOut); |
| | | zipOut.closeEntry(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // å 餿件夹åå
¶å
容 |
| | | public static void deleteDirectory(File directory) throws IOException { |
| | | if (directory.isDirectory()) { |
| | | File[] files = directory.listFiles(); |
| | | if (files != null) { |
| | | for (File file : files) { |
| | | deleteDirectory(file); |
| | | } |
| | | } |
| | | } |
| | | Files.delete(directory.toPath()); |
| | | } |
| | | |
| | | /** |
| | | * word转æ¢pdf |
| | | * @param path |
| | | * @return |
| | | */ |
| | | public String wordToPdfTemp(String path) { |
| | | try { |
| | | return wordToPdf(path, path.replace(".docx", ".pdf")); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("转æ¢å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | public String wordToPdf(String wordPath, String pdfPath) { |
| | | FileOutputStream os = null; |
| | | try { |
| | | //åè¯ ä¸ç¶åæ¢åææ°´å° |
| | | InputStream is = Files.newInputStream(new File(licenseUrl).toPath()); |
| | | License license = new License(); |
| | | license.setLicense(is); |
| | | if (!license.getIsLicensed()) { |
| | | System.out.println("Licenseéªè¯ä¸éè¿..."); |
| | | return null; |
| | | } |
| | | //çæä¸ä¸ªç©ºçPDFæä»¶ |
| | | File file; |
| | | //夿æ¯å¦æ¯è¿åæ¥å |
| | | file = new File(pdfPath); |
| | | os = new FileOutputStream(file); |
| | | //è¦è½¬æ¢çwordæä»¶ |
| | | Document doc = new Document(wordPath); |
| | | doc.save(os, SaveFormat.PDF); |
| | | String name = file.getName(); |
| | | return file.getName(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (os != null) { |
| | | try { |
| | | os.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // @Override |
| | | // public void wordToPdf(String path, String sealUrl) { |
| | | // CompletableFuture.supplyAsync(() -> { |
| | | // try { |
| | | // wordToPdf(path, path.replace(".docx", ".pdf"), sealUrl); |
| | | // return null; |
| | | // } catch (Exception e) { |
| | | // throw new ErrorException("转æ¢å¤±è´¥"); |
| | | // } |
| | | // }).thenAccept(res -> { |
| | | // }).exceptionally(e -> { |
| | | // e.printStackTrace(); |
| | | // return null; |
| | | // }); |
| | | // } |
| | | |
| | | |
| | | |
| | | // public String wordToPdf(String wordPath, String pdfPath, String sealUrl) { |
| | | // FileOutputStream os = null; |
| | | // try { |
| | | // //åè¯ ä¸ç¶åæ¢åææ°´å° |
| | | //// InputStream inputStream = this.getClass().getResourceAsStream("/lib/license.xml"); |
| | | // /*String url; |
| | | // try { |
| | | // InputStream inputStream = this.getClass().getResourceAsStream("/lib/license.xml"); |
| | | // File file = File.createTempFile("temp", ".tmp"); |
| | | // OutputStream outputStream = new FileOutputStream(file); |
| | | // IOUtils.copy(inputStream, outputStream); |
| | | // url = file.getAbsolutePath(); |
| | | // } catch (FileNotFoundException e) { |
| | | // throw new ErrorException("æ¾ä¸å°æ¨¡æ¿æä»¶"); |
| | | // } catch (IOException e) { |
| | | // throw new RuntimeException(e); |
| | | // }*/ |
| | | // InputStream is = new ClassPathResource("/lib/license.xml").getInputStream(); |
| | | // License license = new License(); |
| | | // license.setLicense(is); |
| | | // if (!license.getIsLicensed()) { |
| | | // System.out.println("Licenseéªè¯ä¸éè¿..."); |
| | | // return null; |
| | | // } |
| | | // //çæä¸ä¸ªç©ºçPDFæä»¶ |
| | | // File file = new File(pdfPath.replace(".pdf", "-1.pdf")); |
| | | // os = new FileOutputStream(file); |
| | | // //è¦è½¬æ¢çwordæä»¶ |
| | | // com.aspose.words.Document doc = new com.aspose.words.Document(wordPath); |
| | | // doc.save(os, SaveFormat.PDF); |
| | | // |
| | | // //æ·»å éªç¼ç« |
| | | // stamperCheckMarkPDF(pdfPath.replace(".pdf", "-1.pdf"), pdfPath, imgUrl + "/" + sealUrl); |
| | | // |
| | | // |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } finally { |
| | | // if (os != null) { |
| | | // try { |
| | | // os.close(); |
| | | // } catch (IOException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | // } |
| | | // return null; |
| | | // } |
| | | |
| | | /** |
| | | * åå²å¾ç |
| | | * |
| | | * @param Path å¾çè·¯å¾ |
| | | * @param n åå²ä»½æ° |
| | | */ |
| | | public static com.itextpdf.text.Image[] slicingImages(String Path, int n) throws IOException, BadElementException { |
| | | com.itextpdf.text.Image[] nImage = new com.itextpdf.text.Image[n]; |
| | | BufferedImage img = ImageIO.read(new File(Path)); |
| | | |
| | | int h = img.getHeight(); |
| | | int w = img.getWidth(); |
| | | |
| | | int sw = w / n; |
| | | for (int i = 0; i < n; i++) { |
| | | BufferedImage subImg; |
| | | if (i == n - 1) {//æåå©ä½é¨å |
| | | subImg = img.getSubimage(i * sw, 0, w - i * sw, h); |
| | | } else {//ån-1åååå |
| | | subImg = img.getSubimage(i * sw, 0, sw, h); |
| | | } |
| | | ByteArrayOutputStream out = new ByteArrayOutputStream(); |
| | | ImageIO.write(subImg, Path.substring(Path.lastIndexOf('.') + 1), out); |
| | | nImage[i] = com.itextpdf.text.Image.getInstance(out.toByteArray()); |
| | | |
| | | } |
| | | return nImage; |
| | | } |
| | | |
| | | /** |
| | | * çéªç¼ç« |
| | | * |
| | | * @param infilePath åPDFè·¯å¾ |
| | | * @param outFilePath è¾åºPDFè·¯å¾ |
| | | */ |
| | | public static void stamperCheckMarkPDF(String infilePath, String outFilePath, String picPath) throws IOException, DocumentException { |
| | | PdfReader reader = new PdfReader(infilePath);//éæ©éè¦å°ç« çpdf |
| | | PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(outFilePath));//å å®å°ç« åçpdf |
| | | |
| | | |
| | | com.itextpdf.text.Rectangle pageSize = reader.getPageSize(1);//è·å¾ç¬¬ä¸é¡µ |
| | | float height = pageSize.getHeight(); |
| | | float width = pageSize.getWidth(); |
| | | |
| | | int nums = reader.getNumberOfPages(); |
| | | com.itextpdf.text.Image[] nImage = slicingImages(picPath, nums);//çæéªç¼ç« åå²å¾ç |
| | | |
| | | for (int n = 1; n <= nums; n++) { |
| | | PdfContentByte over = stamp.getOverContent(n);//设置å¨ç¬¬å 页æå°å°ç« |
| | | com.itextpdf.text.Image img = nImage[n - 1];//éæ©å¾ç |
| | | float newHeight = 100f; |
| | | float newWidth = img.getWidth() / (img.getHeight() / 100); |
| | | img.scaleAbsolute(newWidth, newHeight);//æ§å¶å¾çå¤§å° |
| | | img.setAbsolutePosition(width - newWidth, height / 2 - newHeight / 2);//æ§å¶å¾çä½ç½® |
| | | over.addImage(img); |
| | | } |
| | | stamp.close(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.numgen.NumberGenerator; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.require.dto.InstructionDto; |
| | | import com.ruoyi.require.mapper.InstructionMapper; |
| | | import com.ruoyi.require.pojo.Instruction; |
| | | import com.ruoyi.require.service.InstructionService; |
| | | import com.ruoyi.require.service.OperationInstructionService; |
| | | 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; |
| | | |
| | | /** |
| | | * <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; |
| | | |
| | | @Override |
| | | public IPage<Instruction> pageByPageQueryOfHomeworkInstructions(Page page) { |
| | | return baseMapper.pageByPageQueryOfHomeworkInstructions(page); |
| | | } |
| | | |
| | | @Override |
| | | public void newHomeworkGuidebookAdded(InstructionDto instructionDto) { |
| | | 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(SecurityUtils.getUserId().intValue()); |
| | | i.setUpdateTime(LocalDateTime.now()); |
| | | }); |
| | | operationInstructionService.saveOrUpdateBatch(instructionDto.getFeTempHumRecordList()); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.InternalWastesDetailMapper; |
| | | import com.ruoyi.require.pojo.InternalWastesDetail; |
| | | import com.ruoyi.require.service.InternalWastesDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®°è¯¦æ
æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:54 |
| | | */ |
| | | @Service |
| | | public class InternalWastesDetailServiceImpl extends ServiceImpl<InternalWastesDetailMapper, InternalWastesDetail> implements InternalWastesDetailService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.require.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.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.framework.util.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.require.dto.InternalWastesDto; |
| | | import com.ruoyi.require.mapper.InternalWastesMapper; |
| | | import com.ruoyi.require.pojo.InternalWastes; |
| | | import com.ruoyi.require.pojo.InternalWastesDetail; |
| | | import com.ruoyi.require.service.InternalWastesDetailService; |
| | | import com.ruoyi.require.service.InternalWastesService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å®å
¨å
å¡ä¸åºç»è®° æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-19 06:39:27 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class InternalWastesServiceImpl extends ServiceImpl<InternalWastesMapper, InternalWastes> implements InternalWastesService { |
| | | |
| | | private InternalWastesDetailService internalWastesDetailService; |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºç»è®°å页æ¥è¯¢ |
| | | * @param page |
| | | * @param internalWastes |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<InternalWastesDto> pageInternalWastes(Page page, InternalWastes internalWastes) { |
| | | return baseMapper.pageInternalWastes(page, QueryWrappers.queryWrappers(internalWastes)); |
| | | } |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºç»è®°æ°å¢ |
| | | * @param internalWastes |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addInternalWastes(InternalWastesDto internalWastes) { |
| | | |
| | | baseMapper.insert(internalWastes); |
| | | // æ°å¢è¯¦æ
|
| | | for (InternalWastesDetail internalWastesDetail : internalWastes.getWastesDetailList()) { |
| | | internalWastesDetail.setWastesId(internalWastes.getWastesId()); |
| | | } |
| | | internalWastesDetailService.saveBatch(internalWastes.getWastesDetailList()); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºç»è®°ä¿®æ¹ |
| | | * @param internalWastes |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateInternalWastes(InternalWastesDto internalWastes) { |
| | | baseMapper.updateById(internalWastes); |
| | | |
| | | // å é¤ä¹åç详æ
|
| | | internalWastesDetailService.remove(Wrappers.<InternalWastesDetail>lambdaQuery() |
| | | .eq(InternalWastesDetail::getWastesId, internalWastes.getWastesId())); |
| | | |
| | | // æ°å¢è¯¦æ
|
| | | for (InternalWastesDetail internalWastesDetail : internalWastes.getWastesDetailList()) { |
| | | internalWastesDetail.setWastesId(internalWastes.getWastesId()); |
| | | } |
| | | internalWastesDetailService.saveBatch(internalWastes.getWastesDetailList()); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºç»è®°å é¤ |
| | | * @param WastesId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean delInternalWastes(Integer WastesId) { |
| | | internalWastesDetailService.remove(Wrappers.<InternalWastesDetail>lambdaQuery() |
| | | .eq(InternalWastesDetail::getWastesId, WastesId)); |
| | | baseMapper.deleteById(WastesId); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å®å
¨å
å¡ä¸åºç»è®°æ¥ç详æ
|
| | | * @param WastesId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public InternalWastesDto getInternalWastesOne(Integer WastesId) { |
| | | InternalWastes internalWastes = baseMapper.selectById(WastesId); |
| | | InternalWastesDto internalWastesDto = new InternalWastesDto(); |
| | | BeanUtils.copyProperties(internalWastes, internalWastesDto); |
| | | |
| | | // æ¥è¯¢è¯¦ç»ä¿¡æ¯ |
| | | internalWastesDto.setWastesDetailList(internalWastesDetailService.list(Wrappers.<InternalWastesDetail>lambdaQuery() |
| | | .eq(InternalWastesDetail::getWastesId, WastesId))); |
| | | return internalWastesDto; |
| | | } |
| | | |
| | | /** |
| | | * 导åºä¸åºå¤ç |
| | | * @param wastesId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportInternalWastes(Integer wastesId, HttpServletResponse response) { |
| | | InternalWastes internalWastes = baseMapper.selectById(wastesId); |
| | | |
| | | List<InternalWastesDetail> wastesDetailList = internalWastesDetailService.list(Wrappers.<InternalWastesDetail>lambdaQuery() |
| | | .eq(InternalWastesDetail::getWastesId, wastesId)); |
| | | |
| | | int index = 1; |
| | | for (InternalWastesDetail detail : wastesDetailList) { |
| | | detail.setIndex(index); |
| | | index++; |
| | | } |
| | | |
| | | |
| | | // è·åè·¯å¾ |
| | | InputStream inputStream = this.getClass().getResourceAsStream("/static/internal-wastes.docx"); |
| | | Configure configure = Configure.builder() |
| | | .bind("wastesDetailList", new HackLoopTableRenderPolicy()) |
| | | .build(); |
| | | XWPFTemplate template = XWPFTemplate.compile(inputStream, configure).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("remark", internalWastes.getRemark()); |
| | | put("wastesDetailList", wastesDetailList); |
| | | }}); |
| | | |
| | | 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.ruoyi.require.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.require.mapper.OperationInstructionMapper; |
| | | import com.ruoyi.require.pojo.OperationInstruction; |
| | | import com.ruoyi.require.service.OperationInstructionService; |
| | | import com.ruoyi.require.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.ruoyi.require.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.vo.StandardProductVO; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.exception.ErrorException; |
| | | import com.ruoyi.inspect.mapper.*; |
| | | import com.ruoyi.inspect.pojo.*; |
| | | import com.ruoyi.inspect.vo.ProductVo; |
| | | import com.ruoyi.performance.mapper.AuxiliaryOutputWorkingHoursMapper; |
| | | import com.ruoyi.performance.mapper.PerformanceShiftMapper; |
| | | import com.ruoyi.performance.mapper.ShiftTimeMapper; |
| | | import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours; |
| | | import com.ruoyi.performance.pojo.PerformanceShift; |
| | | import com.ruoyi.performance.pojo.ShiftTime; |
| | | import com.ruoyi.require.mapper.PkMasterMapper; |
| | | import com.ruoyi.require.mapper.PkSlaveMapper; |
| | | import com.ruoyi.require.pojo.PkMaster; |
| | | import com.ruoyi.require.pojo.PkSlave; |
| | | import com.ruoyi.require.service.InsOrderPlanService; |
| | | import com.ruoyi.require.service.PkMasterService; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author æ±èéµ·éç½ç»ç§ææéå
¬å¸ |
| | | * @since 2024-07-29 01:16:26 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class PkMasterServiceImpl extends ServiceImpl<PkMasterMapper, PkMaster> implements PkMasterService { |
| | | |
| | | @Resource |
| | | private PkMasterMapper pkMasterMapper; |
| | | |
| | | @Resource |
| | | private PkSlaveMapper pkSlaveMapper; |
| | | |
| | | @Resource |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | @Resource |
| | | private InsSampleMapper insSampleMapper; |
| | | |
| | | @Resource |
| | | private InsProductMapper insProductMapper; |
| | | |
| | | @Resource |
| | | private InsProductResultMapper insProductResultMapper; |
| | | |
| | | @Resource |
| | | private InsProductUserMapper insProductUserMapper; |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | |
| | | @Resource |
| | | private InsOrderPlanService insOrderPlanService; |
| | | |
| | | @Resource |
| | | private InsOrderPlanServiceImpl insOrderPlanServiceImpl; |
| | | |
| | | @Resource |
| | | private ShiftTimeMapper shiftTimeMapper; |
| | | @Resource |
| | | private PerformanceShiftMapper performanceShiftMapper; |
| | | |
| | | @Resource |
| | | private AuxiliaryOutputWorkingHoursMapper auxiliaryOutputWorkingHoursMapper; |
| | | |
| | | //æ¸©åº¦å¾ªç¯æ°é |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int temDataAcquisition(PkMaster pkMaster) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | //æ¥è¯¢æ°éå
³èçåè¡¨ä¿¡æ¯ |
| | | PkMaster master = new PkMaster(); |
| | | List<PkMaster> pkMasters = pkMasterMapper.selectList(Wrappers.<PkMaster>lambdaQuery() |
| | | .eq(PkMaster::getEntrustCode, pkMaster.getEntrustCode()) |
| | | .eq(PkMaster::getSampleCode, pkMaster.getSampleCode()) |
| | | .eq(PkMaster::getModel, pkMaster.getModel()) |
| | | .eq(PkMaster::getCycles, pkMaster.getCycles()) |
| | | .eq(PkMaster::getTemperature, pkMaster.getTemperature()).orderByDesc(PkMaster::getId)); |
| | | if(!pkMasters.isEmpty()){ |
| | | master = pkMasters.get(0); |
| | | } |
| | | //æ¥è¯¢å¯¹åºçæ£éªå表 |
| | | InsOrder insOrder = insOrderMapper.selectOne(Wrappers.<InsOrder>lambdaQuery().eq(InsOrder::getState, 1).eq(InsOrder::getEntrustCode, pkMaster.getEntrustCode())); |
| | | if (ObjectUtils.isEmpty(insOrder)) { |
| | | throw new ErrorException("æ²¡ææ¾å°å¯¹åºå§æå" + pkMaster.getEntrustCode()); |
| | | } |
| | | //æ¥è¯¢å¯¹åºæ£éªæ ·åid |
| | | InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insOrder.getId()) |
| | | .eq(InsSample::getSampleCode, pkMaster.getSampleCode()) |
| | | .eq(InsSample::getModel, pkMaster.getModel())); |
| | | if (ObjectUtils.isEmpty(insSample)) { |
| | | throw new ErrorException("æ²¡ææ¾å°å¯¹åºå§æåä¸çè¯¥æ ·å" + pkMaster.getSampleCode()); |
| | | } if (ObjectUtils.isNotEmpty(master)) { |
| | | //throw new ErrorException("æ²¡ææ¾å°å¯¹åºå§æå" + pkMaster.getEntrustCode() + "çæ°éæ°æ®"); |
| | | List<PkSlave> pkSlaves = pkSlaveMapper.selectList1(master.getIsid()); |
| | | if (CollectionUtils.isEmpty(pkSlaves)) { |
| | | throw new ErrorException("æ²¡ææ¾å°å¯¹åºå§æå" + pkMaster.getEntrustCode() + "çæ°éåæ°æ®"); |
| | | } |
| | | |
| | | //æ¥è¯¢å¯¹åºæ£éªé¡¹ç® |
| | | Map<String, Object> map = insOrderPlanService.temCycle(insSample.getId(), pkMaster.getCycles(), pkMaster.getTemperature()); |
| | | List<ProductVo> productVos = (List<ProductVo>) map.get("productVos"); |
| | | if (CollectionUtils.isNotEmpty(productVos)) { |
| | | //todo å¦ææ¸©åº¦å¾ªç¯ç项ç®nmææ¹å¨è¿ééè¦æ¹å¨ @zss |
| | | for (PkSlave pkSlave : pkSlaves) { |
| | | for (ProductVo productVo : productVos) { |
| | | if (pkSlave.getInsBushingId().equals(productVo.getBushColor()) && |
| | | pkSlave.getInsFibersId().equals(productVo.getCode()) && |
| | | pkSlave.getInsFiberId().equals(productVo.getColor())) { |
| | | //æ¾å°å¯¹åºçæ°æ®(对åºå¥ç®¡å
çº¤çæ°æ®) |
| | | List<InsProductResult> results = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, productVo.getInsProduct().getId())); |
| | | InsProductResult result; |
| | | if (CollectionUtils.isEmpty(results)) { |
| | | result = new InsProductResult(); |
| | | } else { |
| | | result = results.get(0); |
| | | } |
| | | result.setInsProductId(productVo.getInsProduct().getId());//æ£éªé¡¹ç®id |
| | | List<Map<String, Object>> iv = new ArrayList<>(); |
| | | List<Map<String, Object>> cv = new ArrayList<>(); |
| | | if (productVo.getInsProduct().getInspectionItemClass().equals("1310nm")) { |
| | | //1310nmå¤ç«¯ |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("u", userId + ""); |
| | | map1.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1310A()) ? pkSlave.getWeaken1310A().toString() : null); |
| | | iv.add(map1); |
| | | //1310nmå
端 |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("u", userId + ""); |
| | | map2.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1310B()) ? pkSlave.getWeaken1310B().toString() : null); |
| | | iv.add(map2); |
| | | //1310nmè¡°åç³»æ° |
| | | Map<String, Object> map3 = new HashMap<>(); |
| | | double v = 0.0; |
| | | if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1310A()) && ObjectUtils.isNotEmpty(pkSlave.getWeaken1310B())) { |
| | | v = (pkSlave.getWeaken1310A() + pkSlave.getWeaken1310B()) / 2; |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1310A()) && ObjectUtils.isEmpty(pkSlave.getWeaken1310B())) { |
| | | v = pkSlave.getWeaken1310A(); |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1310B()) && ObjectUtils.isEmpty(pkSlave.getWeaken1310A())) { |
| | | v = pkSlave.getWeaken1310B(); |
| | | } else { |
| | | log.info("æ°éidï¼{}", pkSlave.getId()); |
| | | throw new ErrorException("1310çä¸¤ç«¯é½æ²¡ææ°æ®!!!"); |
| | | } |
| | | BigDecimal decimal = BigDecimal.valueOf(v).setScale(3, RoundingMode.HALF_UP); |
| | | map3.put("v", String.valueOf(decimal)); |
| | | cv.add(map3); |
| | | } else if (productVo.getInsProduct().getInspectionItemClass().equals("1550nm")) { |
| | | //1550nmå¤ç«¯ |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("u", userId + ""); |
| | | map1.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1550A()) ? pkSlave.getWeaken1550A().toString() : null); |
| | | iv.add(map1); |
| | | //1550nmå
端 |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("u", userId + ""); |
| | | map2.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1550B()) ? pkSlave.getWeaken1550B().toString() : null); |
| | | iv.add(map2); |
| | | //1550nmè¡°åç³»æ° |
| | | Map<String, Object> map3 = new HashMap<>(); |
| | | double v = 0.0; |
| | | if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1550A()) && ObjectUtils.isNotEmpty(pkSlave.getWeaken1550B())) { |
| | | v = (pkSlave.getWeaken1550A() + pkSlave.getWeaken1550B()) / 2; |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1550A()) && ObjectUtils.isEmpty(pkSlave.getWeaken1550B())) { |
| | | v = pkSlave.getWeaken1550A(); |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1550B()) && ObjectUtils.isEmpty(pkSlave.getWeaken1550A())) { |
| | | v = pkSlave.getWeaken1550B(); |
| | | } else { |
| | | throw new ErrorException("1550çä¸¤ç«¯é½æ²¡ææ°æ®!!!"); |
| | | } |
| | | BigDecimal decimal = BigDecimal.valueOf(v).setScale(3, RoundingMode.HALF_UP); |
| | | map3.put("v", String.valueOf(decimal)); |
| | | cv.add(map3); |
| | | } else if (productVo.getInsProduct().getInspectionItemClass().equals("1625nm")) { |
| | | //1625nmå¤ç«¯ |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("u", userId + ""); |
| | | map1.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1625A()) ? pkSlave.getWeaken1625A().toString() : null); |
| | | iv.add(map1); |
| | | //1625nmå
端 |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("u", userId + ""); |
| | | map2.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1625B()) ? pkSlave.getWeaken1625B().toString() : null); |
| | | iv.add(map2); |
| | | //1625nmè¡°åç³»æ° |
| | | Map<String, Object> map3 = new HashMap<>(); |
| | | double v = 0.0; |
| | | if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1625A()) && ObjectUtils.isNotEmpty(pkSlave.getWeaken1625B())) { |
| | | v = (pkSlave.getWeaken1625A() + pkSlave.getWeaken1625B()) / 2; |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1625A()) && ObjectUtils.isEmpty(pkSlave.getWeaken1625B())) { |
| | | v = pkSlave.getWeaken1625A(); |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1625B()) && ObjectUtils.isEmpty(pkSlave.getWeaken1625A())) { |
| | | v = pkSlave.getWeaken1625B(); |
| | | } else { |
| | | throw new ErrorException("1625çä¸¤ç«¯é½æ²¡ææ°æ®!!!"); |
| | | } |
| | | BigDecimal decimal = BigDecimal.valueOf(v).setScale(3, RoundingMode.HALF_UP); |
| | | map3.put("v", String.valueOf(decimal)); |
| | | cv.add(map3); |
| | | } else if (productVo.getInsProduct().getInspectionItemClass().equals("1383nm")) { |
| | | //1383nmå¤ç«¯ |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("u", userId + ""); |
| | | map1.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1383A()) ? pkSlave.getWeaken1383A().toString() : null); |
| | | iv.add(map1); |
| | | //1383nmå
端 |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("u", userId + ""); |
| | | map2.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1383B()) ? pkSlave.getWeaken1383B().toString() : null); |
| | | iv.add(map2); |
| | | //1383nmè¡°åç³»æ° |
| | | Map<String, Object> map3 = new HashMap<>(); |
| | | double v = 0.0; |
| | | if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1383A()) && ObjectUtils.isNotEmpty(pkSlave.getWeaken1383B())) { |
| | | v = (pkSlave.getWeaken1383A() + pkSlave.getWeaken1310B()) / 2; |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1383A()) && ObjectUtils.isEmpty(pkSlave.getWeaken1383B())) { |
| | | v = pkSlave.getWeaken1383A(); |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1383B()) && ObjectUtils.isEmpty(pkSlave.getWeaken1383A())) { |
| | | v = pkSlave.getWeaken1383B(); |
| | | } else { |
| | | throw new ErrorException("1383çä¸¤ç«¯é½æ²¡ææ°æ®!!!"); |
| | | } |
| | | BigDecimal decimal = BigDecimal.valueOf(v).setScale(3, RoundingMode.HALF_UP); |
| | | map3.put("v", String.valueOf(decimal)); |
| | | cv.add(map3); |
| | | } else if (productVo.getInsProduct().getInspectionItemClass().equals("1490nm")) { |
| | | //1490nmå¤ç«¯ |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("u", userId + ""); |
| | | map1.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1490A()) ? pkSlave.getWeaken1490A().toString() : null); |
| | | iv.add(map1); |
| | | //1490nmå
端 |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("u", userId + ""); |
| | | map2.put("v", ObjectUtils.isNotEmpty(pkSlave.getWeaken1490B()) ? pkSlave.getWeaken1490B().toString() : null); |
| | | iv.add(map2); |
| | | //1490nmè¡°åç³»æ° |
| | | Map<String, Object> map3 = new HashMap<>(); |
| | | double v = 0.0; |
| | | if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1490A()) && ObjectUtils.isNotEmpty(pkSlave.getWeaken1490B())) { |
| | | v = (pkSlave.getWeaken1490A() + pkSlave.getWeaken1310B()) / 2; |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1490A()) && ObjectUtils.isEmpty(pkSlave.getWeaken1490B())) { |
| | | v = pkSlave.getWeaken1490A(); |
| | | } else if (ObjectUtils.isNotEmpty(pkSlave.getWeaken1490B()) && ObjectUtils.isEmpty(pkSlave.getWeaken1490A())) { |
| | | v = pkSlave.getWeaken1490B(); |
| | | } else { |
| | | throw new ErrorException("1490çä¸¤ç«¯é½æ²¡ææ°æ®!!!"); |
| | | } |
| | | BigDecimal decimal = BigDecimal.valueOf(v).setScale(3, RoundingMode.HALF_UP); |
| | | map3.put("v", String.valueOf(decimal)); |
| | | cv.add(map3); |
| | | } else { |
| | | throw new ErrorException("æ²¡ææ¾å°è¯¥æ¸©åº¦çæ£éªé¡¹ç®" + productVo.getInsProduct().getInspectionItemClass()); |
| | | } |
| | | result.setInsValue(JSON.toJSONString(iv));//æ£éªå¼ |
| | | result.setComValue(JSON.toJSONString(cv));//计ç®å¼ |
| | | if (BeanUtil.isEmpty(result.getId())) { |
| | | result.setCreateUser(userId); |
| | | result.setUpdateUser(userId); |
| | | insProductResultMapper.insert(result); |
| | | } else { |
| | | result.setUpdateUser(userId); |
| | | result.setUpdateTime(LocalDateTime.now()); |
| | | insProductResultMapper.updateById(result); |
| | | } |
| | | |
| | | InsProduct insProduct = productVo.getInsProduct(); |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | String[] comValue = insProductResult.getComValue().split(":"); |
| | | String comple = comValue[comValue.length-1].split("\"")[1]; |
| | | //é¦å
æ¥ç温度æ¯å¦æ¯20度常温 |
| | | if (!pkMaster.getTemperature().equals("20â(常温)")) { |
| | | //妿䏿¯å
æ¥è¯¢æ¯å¦æå¼ |
| | | int a = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "1") |
| | | .eq(InsProduct::getInspectionItemSubclass, "20â(常温)")).stream().map(InsProduct::getInsResult).anyMatch(ObjectUtils::isEmpty) ? 1 : 0; |
| | | if (a == 1) { |
| | | throw new ErrorException("å
è·å20â(常温)çæ£éªå¼,åè·åå
¶ä»æ¸©åº¦" + pkMaster.getSampleCode()); |
| | | } else { |
| | | //计ç®è¡°åå·® |
| | | InsProduct insPro = null; |
| | | switch (insProduct.getInspectionItemClass()) { |
| | | case "1310nm": |
| | | //æ¥è¯¢20â(常温)1310nmçè¡°åç³»æ° |
| | | try { |
| | | insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "1") |
| | | .eq(InsProduct::getInspectionItemSubclass, "20â(常温)") |
| | | .eq(InsProduct::getInspectionItemClass, "1310nm") |
| | | .eq(InsProduct::getInsFiberId, productVo.getInsProduct().getInsFiberId())); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ²¡ææ¥å°20â(常温),1310nm项ç®" + productVo.getInsProduct().getInsFiberId() + "å
çº¤çæ£éªé¡¹ç®"); |
| | | } |
| | | break; |
| | | case "1550nm": |
| | | //æ¥è¯¢20â(常温)1550nmçè¡°åç³»æ° |
| | | try { |
| | | insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "1") |
| | | .eq(InsProduct::getInspectionItemSubclass, "20â(常温)") |
| | | .eq(InsProduct::getInspectionItemClass, "1550nm") |
| | | .eq(InsProduct::getInsFiberId, productVo.getInsProduct().getInsFiberId())); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ²¡ææ¥å°20â(常温),1625nm项ç®" + productVo.getInsProduct().getInsFiberId() + "å
çº¤çæ£éªé¡¹ç®"); |
| | | } |
| | | break; |
| | | case "1625nm": |
| | | //æ¥è¯¢20â(常温)1625nmçè¡°åç³»æ° |
| | | try { |
| | | insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "1") |
| | | .eq(InsProduct::getInspectionItemSubclass, "20â(常温)") |
| | | .eq(InsProduct::getInspectionItemClass, "1625nm") |
| | | .eq(InsProduct::getInsFiberId, productVo.getInsProduct().getInsFiberId())); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ²¡ææ¥å°20â(常温),1625nm项ç®" + productVo.getInsProduct().getInsFiberId() + "å
çº¤çæ£éªé¡¹ç®"); |
| | | } |
| | | break; |
| | | case "1383nm": |
| | | //æ¥è¯¢20â(常温)1383nmçè¡°åç³»æ° |
| | | try { |
| | | insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "1") |
| | | .eq(InsProduct::getInspectionItemSubclass, "20â(常温)") |
| | | .eq(InsProduct::getInspectionItemClass, "1383nm") |
| | | .eq(InsProduct::getInsFiberId, productVo.getInsProduct().getInsFiberId())); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ²¡ææ¥å°20â(常温),1383nm项ç®" + productVo.getInsProduct().getInsFiberId() + "å
çº¤çæ£éªé¡¹ç®"); |
| | | } |
| | | break; |
| | | case "1490nm": |
| | | //æ¥è¯¢20â(常温)1490nmçè¡°åç³»æ° |
| | | try { |
| | | insPro = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "1") |
| | | .eq(InsProduct::getInspectionItemSubclass, "20â(常温)") |
| | | .eq(InsProduct::getInspectionItemClass, "1490nm") |
| | | .eq(InsProduct::getInsFiberId, productVo.getInsProduct().getInsFiberId())); |
| | | } catch (Exception e) { |
| | | throw new ErrorException("æ²¡ææ¥å°20â(常温),1490nm项ç®" + productVo.getInsProduct().getInsFiberId() + "å
çº¤çæ£éªé¡¹ç®"); |
| | | } |
| | | break; |
| | | } |
| | | InsProductResult insProductRes = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insPro.getId())); |
| | | String[] split = insProductRes.getComValue().split(":"); |
| | | double abs = Math.abs(Double.parseDouble(split[split.length-1].split("\"")[1]) - Double.parseDouble(comple)); |
| | | BigDecimal scale = BigDecimal.valueOf(abs).setScale(3, RoundingMode.HALF_UP); |
| | | insProduct.setLastValue(String.valueOf(scale)); |
| | | String ask = insProduct.getAsk(); |
| | | int insResult = 1; |
| | | switch (ask.charAt(0)) { |
| | | case '<': |
| | | insResult = Double.parseDouble(insProduct.getLastValue()) < Double.parseDouble(ask.substring(1)) ? 1 : 0; |
| | | break; |
| | | case '>': |
| | | insResult = Double.parseDouble(insProduct.getLastValue()) > Double.parseDouble(ask.substring(1)) ? 1 : 0; |
| | | break; |
| | | case '=': |
| | | insResult = Double.parseDouble(insProduct.getLastValue()) == Double.parseDouble(ask.substring(1)) ? 1 : 0; |
| | | break; |
| | | case 'â¤': |
| | | insResult = Double.parseDouble(insProduct.getLastValue()) <= Double.parseDouble(ask.substring(1)) ? 1 : 0; |
| | | break; |
| | | case 'â¥': |
| | | insResult = Double.parseDouble(insProduct.getLastValue()) >= Double.parseDouble(ask.substring(1)) ? 1 : 0; |
| | | break; |
| | | } |
| | | insProduct.setInsResult(insResult); |
| | | } |
| | | } else { |
| | | //妿æ¯20度常温,éè¦ç»åºåæ ¼çç»è®º |
| | | insProduct.setInsResult(1);//20åº¦å¸¸æ¸©çæ£éªé¡¹é»è®¤ä¸ºåæ ¼ |
| | | } |
| | | insProduct.setUpdateUser(userId); |
| | | insProductMapper.updateById(insProduct); |
| | | User user = userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getAccount, master.getDetectionPeople())); |
| | | if (ObjectUtils.isEmpty(user)) { |
| | | throw new ErrorException("limsç³»ç»æ²¡ææ¾å°è¯¥ç¨æ·" + master.getDetectionPeople()); |
| | | } |
| | | insProductUserMapper.insert(new InsProductUser(null, user.getId(), master.getDetectionDate(), insProduct.getId())); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //ç»æ¸©åº¦å¾ªç¯çæ£éªé¡¹ç®ç»å®è®¾å¤ |
| | | InsProduct product = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getState, 1) |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "温度循ç¯")); |
| | | if (ObjectUtils.isEmpty(product)) { |
| | | throw new ErrorException("æ²¡ææ¾å°å¯¹åºå§æåä¸è¯¥æ ·åçç¸å
³æ¸©åº¦å¾ªç¯æ£éªé¡¹ç®"); |
| | | } |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, product.getId())); |
| | | if (ObjectUtils.isEmpty(insProductResult)) { |
| | | insProductResult = new InsProductResult(); |
| | | insProductResult.setInsProductId(product.getId()); |
| | | } |
| | | if (ObjectUtils.isEmpty(insProductResult.getEquipValue())) { |
| | | List<Map<String, Object>> dv = new ArrayList<>(); |
| | | Map<String, Object> map4 = new HashMap<>(); |
| | | map4.put("v", "JCZX-TX-TT02006"); |
| | | dv.add(map4); |
| | | Map<String, Object> map5 = new HashMap<>(); |
| | | map5.put("v", "JCZX-TX-TT02001"); |
| | | dv.add(map5); |
| | | insProductResult.setEquipValue(JSON.toJSONString(dv)); |
| | | List<Map<String, Object>> dn = new ArrayList<>(); |
| | | Map<String, Object> map6 = new HashMap<>(); |
| | | map6.put("v", "æ¥å
¥å¼é«ä½æ¸©æ¹¿çè¯éªç®±"); |
| | | dn.add(map6); |
| | | Map<String, Object> map7 = new HashMap<>(); |
| | | map7.put("v", "æ¥å
¥å¼é«ä½æ¸©è¯éªç®±"); |
| | | dn.add(map7); |
| | | insProductResult.setEquipName(JSON.toJSONString(dn)); |
| | | if (BeanUtil.isEmpty(insProductResult.getId())) { |
| | | insProductResult.setCreateUser(userId); |
| | | insProductResult.setUpdateUser(userId); |
| | | insProductResultMapper.insert(insProductResult); |
| | | } else { |
| | | insProductResult.setUpdateUser(userId); |
| | | insProductResult.setUpdateTime(LocalDateTime.now()); |
| | | insProductResultMapper.updateById(insProductResult); |
| | | } |
| | | } |
| | | } |
| | | //æ¥æ¾æ ·åä¸è¯¥æ¬¡æ°ç温度çé¡¹ç® |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getState, 1) |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .isNotNull(InsProduct::getInspectionItemClass)); |
| | | // è¿æ»¤åºå½åå¾ªç¯æ¬¡æ° å æ¸©åº¦çæ£éªé¡¹ç® |
| | | List<InsProduct> productList = insProducts.stream() |
| | | .filter(item -> item.getInspectionItem().equals(pkMaster.getCycles()) && |
| | | item.getInspectionItemSubclass().equals(pkMaster.getTemperature())) |
| | | .collect(Collectors.toList()); |
| | | // å·¥æ¶æ·»å |
| | | int count = 0; |
| | | for(InsProduct insProduct1 : productList) { |
| | | // æ¥è¯¢insProductResultæ¿å°insValueçæå¼çä¸ªæ° |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct1.getId())); |
| | | if(!Objects.isNull(insProductResult)) { |
| | | // insProductResultä¸ä¸ºç©º,è·åæå¼çä¸ªæ° |
| | | insProductResult.getInsValue(); |
| | | List<Map> maps = JSONArray.parseArray(insProductResult.getInsValue(), Map.class); |
| | | for (Map map : maps) { |
| | | if (Strings.isNotEmpty(map.get("v").toString())) { |
| | | count++; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 该ååä¸é¤äºå½å次æ°ä»¥å温度æå¼çè®°å½ |
| | | List<InsProduct> productList1 = insProducts.stream() |
| | | .filter(item -> !(item.getInspectionItem().equals(pkMaster.getCycles()) && item.getInspectionItemSubclass().equals(pkMaster.getTemperature()))) |
| | | .collect(Collectors.toList()); |
| | | int allValue = 0; |
| | | for(InsProduct insProduct1 : productList1) { |
| | | // æ¥è¯¢insProductResultæ¿å°insValueçæå¼çä¸ªæ° |
| | | InsProductResult insProductResult = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>() |
| | | .eq(InsProductResult::getInsProductId, insProduct1.getId())); |
| | | if(!Objects.isNull(insProductResult)) { |
| | | // insProductResultä¸ä¸ºç©º,è·åæå¼çä¸ªæ° |
| | | insProductResult.getInsValue(); |
| | | List<Map> maps = JSONArray.parseArray(insProductResult.getInsValue(), Map.class); |
| | | for (Map map : maps) { |
| | | if (Strings.isNotEmpty(map.get("v").toString())) { |
| | | allValue++; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | Map<String, Boolean> map = isOvertimeAndCrossDay(userId); |
| | | Boolean isWithinRange = map.get("isWithinRange"); // æ¯å¦æ£å¸¸ä¸ç |
| | | Boolean isCross = map.get("isCross"); // æ¯å¦è·¨å¤© |
| | | BigDecimal manHour = BigDecimal.ZERO; // å·¥æ¶ |
| | | InsProduct insProduct = insProductMapper.selectOne(new LambdaQueryWrapper<InsProduct>().eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getInspectionItem, "温度循ç¯")); |
| | | StandardProductVO workHourMap = insOrderPlanServiceImpl.getInspectWorkHourAndGroup(insProduct); |
| | | if(ObjectUtil.isNotNull(workHourMap)){ |
| | | manHour = new BigDecimal(workHourMap.getManHour()); |
| | | } |
| | | DateTimeFormatter formatters = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | DateTime parse = DateUtil.parse(LocalDateTime.now().format(formatter)); |
| | | AuxiliaryOutputWorkingHours auxiliaryOutputWorkingHours = new AuxiliaryOutputWorkingHours(); |
| | | auxiliaryOutputWorkingHours.setInspectionItem("温度循ç¯"); // æ£éªé¡¹ç® |
| | | auxiliaryOutputWorkingHours.setInspectionItemSubclass(""); // æ£éªé¡¹ç®åç±» |
| | | if(isWithinRange) { |
| | | // æ£å¸¸ä¸ç |
| | | auxiliaryOutputWorkingHours.setOrderNo(insOrder.getEntrustCode()); // éå çå§æåå· |
| | | auxiliaryOutputWorkingHours.setWorkTime(new BigDecimal(accuracy(manHour,count))); // å·¥æ¶ |
| | | auxiliaryOutputWorkingHours.setAmount(count); // éå çæ°é |
| | | }else{ |
| | | // å ç |
| | | auxiliaryOutputWorkingHours.setOvertimeOrderNo(insOrder.getEntrustCode()); // éå çå§æåå· |
| | | auxiliaryOutputWorkingHours.setOvertimeWorkTime(new BigDecimal(accuracy(manHour,count))); // å·¥æ¶ |
| | | auxiliaryOutputWorkingHours.setOvertimeAmount(count); // éå çæ°é |
| | | } |
| | | if(isCross) { |
| | | String date = LocalDateTime.now().minusDays(1).toLocalDate().atStartOfDay().format(formatters);// åä¸å¤© |
| | | auxiliaryOutputWorkingHours.setDateTime(date); // æ¥æ |
| | | }else { |
| | | String date = LocalDateTime.now().toLocalDate().atStartOfDay().format(formatters);// å½å¤© |
| | | auxiliaryOutputWorkingHours.setDateTime(date); // æ¥æ |
| | | } |
| | | auxiliaryOutputWorkingHours.setOutputWorkTime(new BigDecimal(accuracy(manHour,count))); // 产åºå·¥æ¶ |
| | | auxiliaryOutputWorkingHours.setWeekDay(insOrderPlanServiceImpl.getWeek(LocalDateTime.now().format(formatters)));//ææ |
| | | auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//卿¬¡ |
| | | auxiliaryOutputWorkingHours.setCheck(userId);//æ£æµäºº |
| | | auxiliaryOutputWorkingHours.setSample(insSample.getSampleCode());//æ ·åç¼å· |
| | | auxiliaryOutputWorkingHours.setManHourGroup(workHourMap.getManHourGroup());//å·¥æ¶åç» |
| | | // æ¥è¯¢éè¦æä½çæ¥ææ¯å¦æè®°å½ |
| | | List<AuxiliaryOutputWorkingHours> oldRecords = auxiliaryOutputWorkingHoursMapper.selectList(Wrappers.<AuxiliaryOutputWorkingHours>lambdaQuery() |
| | | .eq(AuxiliaryOutputWorkingHours::getCheck,userId) |
| | | .eq(AuxiliaryOutputWorkingHours::getInspectionItem, "温度循ç¯") |
| | | .eq(AuxiliaryOutputWorkingHours::getInspectionItemSubclass, "") |
| | | .eq(AuxiliaryOutputWorkingHours::getSample, insSample.getSampleCode()) |
| | | .and(i->i.eq(AuxiliaryOutputWorkingHours::getOrderNo, insOrder.getEntrustCode()) |
| | | .or() |
| | | .eq(AuxiliaryOutputWorkingHours::getOvertimeOrderNo, insOrder.getEntrustCode())) |
| | | .eq(AuxiliaryOutputWorkingHours::getDateTime, auxiliaryOutputWorkingHours.getDateTime()) |
| | | ); |
| | | // ææçè®°å½ï¼å
¶ä»å¤© + å½åå¤©ï¼ |
| | | List<AuxiliaryOutputWorkingHours> addOldRecords = auxiliaryOutputWorkingHoursMapper.selectList(Wrappers.<AuxiliaryOutputWorkingHours>lambdaQuery() |
| | | .eq(AuxiliaryOutputWorkingHours::getCheck,userId) |
| | | .eq(AuxiliaryOutputWorkingHours::getInspectionItem, "温度循ç¯") |
| | | .eq(AuxiliaryOutputWorkingHours::getInspectionItemSubclass, "") |
| | | .eq(AuxiliaryOutputWorkingHours::getSample, insSample.getSampleCode()) |
| | | .and(i->i.eq(AuxiliaryOutputWorkingHours::getOrderNo, insOrder.getEntrustCode()) |
| | | .or() |
| | | .eq(AuxiliaryOutputWorkingHours::getOvertimeOrderNo, insOrder.getEntrustCode())) |
| | | ); |
| | | if(CollectionUtils.isEmpty(oldRecords)){ |
| | | // æ°å¢ä¹è¦æ¥çæ¯å¦æææçè®°å½ |
| | | if(Objects.isNull(addOldRecords)) { |
| | | // å
¶ä»å¤©ä¹æ²¡æè®°å½ |
| | | auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours); |
| | | }else{ |
| | | // ææçè®°å½ |
| | | int otherDayAmount = 0; // ææçæ°é |
| | | for(AuxiliaryOutputWorkingHours a : addOldRecords) { |
| | | otherDayAmount += (Objects.isNull(a.getAmount()) ? 0 : a.getAmount()) + (Objects.isNull(a.getOvertimeAmount()) ? 0 : a.getOvertimeAmount()); |
| | | } |
| | | if(isWithinRange) { |
| | | // æ£å¸¸ä¸ç |
| | | |
| | | auxiliaryOutputWorkingHours.setWorkTime(new BigDecimal(accuracy(manHour,(count - otherDayAmount + allValue)))); // å·¥æ¶ |
| | | auxiliaryOutputWorkingHours.setAmount((count - otherDayAmount + allValue)); // éå çæ°é |
| | | }else { |
| | | // å ç |
| | | auxiliaryOutputWorkingHours.setOvertimeWorkTime(new BigDecimal(accuracy(manHour,(count - otherDayAmount + allValue)))); // å·¥æ¶ |
| | | auxiliaryOutputWorkingHours.setOvertimeAmount((count - otherDayAmount + allValue)); // éå çæ°é |
| | | } |
| | | auxiliaryOutputWorkingHours.setOutputWorkTime(new BigDecimal(accuracy(manHour,(count - otherDayAmount + allValue)))); // 产åºå·¥æ¶ |
| | | auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours); |
| | | } |
| | | }else { |
| | | // ä¸ä¸ºç©º |
| | | Integer oldAmount = 0; // å·¥æ¶æ·»å çä¸ªæ° |
| | | for(AuxiliaryOutputWorkingHours a : addOldRecords) { |
| | | oldAmount += (Objects.isNull(a.getAmount()) ? 0 : a.getAmount()) + (Objects.isNull(a.getOvertimeAmount()) ? 0 : a.getOvertimeAmount()); |
| | | } |
| | | if(count > (oldAmount - allValue)){ |
| | | // æ¥æ¾åºæ¥æä¸ºå¾å°æ¥æçè®°å½ |
| | | List<AuxiliaryOutputWorkingHours> collect = oldRecords.stream().filter(item -> item.getDateTime().equals(auxiliaryOutputWorkingHours.getDateTime())).collect(Collectors.toList()); |
| | | if(CollectionUtils.isNotEmpty(collect)){ |
| | | // æçè¯å°±æ¯æ´æ°æä½ |
| | | AuxiliaryOutputWorkingHours auxiliaryOutputWorkingHours1 = collect.get(0); |
| | | if(isWithinRange) { |
| | | // æ£å¸¸ä¸ç |
| | | // æ¿å°åæ¬çæ°é ä¸ æ°çæ°éç¸å |
| | | int num = Objects.isNull(auxiliaryOutputWorkingHours1.getAmount()) ? 0 :auxiliaryOutputWorkingHours1.getAmount(); // åæ¬çæ°é |
| | | auxiliaryOutputWorkingHours1.setAmount(count - oldAmount + num + allValue); // éå çæ°é |
| | | auxiliaryOutputWorkingHours1.setOrderNo(insOrder.getEntrustCode()); // éå çå§æåå· |
| | | auxiliaryOutputWorkingHours1.setWorkTime(new BigDecimal(accuracy(manHour,(count - oldAmount + num + allValue)))); // å·¥æ¶ |
| | | BigDecimal outputWorkTime = new BigDecimal(accuracy(manHour, auxiliaryOutputWorkingHours1.getAmount())).add((Objects.isNull(auxiliaryOutputWorkingHours1.getOvertimeWorkTime()) ? new BigDecimal(0) : auxiliaryOutputWorkingHours1.getOvertimeWorkTime())); |
| | | auxiliaryOutputWorkingHours1.setOutputWorkTime(outputWorkTime);// 产åºå·¥æ¶ ééè¯å®æ¯ä¼ééå® |
| | | }else{ |
| | | // å ç |
| | | // æ¿å°åæ¬çæ°é ä¸ æ°çæ°éç¸å |
| | | int num = Objects.isNull(auxiliaryOutputWorkingHours1.getOvertimeAmount()) ? 0 :auxiliaryOutputWorkingHours1.getOvertimeAmount(); // åæ¬çæ°é |
| | | auxiliaryOutputWorkingHours1.setOvertimeAmount(count - oldAmount + num + allValue);// å çæ°é |
| | | auxiliaryOutputWorkingHours1.setOvertimeOrderNo(insOrder.getEntrustCode()); // å çå§æåå· |
| | | auxiliaryOutputWorkingHours1.setOvertimeWorkTime(new BigDecimal(accuracy(manHour,(count - oldAmount + num + allValue)))); // å·¥æ¶ |
| | | BigDecimal outputWorkTime = new BigDecimal(accuracy(manHour, auxiliaryOutputWorkingHours1.getOvertimeAmount())).add( |
| | | (Objects.isNull(auxiliaryOutputWorkingHours1.getWorkTime()) ? new BigDecimal(0) : auxiliaryOutputWorkingHours1.getWorkTime())); |
| | | auxiliaryOutputWorkingHours1.setOutputWorkTime(outputWorkTime); // 产åºå·¥æ¶ ééè¯å®æ¯ä¼ééå® |
| | | } |
| | | auxiliaryOutputWorkingHoursMapper.updateById(auxiliaryOutputWorkingHours1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | //æ¸©åº¦å¾ªç¯æ°éæ»ä½ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int temDataAcquisition2(PkMaster pkMaster) { |
| | | //æ¥è¯¢åºææå¾ªç¯æ¬¡æ°å温度,ç¶å循ç¯è°ç¨temDataAcquisitionæ¥å£ |
| | | //æ¥è¯¢å¯¹åºçæ£éªå表 |
| | | InsOrder insOrder = insOrderMapper.selectOne(Wrappers.<InsOrder>lambdaQuery().eq(InsOrder::getState, 1).eq(InsOrder::getEntrustCode, pkMaster.getEntrustCode())); |
| | | if (ObjectUtils.isEmpty(insOrder)) { |
| | | throw new ErrorException("æ²¡ææ¾å°å¯¹åºå§æå" + pkMaster.getEntrustCode()); |
| | | } |
| | | //æ¥è¯¢å¯¹åºæ£éªæ ·åid |
| | | InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery() |
| | | .eq(InsSample::getInsOrderId, insOrder.getId()) |
| | | .eq(InsSample::getSampleCode, pkMaster.getSampleCode()) |
| | | .eq(InsSample::getModel, pkMaster.getModel())); |
| | | if (ObjectUtils.isEmpty(insSample)) { |
| | | throw new ErrorException("æ²¡ææ¾å°å¯¹åºå§æåä¸çè¯¥æ ·å" + pkMaster.getSampleCode()); |
| | | } |
| | | //æ¥æ¾æ ·åä¸æææ¸©åº¦å¾ªç¯çé¡¹ç® |
| | | List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .eq(InsProduct::getInsSampleId, insSample.getId()) |
| | | .eq(InsProduct::getState, 1) |
| | | .isNotNull(InsProduct::getSpecialItemParentId) |
| | | .isNotNull(InsProduct::getInspectionItemClass)); |
| | | //è¿æ»¤åºææå¾ªç¯æ¬¡æ°å温度 |
| | | List<String> collect1 = insProducts.stream().map(InsProduct::getInspectionItem).distinct().collect(Collectors.toList()); |
| | | List<String> collect2 = insProducts.stream().map(InsProduct::getInspectionItemSubclass).distinct().collect(Collectors.toList()); |
| | | for (String s : collect1) { |
| | | for (String s1 : collect2) { |
| | | PkMaster master = new PkMaster(); |
| | | master.setEntrustCode(pkMaster.getEntrustCode()); |
| | | master.setSampleCode(pkMaster.getSampleCode()); |
| | | master.setModel(pkMaster.getModel()); |
| | | master.setCycles(s); |
| | | master.setTemperature(s1); |
| | | temDataAcquisition(master); |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦å çã跨天 |
| | | */ |
| | | public Map<String,Boolean> isOvertimeAndCrossDay(Integer userId){ |
| | | Map<String, Boolean> map = new HashMap<>(); |
| | | Boolean isWithinRange = true; |
| | | Boolean isCross = false; // æ¯å¦å°å½åæ£éªååçå·¥æ¶è®¡ç®å°ç次å¼å§å¤© |
| | | LocalDateTime today = LocalDateTime.of(LocalDate.now(), LocalTime.MIDNIGHT); |
| | | PerformanceShift performanceShift = performanceShiftMapper.selectOne(Wrappers.<PerformanceShift>lambdaQuery() |
| | | .eq(PerformanceShift::getUserId, userId) |
| | | .eq(PerformanceShift::getWorkTime, today)); |
| | | if (ObjectUtils.isNotEmpty(performanceShift)) { |
| | | ShiftTime shiftTime = shiftTimeMapper.selectOne(Wrappers.<ShiftTime>lambdaQuery().eq(ShiftTime::getShift, performanceShift.getShift())); |
| | | if (ObjectUtils.isNotEmpty(shiftTime)) { |
| | | DateTimeFormatter forma = DateTimeFormatter.ofPattern("HH:mm"); |
| | | LocalTime now = LocalTime.now(); |
| | | LocalTime startTime = LocalTime.parse(shiftTime.getStartTime(), forma); |
| | | LocalTime endTime = LocalTime.parse(shiftTime.getEndTime(), forma); |
| | | // æ£æ¥å½åæ¶é´æ¯å¦å¨èå´å
ï¼å
æ¬è¾¹çï¼ |
| | | |
| | | // 妿å½åæ¶é´ä¸å¨ä»å¤©ççæ¬¡å
17:00~5.00 15.00 é¦å
夿æ¯å¦è·¨å¤©äº |
| | | // 跨天çæ
åµ |
| | | if (startTime.isAfter(endTime)) { |
| | | // æ¥çå½åæ¶é´æ¯å¦å¨ç次æ¶é´å
|
| | | if (now.isAfter(startTime)) { |
| | | // 妿æ¯å¨ç»ææ¶é´ä¹åé£ä¹å°±æ¯æ£å¸¸ä¸ç |
| | | isWithinRange = true; |
| | | isCross = false; |
| | | } else { |
| | | // å½åæ¶é´ä¸å¨ç次å
ï¼æ¥çæ¨å¤©ççæ¬¡ |
| | | LocalDateTime yesterday = LocalDateTime.of(LocalDate.now().minusDays(1), LocalTime.MIDNIGHT); |
| | | PerformanceShift yesterdayShift = performanceShiftMapper.selectOne(Wrappers.<PerformanceShift>lambdaQuery() |
| | | .eq(PerformanceShift::getUserId, userId) |
| | | .eq(PerformanceShift::getWorkTime, yesterday)); |
| | | ShiftTime yesterdayShiftTime = shiftTimeMapper.selectOne(Wrappers.<ShiftTime>lambdaQuery().eq(ShiftTime::getShift, yesterdayShift.getShift())); |
| | | // 妿æ¨å¤©ççæ¬¡ä¸ä¸ºç©ºï¼é£ä¹å°±è¦çæ¨å¤©ççæ¬¡æ¶é´ |
| | | if (!Objects.isNull(yesterdayShiftTime)) { |
| | | LocalTime yesterdayStartTime = LocalTime.parse(yesterdayShiftTime.getStartTime(), forma); |
| | | LocalTime yesterdayEndTime = LocalTime.parse(yesterdayShiftTime.getEndTime(), forma); |
| | | // æ¨å¤©ççæ¬¡æ¯å¦è·¨å¤© |
| | | if (yesterdayStartTime.isAfter(yesterdayEndTime)) { |
| | | // 妿æ¨å¤©ççæ¬¡è·¨å¤©äºï¼é£ä¹å°±è¦çä»å¤©æ¯å¦å¨æ¨å¤©ççæ¬¡å
ï¼å¹¶ä¸åªè½æ¯å¨ç»ææ¶é´ä¹åï¼å·²ç»å®ç°äºè·¨å¤© |
| | | if (now.isBefore(yesterdayEndTime)) { |
| | | // 卿¨å¤©ç次æ¶é´å
æ£å¸¸ä¸çï¼å·¥æ¶è®¡ç®å°æ¨å¤© |
| | | isWithinRange = true; |
| | | isCross = true; |
| | | } else { |
| | | // ä¸å¨æ¨å¤©ç次æ¶é´å
å°±æ¯å çï¼å·¥æ¶è®¡ç®å°æ¨å¤© |
| | | isWithinRange = false; |
| | | isCross = true; |
| | | } |
| | | } else { |
| | | // æ¨å¤©ççæ¬¡æ²¡æè·¨å¤© 妿å½åæ¶é´å¨ä»å¤©ç次å¼å§æ¶é´ä¹åå°±æ¯æ¨å¤©çå çï¼å¦åå°±æ¯ä»å¤©çå ç |
| | | if (now.isBefore(startTime)) { |
| | | isWithinRange = false; |
| | | isCross = true; |
| | | } else { |
| | | isWithinRange = false; |
| | | isCross = false; |
| | | } |
| | | } |
| | | } else { |
| | | isWithinRange = false; |
| | | // 妿æ¯å¨å¼å§æ¶é´ä¹åé£ä¹å°±è¦ç®å°æ¨å¤© |
| | | if (now.isBefore(startTime)) { |
| | | isCross = true; |
| | | } else { |
| | | isCross = false; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | // å½åçæ¬¡ä¸è·¨å¤©çæ
åµä¸ |
| | | // 妿å½åæ¶é´å¨å¼å§æ¶é´ä¹åï¼æ¥æ¨å¤©ççæ¬¡çå½åæ¶é´æ¯å¦å¨æ¨å¤©ççæ¬¡å
|
| | | if (now.isBefore(startTime)) { |
| | | // æ¥çæ¨å¤©æ¯å¦è·¨å¤© |
| | | LocalDateTime yesterday = LocalDateTime.of(LocalDate.now().minusDays(1), LocalTime.MIDNIGHT); |
| | | PerformanceShift yesterdayShift = performanceShiftMapper.selectOne(Wrappers.<PerformanceShift>lambdaQuery() |
| | | .eq(PerformanceShift::getUserId, userId) |
| | | .eq(PerformanceShift::getWorkTime, yesterday)); |
| | | ShiftTime yesterdayShiftTime = shiftTimeMapper.selectOne(Wrappers.<ShiftTime>lambdaQuery().eq(ShiftTime::getShift, yesterdayShift.getShift())); |
| | | LocalTime yesterdayStartTime = LocalTime.parse(yesterdayShiftTime.getStartTime(), forma); |
| | | LocalTime yesterdayEndTime = LocalTime.parse(yesterdayShiftTime.getEndTime(), forma); |
| | | if (yesterdayStartTime.isAfter(yesterdayEndTime)) { |
| | | // 妿æ¨å¤©è·¨å¤© |
| | | if (now.isBefore(yesterdayEndTime)) { |
| | | // 卿¨å¤©ççæ¬¡æ¶é´å
æ£å¸¸ä¸çï¼å·¥æ¶è®¡ç®å°æ¨å¤© |
| | | isWithinRange = true; |
| | | isCross = true; |
| | | } else { |
| | | // ä¸å¨æ¨å¤©ç次æ¶é´å
å°±æ¯å çï¼å·¥æ¶è®¡ç®å°æ¨å¤© |
| | | isWithinRange = false; |
| | | isCross = true; |
| | | } |
| | | } else { |
| | | // æ¨å¤©ä¸è·¨å¤© |
| | | isWithinRange = false; |
| | | isCross = true; |
| | | } |
| | | } else if (now.isAfter(endTime)) { |
| | | // 妿å½åæ¶é´å¨ç»ææ¶é´ä¹åï¼é£ä¹å°±æ¯ä»å¤©çå ç |
| | | isWithinRange = false; |
| | | isCross = false; |
| | | } else { |
| | | // æ£å¸¸ä¸ç |
| | | isWithinRange = true; |
| | | isCross = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | map.put("isWithinRange",isWithinRange); |
| | | map.put("isCross",isCross); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 精度é®é¢ |
| | | */ |
| | | public double accuracy(BigDecimal manHour, int count){ |
| | | return manHour.multiply(BigDecimal.valueOf(count)).setScale(4, RoundingMode.HALF_UP).doubleValue(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesConsumablesServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesContentsServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesExpendsServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesListServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ProcurementSuppliesStoreServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/QrShowServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/ReservationServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/SupplierManagementServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/service/impl/SuppliersDirectoryContentsServiceImpl.java
cnas-require/src/main/java/com/ruoyi/require/util/DataAcquisition.java
cnas-require/src/main/java/com/ruoyi/require/vo/AcceptanceDetailsVo.java
cnas-require/src/main/java/com/ruoyi/require/vo/AcceptanceVo.java
cnas-require/src/main/java/com/ruoyi/require/vo/OperationInstructionVo.java
cnas-require/src/main/java/com/ruoyi/require/vo/SubstanceRecordVo.java
cnas-require/src/main/resources/mapper/DataConfigMapper.xml
cnas-require/src/main/resources/mapper/DeviceBorrowMapper.xml
cnas-require/src/main/resources/mapper/DeviceFaultOneMapper.xml
cnas-require/src/main/resources/mapper/DeviceMaintenanceMapper.xml
cnas-require/src/main/resources/mapper/DeviceMapper.xml
cnas-require/src/main/resources/mapper/DeviceMetricRecordMapper.xml
cnas-require/src/main/resources/mapper/DeviceMetricsCopyMapper.xml
cnas-require/src/main/resources/mapper/DeviceRecordMapper.xml
cnas-require/src/main/resources/mapper/DeviceStateMapper.xml
cnas-require/src/main/resources/mapper/FeCalibrationScheduleMapper.xml
cnas-require/src/main/resources/mapper/FeIlluminationDetectionAreaMapper.xml
cnas-require/src/main/resources/mapper/FeIlluminationMapper.xml
cnas-require/src/main/resources/mapper/FeLightningProtectionMapper.xml
cnas-require/src/main/resources/mapper/FeMeasuredQuantityMapper.xml
cnas-require/src/main/resources/mapper/FePowerStableMapper.xml
cnas-require/src/main/resources/mapper/FeStandardSubstanceAcceptanceInspectionMapper.xml
cnas-require/src/main/resources/mapper/FeStandardSubstanceAcceptanceMapper.xml
cnas-require/src/main/resources/mapper/FeStandardSubstanceMapper.xml
cnas-require/src/main/resources/mapper/FeStandardSubstanceRecordMapper.xml
cnas-require/src/main/resources/mapper/FeTempHumDateMapper.xml
cnas-require/src/main/resources/mapper/FeTempHumRecordMapper.xml
cnas-require/src/main/resources/mapper/ForeignRegisterMapper.xml
cnas-require/src/main/resources/mapper/IncidentAcceptanceCheckMapper.xml
cnas-require/src/main/resources/mapper/IncidentFileMapper.xml
cnas-require/src/main/resources/mapper/IncidentInstallMapper.xml
cnas-require/src/main/resources/mapper/IncidentReportMapper.xml
cnas-require/src/main/resources/mapper/IncidentSparePartsMapper.xml
cnas-require/src/main/resources/mapper/InformationNotificationMapper.xml
cnas-require/src/main/resources/mapper/InstructionMapper.xml
cnas-require/src/main/resources/mapper/InternalWastesDetailMapper.xml
cnas-require/src/main/resources/mapper/InternalWastesMapper.xml
cnas-require/src/main/resources/mapper/OperationInstructionMapper.xml
cnas-require/src/main/resources/mapper/PkMasterMapper.xml
cnas-require/src/main/resources/mapper/PkSlaveMapper.xml
cnas-require/src/main/resources/mapper/ProcurementSuppliesExpendsMapper.xml
cnas-require/src/main/resources/mapper/ProcurementSuppliesListMapper.xml
cnas-require/src/main/resources/mapper/ProcurementSuppliesStoreMapper.xml
cnas-require/src/main/resources/mapper/ReservationMapper.xml
cnas-require/src/main/resources/mapper/SupplierManagementMapper.xml
cnas-require/src/main/resources/mapper/SuppliersDirectoryContentsMapper.xml |