|
@@ -1,12 +1,57 @@
|
|
|
package org.jeecg.modules.productionScheduleReport.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
+import org.jeecg.modules.productionScheduleReport.entity.ProductionSchedule;
|
|
|
+import org.jeecg.modules.productionScheduleReport.service.ProductionScheduleService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+
|
|
|
+import static org.jeecg.common.config.mqtoken.UserTokenContext.getToken;
|
|
|
+
|
|
|
/**
|
|
|
* 生产进度报表
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
+@Api(tags="生产进度报表")
|
|
|
@RestController
|
|
|
@RequestMapping("/productionScheduleReport/productionSchedule")
|
|
|
public class ProductionScheduleController {
|
|
|
+ @Autowired
|
|
|
+ private ProductionScheduleService productionScheduleService;
|
|
|
+
|
|
|
+ @AutoLog(value = "生产进度报表-分页列表查询")
|
|
|
+ @ApiOperation(value="生产进度报表-分页列表查询", notes="生产进度报表-分页列表查询")
|
|
|
+ @GetMapping(value = "/list")
|
|
|
+ public Result<IPage<ProductionSchedule>> queryPageList(ProductionSchedule ProductionSchedule,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ HttpServletRequest req) {
|
|
|
+ Result<IPage<ProductionSchedule>> result = new Result<IPage<ProductionSchedule>>();
|
|
|
+ QueryWrapper<ProductionSchedule> queryWrapper = new QueryWrapper<>();
|
|
|
+// SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Page<ProductionSchedule> page = new Page<ProductionSchedule>(pageNo, pageSize);
|
|
|
+
|
|
|
+ IPage<ProductionSchedule> pageList = productionScheduleService.selectByPage(page, queryWrapper);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(pageList);
|
|
|
+ result.setMessage("查询成功");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ System.out.println(getToken());
|
|
|
+ }
|
|
|
}
|