损失和贫化报表查询,修改,删除
This commit is contained in:
parent
f12e152da2
commit
fe7bc58857
@ -1,8 +1,15 @@
|
|||||||
package com.jdc.jdcproject.controller;
|
package com.jdc.jdcproject.controller;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
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.*;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -16,4 +23,44 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/dicekeMiningloss")
|
@RequestMapping("/dicekeMiningloss")
|
||||||
public class DicekeMininglossController {
|
public class DicekeMininglossController {
|
||||||
|
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,76 @@
|
|||||||
|
package com.jdc.jdcproject.entity.VO;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 采剥与贫损表;
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author haoyanlu
|
||||||
|
* @since 2025-04-26
|
||||||
|
*/
|
||||||
|
@TableName("diceke_miningloss")
|
||||||
|
@Schema(name = "DicekeMiningloss", description = "采剥与贫损表;")
|
||||||
|
@Data
|
||||||
|
public class DicekeMininglossVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "主键")
|
||||||
|
@TableId("LossID")
|
||||||
|
private String lossID;
|
||||||
|
|
||||||
|
@Schema(description = "平盘名称")
|
||||||
|
private String plateRange;
|
||||||
|
|
||||||
|
@Schema(description = "铲号")
|
||||||
|
private String shovelCode;
|
||||||
|
|
||||||
|
@Schema(description = "月份")
|
||||||
|
private LocalDate month;
|
||||||
|
|
||||||
|
@Schema(description = "剥离量(吨)")
|
||||||
|
private Double strippingTon;
|
||||||
|
|
||||||
|
@Schema(description = "采剥总量(吨)")
|
||||||
|
private Double strippingAndTotalMiningTon;
|
||||||
|
|
||||||
|
@Schema(description = "采下废石(吨)")
|
||||||
|
private Double wasteRockTon;
|
||||||
|
|
||||||
|
@Schema(description = "贫化率(%)")
|
||||||
|
private Double dilutionRate;
|
||||||
|
|
||||||
|
@Schema(description = "损失率(%)")
|
||||||
|
private Double lossRate;
|
||||||
|
|
||||||
|
@Schema(description = "配矿配矿量(吨)")
|
||||||
|
private Double allocationTon;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String beizhu;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "DicekeMiningloss{" +
|
||||||
|
"lossID = " + lossID +
|
||||||
|
", plateID = " + plateRange +
|
||||||
|
", shovelID = " + shovelCode +
|
||||||
|
", month = " + month +
|
||||||
|
", strippingTon = " + strippingTon +
|
||||||
|
", strippingAndTotalMiningTon = " + strippingAndTotalMiningTon +
|
||||||
|
", wasteRockTon = " + wasteRockTon +
|
||||||
|
", dilutionRate = " + dilutionRate +
|
||||||
|
", lossRate = " + lossRate +
|
||||||
|
", allocationTon = " + allocationTon +
|
||||||
|
", beizhu = " + beizhu +
|
||||||
|
"}";
|
||||||
|
}
|
||||||
|
}
|
@ -2,8 +2,11 @@ package com.jdc.jdcproject.mapper;
|
|||||||
|
|
||||||
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 采剥与贫损表; Mapper 接口
|
* 采剥与贫损表; Mapper 接口
|
||||||
@ -15,4 +18,5 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface DicekeMininglossMapper extends BaseMapper<DicekeMiningloss> {
|
public interface DicekeMininglossMapper extends BaseMapper<DicekeMiningloss> {
|
||||||
|
|
||||||
|
List<DicekeMininglossVo> findAll();
|
||||||
}
|
}
|
||||||
|
@ -2,4 +2,22 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.jdc.jdcproject.mapper.DicekeMininglossMapper">
|
<mapper namespace="com.jdc.jdcproject.mapper.DicekeMininglossMapper">
|
||||||
|
|
||||||
|
<!-- 表结构 平盘-电铲号-剥离量-采剥总量-采下废石-贫化率-损失率-配矿配矿量-备注-月份 -->
|
||||||
|
<select id="findAll" resultType="com.jdc.jdcproject.entity.VO.DicekeMininglossVo">
|
||||||
|
select dml.LossID,
|
||||||
|
dp.PlateRange,
|
||||||
|
ds.ShovelCode,
|
||||||
|
dml.StrippingTon,
|
||||||
|
dml.StrippingAndTotalMiningTon,
|
||||||
|
dml.WasteRockTon,
|
||||||
|
dml.DilutionRate,
|
||||||
|
dml.LossRate,
|
||||||
|
dml.AllocationTon,
|
||||||
|
dml.Month,
|
||||||
|
dml.beizhu
|
||||||
|
FROM diceke_miningloss dml
|
||||||
|
LEFT JOIN diceke_platearea dp ON dml.PlateID = dp.PlateID
|
||||||
|
LEFT JOIN diceke_shovel ds ON dml.ShovelID = ds.ShovelID
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -2,6 +2,9 @@ package com.jdc.jdcproject.service;
|
|||||||
|
|
||||||
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface IDicekeMininglossService extends IService<DicekeMiningloss> {
|
public interface IDicekeMininglossService extends IService<DicekeMiningloss> {
|
||||||
|
|
||||||
|
List<DicekeMininglossVo> findAll();
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package com.jdc.jdcproject.service.impl;
|
package com.jdc.jdcproject.service.impl;
|
||||||
|
|
||||||
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
||||||
|
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
||||||
import com.jdc.jdcproject.mapper.DicekeMininglossMapper;
|
import com.jdc.jdcproject.mapper.DicekeMininglossMapper;
|
||||||
import com.jdc.jdcproject.service.IDicekeMininglossService;
|
import com.jdc.jdcproject.service.IDicekeMininglossService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 采剥与贫损表; 服务实现类
|
* 采剥与贫损表; 服务实现类
|
||||||
@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class DicekeMininglossServiceImpl extends ServiceImpl<DicekeMininglossMapper, DicekeMiningloss> implements IDicekeMininglossService {
|
public class DicekeMininglossServiceImpl extends ServiceImpl<DicekeMininglossMapper, DicekeMiningloss> implements IDicekeMininglossService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DicekeMininglossVo> findAll() {
|
||||||
|
return baseMapper.findAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user