修改移动端内容,后端添加了所有查询接口

This commit is contained in:
2025-10-31 17:18:32 +08:00
parent 882cdfd7f8
commit 3f5f4a9479
25 changed files with 825 additions and 14 deletions

View File

@@ -23,6 +23,15 @@ public class Klptcm1ProPlantStateDefineController extends BaseController {
@Resource
private IKlptcm1ProPlantStateDefineService defineService;
/**
* 获取所有定义及其当前值(用于前端初始化缓存)
* @return 所有定义列表,每个定义包含对应的当前值
*/
@GetMapping("/allWithValues")
public R<List<PlantStateWithValueVo>> getAllWithValues() {
return R.ok(defineService.selectAllWithValues());
}
@GetMapping("/plant/state")
public List<PlantStateWithValueVo> getTopByValue(@RequestParam String name) {
return defineService.selectByValue(name);

View File

@@ -0,0 +1,93 @@
package com.klp.pocket.controller;
import com.klp.common.core.controller.BaseController;
import com.klp.common.core.domain.R;
import com.klp.pocket.domain.vo.ProductionStatisticsVo;
import com.klp.pocket.domain.vo.CrewProductionVo;
import com.klp.pocket.domain.vo.SpecDistributionVo;
import com.klp.pocket.domain.vo.TeamPerformanceVo;
import com.klp.pocket.service.IKlptcm1PdoExcoilService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 生产统计Controller
*
* @author klp
* @date 2025-10-31
*/
@RequiredArgsConstructor
@RestController
@RequestMapping("/pocket/productionStatistics")
public class Klptcm1ProductionStatisticsController extends BaseController {
private final IKlptcm1PdoExcoilService excoilService;
/**
* 获取生产统计汇总数据
* @param startDate 开始日期格式yyyy-MM-dd
* @param endDate 结束日期格式yyyy-MM-dd
* @return 统计数据(钢卷数、平均宽度、平均厚度、原料总量、成品总量、成材率)
*/
@GetMapping("/summary")
public R<ProductionStatisticsVo> getSummary(
@RequestParam String startDate,
@RequestParam String endDate) {
return R.ok(excoilService.getProductionStatistics(startDate, endDate));
}
/**
* 获取班组产量统计
* @param startDate 开始日期
* @param endDate 结束日期
* @return 班组产量列表(按产量倒序)
*/
@GetMapping("/crewProduction")
public R<List<CrewProductionVo>> getCrewProduction(
@RequestParam String startDate,
@RequestParam String endDate) {
return R.ok(excoilService.getCrewProduction(startDate, endDate));
}
/**
* 获取厚度分布统计
* @param startDate 开始日期
* @param endDate 结束日期
* @return 厚度分布列表
*/
@GetMapping("/thicknessDistribution")
public R<List<SpecDistributionVo>> getThicknessDistribution(
@RequestParam String startDate,
@RequestParam String endDate) {
return R.ok(excoilService.getThicknessDistribution(startDate, endDate));
}
/**
* 获取宽度分布统计
* @param startDate 开始日期
* @param endDate 结束日期
* @return 宽度分布列表
*/
@GetMapping("/widthDistribution")
public R<List<SpecDistributionVo>> getWidthDistribution(
@RequestParam String startDate,
@RequestParam String endDate) {
return R.ok(excoilService.getWidthDistribution(startDate, endDate));
}
/**
* 获取班组绩效统计
* @param startDate 开始日期
* @param endDate 结束日期
* @return 班组绩效列表(按综合评分倒序排列)
*/
@GetMapping("/teamPerformance")
public R<List<TeamPerformanceVo>> getTeamPerformance(
@RequestParam String startDate,
@RequestParam String endDate) {
return R.ok(excoilService.getTeamPerformance(startDate, endDate));
}
}

View File

@@ -0,0 +1,32 @@
package com.klp.pocket.controller;
import com.klp.common.core.controller.BaseController;
import com.klp.common.core.domain.R;
import com.klp.pocket.domain.vo.Klptcm1ShiftCurrentVo;
import com.klp.pocket.service.IKlptcm1ShiftCurrentService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
/**
* 当前班组Controller
*
* @author klp
* @date 2025-10-31
*/
@RequiredArgsConstructor
@RestController
@RequestMapping("/pocket/shiftCurrent")
public class Klptcm1ShiftCurrentController extends BaseController {
private final IKlptcm1ShiftCurrentService shiftCurrentService;
/**
* 获取当前班组信息
* @return 当前班组信息(班次+班组)
*/
@GetMapping("/current")
public R<Klptcm1ShiftCurrentVo> getCurrentShift() {
return R.ok(shiftCurrentService.getCurrentShift());
}
}