Compare commits

...

2 Commits

Author SHA1 Message Date
xvx
e429032a14 Merge branch 'main' of http://8.137.62.52:3000/admin/JdcProject 2025-05-07 21:50:00 +08:00
xvx
96dd359933 采剥量报表编辑 2025-05-07 21:48:52 +08:00
5 changed files with 73 additions and 24 deletions

View File

@ -1,6 +1,8 @@
package com.jdc.jdcproject.controller;
import com.jdc.jdcproject.entity.DicekeMiningloss;
import com.jdc.jdcproject.entity.VO.DicekeTotalMiningVo;
import com.jdc.jdcproject.service.IDicekeMininglossService;
import com.jdc.jdcproject.service.IDicekeTotalMiningService;
import com.jdc.jdcproject.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
@ -23,15 +25,46 @@ import java.util.List;
public class DicekeTotalMiningController {
@Autowired
private IDicekeTotalMiningService iDicekeTotalMiningService;
private IDicekeTotalMiningService dicekeTotalMiningService;
@Autowired
private IDicekeMininglossService dicekeMininglossService;
@Operation(summary = "通过Month查询采剥量报表")
@GetMapping("findTotalMiningByMonth")
public Result findTotalMiningByMonth(@RequestParam(required = false) LocalDate Month){
List<DicekeTotalMiningVo> totalMiningVoList = iDicekeTotalMiningService.getTotalMiningByMonth(Month);
List<DicekeTotalMiningVo> totalMiningVoList = dicekeTotalMiningService.getTotalMiningByMonth(Month);
System.out.println(totalMiningVoList.toString());
return Result.successResult().data("totalMiningVoList",totalMiningVoList);
}
@Operation(summary = "修改采剥量报表")
@PostMapping("updateTotalMining")
public Result updateTotalMining(@RequestBody DicekeTotalMiningVo dtm){
DicekeMiningloss dml = new DicekeMiningloss();
dml.setLossID(dtm.getTotalID());
dml.setPlateID(dtm.getPlateID());
dml.setShovelID(dtm.getShovelID());
dml.setBeizhu(dtm.getBeizhu());
dml.setStrippingTon(dtm.getStrippingTon());
dml.setStrippingAndTotalMiningTon(dtm.getStrippingAndTotalMiningTon());
dml.setMonth(dtm.getMonth());
boolean updateFlag = dicekeMininglossService.updateById(dml);
if (updateFlag){
return Result.successResult();
} else {
return Result.errorResult();
}
}
/*
*
* 删除直接删掉对应表的字段
*
* */
}

View File

@ -53,19 +53,23 @@ public class DicekeMiningloss implements Serializable {
@Schema(description = "配矿配矿量(吨)")
private Double allocationTon;
@Schema(description = "备注")
private String beizhu;
@Override
public String toString() {
return "DicekeMiningloss{" +
"lossID = " + lossID +
", plateID = " + plateID +
", shovelID = " + shovelID +
", month = " + month +
", strippingTon = " + strippingTon +
", strippingAndTotalMiningTon = " + strippingAndTotalMiningTon +
", wasteRockTon = " + wasteRockTon +
", dilutionRate = " + dilutionRate +
", lossRate = " + lossRate +
", allocationTon = " + allocationTon +
"}";
"lossID='" + lossID + '\'' +
", plateID='" + plateID + '\'' +
", shovelID='" + shovelID + '\'' +
", month=" + month +
", strippingTon=" + strippingTon +
", strippingAndTotalMiningTon=" + strippingAndTotalMiningTon +
", wasteRockTon=" + wasteRockTon +
", dilutionRate=" + dilutionRate +
", lossRate=" + lossRate +
", allocationTon=" + allocationTon +
", beizhu='" + beizhu + '\'' +
'}';
}
}

View File

@ -10,11 +10,15 @@ public class DicekeTotalMiningVo {
private static final long serialVersionUID = 1L;
@Schema(description = "平盘名称")
private String plateRange;
@Schema(description = "TotalID") /*传LossID,涉及修改或删除Loss表*/
@TableId("TotalID")
private String TotalID;
@Schema(description = "铲号")
private String shovelCode;
@Schema(description = "外键关联平盘表")
private String plateID;
@Schema(description = "外键关联铲号表")
private String shovelID;
@Schema(description = "备注")
private String beizhu;
@ -34,16 +38,18 @@ public class DicekeTotalMiningVo {
@Schema(description = "月份")
private LocalDate month;
public DicekeTotalMiningVo(String plateRange,
String shovelCode,
public DicekeTotalMiningVo(String totalID,
String plateID,
String shovelID,
String beizhu,
String UOM,
Double oreYield,
Double strippingTon,
Double strippingAndTotalMiningTon,
LocalDate month) {
this.plateRange = plateRange;
this.shovelCode = shovelCode;
TotalID = totalID;
this.plateID = plateID;
this.shovelID = shovelID;
this.beizhu = beizhu;
this.UOM = UOM;
OreYield = oreYield;
@ -55,8 +61,9 @@ public class DicekeTotalMiningVo {
@Override
public String toString() {
return "DicekeTotalMiningVo{" +
"plateRange='" + plateRange + '\'' +
", shovelCode='" + shovelCode + '\'' +
"TotalID='" + TotalID + '\'' +
", plateID='" + plateID + '\'' +
", shovelID='" + shovelID + '\'' +
", beizhu='" + beizhu + '\'' +
", UOM='" + UOM + '\'' +
", OreYield=" + OreYield +

View File

@ -3,6 +3,7 @@ package com.jdc.jdcproject.mapper;
import com.jdc.jdcproject.entity.DicekeMiningloss;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
import com.jdc.jdcproject.entity.VO.DicekeTotalMiningVo;
import org.apache.ibatis.annotations.Mapper;
import java.time.LocalDate;
@ -26,4 +27,7 @@ public interface DicekeMininglossMapper extends BaseMapper<DicekeMiningloss> {
List<DicekeMininglossVo> findLossByMonth(int monthV,int year);
}

View File

@ -30,6 +30,7 @@ public class DicekeTotalMiningServiceImpl extends ServiceImpl<DicekeMininglossMa
List<DicekeTotalMiningVo> totalMiningList = new ArrayList<>();
//将mininglossListt赋值给totalMiningList
for (DicekeMininglossVo dmlVoLItem : mininglossVoList){
String TotalID = dmlVoLItem.getLossID();
String plateR = dmlVoLItem.getPlateRange();
String shovelC = dmlVoLItem.getShovelCode();
String beiZ = dmlVoLItem.getBeizhu();
@ -40,7 +41,7 @@ public class DicekeTotalMiningServiceImpl extends ServiceImpl<DicekeMininglossMa
Double strippingAndTMT = dmlVoLItem.getStrippingAndTotalMiningTon();
LocalDate mon = dmlVoLItem.getMonth();
DicekeTotalMiningVo dtmVoItem = new DicekeTotalMiningVo(plateR,
DicekeTotalMiningVo dtmVoItem = new DicekeTotalMiningVo(TotalID,plateR,
shovelC,beiZ,uom,oreY,strippingT,strippingAndTMT,mon);
totalMiningList.add(dtmVoItem);