| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Log(title = "巡检记录 分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult page(ProductInspectionRecordDto productInspectionRecord, Page<ProductInspectionRecord> page) { |
| | | LambdaQueryWrapper<ProductInspectionRecord> ew = Wrappers.<ProductInspectionRecord>lambdaQuery(); |
| | | ew.eq(StringUtils.isNotEmpty(productInspectionRecord.getProcess()), ProductInspectionRecord::getProcess, productInspectionRecord.getProcess()) |
| | | .eq(StringUtils.isNotEmpty(productInspectionRecord.getProcessId()), ProductInspectionRecord::getProcessId, productInspectionRecord.getProcessId()) |
| | | .between(Objects.nonNull(productInspectionRecord.getStartTime()) && Objects.nonNull(productInspectionRecord.getEndTime()), |
| | | ProductInspectionRecord::getInspectionTime, productInspectionRecord.getStartTime(), |
| | | productInspectionRecord.getEndTime()); |
| | | return AjaxResult.success(productInspectionRecordService.page(page, ew)); |
| | | } |
| | | |
| | |
| | | productInspectionRecordService.removeBatchByIds(ids); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation("巡检记录 通知") |
| | | @PostMapping("/notify") |
| | | @Log(title = "巡检记录 通知", businessType = BusinessType.OTHER) |
| | | public AjaxResult notify(@RequestBody List<Long> ids) { |
| | | productInspectionRecordService.notify(ids); |
| | | return AjaxResult.success("发送通知成功"); |
| | | } |
| | | } |