|
|
|
@ -19,6 +19,7 @@ import com.alibaba.excel.EasyExcel; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.dayu.daf.core.log.annotation.ApiLog; |
|
|
|
|
import com.dayu.daf.core.tool.constant.DafConstant; |
|
|
|
|
import com.xkcoding.http.util.StringUtil; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
@ -45,19 +46,9 @@ import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import lombok.SneakyThrows; |
|
|
|
|
import org.apache.commons.codec.Charsets; |
|
|
|
|
import org.energy.modules.leger.excel.EquipmentLedgerExcel; |
|
|
|
|
import org.energy.modules.system.excel.UserExcel; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import org.energy.modules.leger.entity.EquipmentLedger; |
|
|
|
|
import org.energy.modules.leger.vo.EquipmentLedgerVO; |
|
|
|
|
import com.dayu.daf.core.boot.ctrl.DafController; |
|
|
|
|
import springfox.documentation.annotations.ApiIgnore; |
|
|
|
|
|
|
|
|
|
import java.net.URLEncoder; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -95,7 +86,28 @@ public class ToolInventoryRecordController extends DafController { |
|
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
|
@ApiOperation(value = "分页", notes = "传入toolInventoryRecord") |
|
|
|
|
public R<IPage<ToolInventoryRecord>> list(ToolInventoryRecord toolInventoryRecord, Query query) { |
|
|
|
|
IPage<ToolInventoryRecord> pages = toolInventoryRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(toolInventoryRecord)); |
|
|
|
|
QueryWrapper<ToolInventoryRecord> qw = new QueryWrapper<>(); |
|
|
|
|
qw.orderByAsc("tools_code_id"); |
|
|
|
|
if (StringUtil.isNotEmpty(toolInventoryRecord.getToolsCodeId())) { |
|
|
|
|
qw.lambda().like(ToolInventoryRecord::getToolsCodeId, toolInventoryRecord.getToolsCodeId()); |
|
|
|
|
} |
|
|
|
|
if (StringUtil.isNotEmpty(toolInventoryRecord.getToolName())) { |
|
|
|
|
qw.lambda().like(ToolInventoryRecord::getToolName, toolInventoryRecord.getToolName()); |
|
|
|
|
} |
|
|
|
|
if (StringUtil.isNotEmpty(toolInventoryRecord.getToolCategory())) { |
|
|
|
|
qw.lambda().like(ToolInventoryRecord::getToolCategory, toolInventoryRecord.getToolCategory()); |
|
|
|
|
} |
|
|
|
|
if (StringUtil.isNotEmpty(toolInventoryRecord.getToolStatus())) { |
|
|
|
|
qw.lambda().like(ToolInventoryRecord::getToolStatus, toolInventoryRecord.getToolStatus()); |
|
|
|
|
} |
|
|
|
|
if (null != toolInventoryRecord.getIsInspectionPeriod()) { |
|
|
|
|
qw.lambda().eq(ToolInventoryRecord::getIsInspectionPeriod, toolInventoryRecord.getIsInspectionPeriod()); |
|
|
|
|
} |
|
|
|
|
if (null != toolInventoryRecord.getStations()) { |
|
|
|
|
qw.lambda().eq(ToolInventoryRecord::getStations, toolInventoryRecord.getStations()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
IPage<ToolInventoryRecord> pages = toolInventoryRecordService.page(Condition.getPage(query), qw); |
|
|
|
|
return R.data(pages); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|