2025-04-27 16:49:30 +08:00
|
|
|
package com.jdc.jdcproject.controller;
|
|
|
|
|
2025-05-03 22:52:41 +08:00
|
|
|
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
|
|
|
import com.jdc.jdcproject.service.IDicekeMininglossService;
|
|
|
|
import com.jdc.jdcproject.utils.Result;
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
2025-04-27 16:49:30 +08:00
|
|
|
import org.springframework.stereotype.Controller;
|
2025-05-03 22:52:41 +08:00
|
|
|
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
|
|
|
|
|
|
|
import java.util.List;
|
2025-04-27 16:49:30 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* <p>
|
|
|
|
* 采剥与贫损表; 前端控制器
|
|
|
|
* </p>
|
|
|
|
*
|
|
|
|
* @author haoyanlu
|
|
|
|
* @since 2025-04-26
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/dicekeMiningloss")
|
|
|
|
public class DicekeMininglossController {
|
|
|
|
|
2025-05-03 22:52:41 +08:00
|
|
|
@Autowired
|
|
|
|
private IDicekeMininglossService dicekeMininglossService;
|
|
|
|
|
|
|
|
@Operation(summary = "查询损失和贫化报表")
|
|
|
|
@GetMapping("findAllMininggloss")
|
|
|
|
public Result findAll(){
|
|
|
|
List<DicekeMininglossVo> dicekeMininglossVoList = dicekeMininglossService.findAll();
|
|
|
|
System.out.println(dicekeMininglossVoList.toString());
|
|
|
|
return Result.successResult().data("dicekeMininglossVoList", dicekeMininglossVoList);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Operation(summary = "修改损失和贫化信息")
|
|
|
|
@PostMapping("updatedicekeMiningloss")
|
|
|
|
public Result updateLoss(@RequestBody DicekeMiningloss dicekeMiningloss){
|
|
|
|
boolean updateflag = dicekeMininglossService.updateById(dicekeMiningloss);
|
|
|
|
if (updateflag){
|
|
|
|
return Result.successResult();
|
|
|
|
} else {
|
|
|
|
return Result.errorResult();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Operation(summary = "删除损失和贫化信息")
|
|
|
|
@DeleteMapping("deletedicekeMiningloss/{lossID}")
|
|
|
|
public Result deletedicekeMiningloss(@PathVariable String lossID){
|
|
|
|
boolean updateflag = dicekeMininglossService.removeById(lossID);
|
|
|
|
if(updateflag){
|
|
|
|
return Result.successResult();
|
|
|
|
} else {
|
|
|
|
return Result.errorResult();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Operation(summary = "根据id查询损失和贫化信息")
|
|
|
|
@GetMapping("finddicekeMininglossById/{lossID}")
|
|
|
|
public Result finddicekeMininglossByID(@PathVariable String lossID){
|
|
|
|
DicekeMiningloss lossById = dicekeMininglossService.getById(lossID);
|
|
|
|
return Result.successResult().data("dicekeMininglossServiceById",lossById);
|
|
|
|
}
|
|
|
|
|
2025-04-27 16:49:30 +08:00
|
|
|
}
|