Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -4,7 +4,9 @@ import com.fizz.business.domain.CrmPdoExcoil;
|
||||
import com.fizz.business.form.CrmPdoExcoilForm;
|
||||
import com.fizz.business.service.CrmPdoExcoilService;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -16,7 +18,7 @@ import java.util.List;
|
||||
@RequestMapping("/api/pdo")
|
||||
@Tag(name ="实绩管理")
|
||||
@Anonymous
|
||||
public class CrmPdoExcoilController {
|
||||
public class CrmPdoExcoilController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private CrmPdoExcoilService crmPdoExcoilService;
|
||||
@@ -48,7 +50,16 @@ public class CrmPdoExcoilController {
|
||||
|
||||
@PostMapping("/list")
|
||||
@Operation(summary ="查询实绩列表")
|
||||
public R<List<CrmPdoExcoil>> list(@RequestBody CrmPdoExcoilForm form) {
|
||||
return R.ok(crmPdoExcoilService.listAll(form));
|
||||
public TableDataInfo list(@RequestBody CrmPdoExcoilForm form) {
|
||||
// 设置分页参数,默认每页20条
|
||||
if (form.getPageNum() == null || form.getPageNum() < 1) {
|
||||
form.setPageNum(1);
|
||||
}
|
||||
if (form.getPageSize() == null || form.getPageSize() < 1) {
|
||||
form.setPageSize(20);
|
||||
}
|
||||
com.github.pagehelper.PageHelper.startPage(form.getPageNum(), form.getPageSize());
|
||||
List<CrmPdoExcoil> list = crmPdoExcoilService.listAll(form);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,10 @@ public class CrmPdoExcoilForm {
|
||||
@Schema(description = "锌层厚度")
|
||||
private BigDecimal zincCoatingThickness;
|
||||
|
||||
@Schema(description = "页码", example = "1")
|
||||
private Integer pageNum = 1;
|
||||
|
||||
@Schema(description = "每页数量", example = "20")
|
||||
private Integer pageSize = 20;
|
||||
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class CrmPdoExcoilServiceImpl extends ServiceImpl<CrmPdoExcoilMapper, Crm
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有记录
|
||||
* 查询所有记录(支持分页)
|
||||
*
|
||||
* @return CrmPdoExcoil对象的列表
|
||||
*/
|
||||
@@ -80,8 +80,6 @@ public class CrmPdoExcoilServiceImpl extends ServiceImpl<CrmPdoExcoilMapper, Crm
|
||||
// 根据 exit_coilid 和 encoilid 进行查询
|
||||
if (!StringUtils.isEmpty(form.getCoilid())) {
|
||||
queryWrapper.like("exit_mat_id", form.getCoilid());
|
||||
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(form.getStartDate())&& !StringUtils.isEmpty(form.getEndDate())){
|
||||
|
||||
Reference in New Issue
Block a user