Compare commits
2 Commits
ff08e941ee
...
e429032a14
Author | SHA1 | Date | |
---|---|---|---|
e429032a14 | |||
96dd359933 |
@ -1,6 +1,8 @@
|
|||||||
package com.jdc.jdcproject.controller;
|
package com.jdc.jdcproject.controller;
|
||||||
|
|
||||||
|
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
||||||
import com.jdc.jdcproject.entity.VO.DicekeTotalMiningVo;
|
import com.jdc.jdcproject.entity.VO.DicekeTotalMiningVo;
|
||||||
|
import com.jdc.jdcproject.service.IDicekeMininglossService;
|
||||||
import com.jdc.jdcproject.service.IDicekeTotalMiningService;
|
import com.jdc.jdcproject.service.IDicekeTotalMiningService;
|
||||||
import com.jdc.jdcproject.utils.Result;
|
import com.jdc.jdcproject.utils.Result;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@ -23,15 +25,46 @@ import java.util.List;
|
|||||||
public class DicekeTotalMiningController {
|
public class DicekeTotalMiningController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDicekeTotalMiningService iDicekeTotalMiningService;
|
private IDicekeTotalMiningService dicekeTotalMiningService;
|
||||||
|
@Autowired
|
||||||
|
private IDicekeMininglossService dicekeMininglossService;
|
||||||
|
|
||||||
@Operation(summary = "通过Month查询采剥量报表")
|
@Operation(summary = "通过Month查询采剥量报表")
|
||||||
@GetMapping("findTotalMiningByMonth")
|
@GetMapping("findTotalMiningByMonth")
|
||||||
public Result findTotalMiningByMonth(@RequestParam(required = false) LocalDate Month){
|
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());
|
System.out.println(totalMiningVoList.toString());
|
||||||
return Result.successResult().data("totalMiningVoList",totalMiningVoList);
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* 删除直接删掉对应表的字段?
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,12 +53,15 @@ public class DicekeMiningloss implements Serializable {
|
|||||||
@Schema(description = "配矿配矿量(吨)")
|
@Schema(description = "配矿配矿量(吨)")
|
||||||
private Double allocationTon;
|
private Double allocationTon;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String beizhu;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "DicekeMiningloss{" +
|
return "DicekeMiningloss{" +
|
||||||
"lossID = " + lossID +
|
"lossID='" + lossID + '\'' +
|
||||||
", plateID = " + plateID +
|
", plateID='" + plateID + '\'' +
|
||||||
", shovelID = " + shovelID +
|
", shovelID='" + shovelID + '\'' +
|
||||||
", month=" + month +
|
", month=" + month +
|
||||||
", strippingTon=" + strippingTon +
|
", strippingTon=" + strippingTon +
|
||||||
", strippingAndTotalMiningTon=" + strippingAndTotalMiningTon +
|
", strippingAndTotalMiningTon=" + strippingAndTotalMiningTon +
|
||||||
@ -66,6 +69,7 @@ public class DicekeMiningloss implements Serializable {
|
|||||||
", dilutionRate=" + dilutionRate +
|
", dilutionRate=" + dilutionRate +
|
||||||
", lossRate=" + lossRate +
|
", lossRate=" + lossRate +
|
||||||
", allocationTon=" + allocationTon +
|
", allocationTon=" + allocationTon +
|
||||||
"}";
|
", beizhu='" + beizhu + '\'' +
|
||||||
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,15 @@ public class DicekeTotalMiningVo {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Schema(description = "平盘名称")
|
@Schema(description = "TotalID") /*传LossID,涉及修改或删除Loss表*/
|
||||||
private String plateRange;
|
@TableId("TotalID")
|
||||||
|
private String TotalID;
|
||||||
|
|
||||||
@Schema(description = "铲号")
|
@Schema(description = "外键关联平盘表")
|
||||||
private String shovelCode;
|
private String plateID;
|
||||||
|
|
||||||
|
@Schema(description = "外键关联铲号表")
|
||||||
|
private String shovelID;
|
||||||
|
|
||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String beizhu;
|
private String beizhu;
|
||||||
@ -34,16 +38,18 @@ public class DicekeTotalMiningVo {
|
|||||||
@Schema(description = "月份")
|
@Schema(description = "月份")
|
||||||
private LocalDate month;
|
private LocalDate month;
|
||||||
|
|
||||||
public DicekeTotalMiningVo(String plateRange,
|
public DicekeTotalMiningVo(String totalID,
|
||||||
String shovelCode,
|
String plateID,
|
||||||
|
String shovelID,
|
||||||
String beizhu,
|
String beizhu,
|
||||||
String UOM,
|
String UOM,
|
||||||
Double oreYield,
|
Double oreYield,
|
||||||
Double strippingTon,
|
Double strippingTon,
|
||||||
Double strippingAndTotalMiningTon,
|
Double strippingAndTotalMiningTon,
|
||||||
LocalDate month) {
|
LocalDate month) {
|
||||||
this.plateRange = plateRange;
|
TotalID = totalID;
|
||||||
this.shovelCode = shovelCode;
|
this.plateID = plateID;
|
||||||
|
this.shovelID = shovelID;
|
||||||
this.beizhu = beizhu;
|
this.beizhu = beizhu;
|
||||||
this.UOM = UOM;
|
this.UOM = UOM;
|
||||||
OreYield = oreYield;
|
OreYield = oreYield;
|
||||||
@ -55,8 +61,9 @@ public class DicekeTotalMiningVo {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "DicekeTotalMiningVo{" +
|
return "DicekeTotalMiningVo{" +
|
||||||
"plateRange='" + plateRange + '\'' +
|
"TotalID='" + TotalID + '\'' +
|
||||||
", shovelCode='" + shovelCode + '\'' +
|
", plateID='" + plateID + '\'' +
|
||||||
|
", shovelID='" + shovelID + '\'' +
|
||||||
", beizhu='" + beizhu + '\'' +
|
", beizhu='" + beizhu + '\'' +
|
||||||
", UOM='" + UOM + '\'' +
|
", UOM='" + UOM + '\'' +
|
||||||
", OreYield=" + OreYield +
|
", OreYield=" + OreYield +
|
||||||
|
@ -3,6 +3,7 @@ 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 com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
||||||
|
import com.jdc.jdcproject.entity.VO.DicekeTotalMiningVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@ -26,4 +27,7 @@ public interface DicekeMininglossMapper extends BaseMapper<DicekeMiningloss> {
|
|||||||
|
|
||||||
|
|
||||||
List<DicekeMininglossVo> findLossByMonth(int monthV,int year);
|
List<DicekeMininglossVo> findLossByMonth(int monthV,int year);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ public class DicekeTotalMiningServiceImpl extends ServiceImpl<DicekeMininglossMa
|
|||||||
List<DicekeTotalMiningVo> totalMiningList = new ArrayList<>();
|
List<DicekeTotalMiningVo> totalMiningList = new ArrayList<>();
|
||||||
//将mininglossListt赋值给totalMiningList
|
//将mininglossListt赋值给totalMiningList
|
||||||
for (DicekeMininglossVo dmlVoLItem : mininglossVoList){
|
for (DicekeMininglossVo dmlVoLItem : mininglossVoList){
|
||||||
|
String TotalID = dmlVoLItem.getLossID();
|
||||||
String plateR = dmlVoLItem.getPlateRange();
|
String plateR = dmlVoLItem.getPlateRange();
|
||||||
String shovelC = dmlVoLItem.getShovelCode();
|
String shovelC = dmlVoLItem.getShovelCode();
|
||||||
String beiZ = dmlVoLItem.getBeizhu();
|
String beiZ = dmlVoLItem.getBeizhu();
|
||||||
@ -40,7 +41,7 @@ public class DicekeTotalMiningServiceImpl extends ServiceImpl<DicekeMininglossMa
|
|||||||
Double strippingAndTMT = dmlVoLItem.getStrippingAndTotalMiningTon();
|
Double strippingAndTMT = dmlVoLItem.getStrippingAndTotalMiningTon();
|
||||||
LocalDate mon = dmlVoLItem.getMonth();
|
LocalDate mon = dmlVoLItem.getMonth();
|
||||||
|
|
||||||
DicekeTotalMiningVo dtmVoItem = new DicekeTotalMiningVo(plateR,
|
DicekeTotalMiningVo dtmVoItem = new DicekeTotalMiningVo(TotalID,plateR,
|
||||||
shovelC,beiZ,uom,oreY,strippingT,strippingAndTMT,mon);
|
shovelC,beiZ,uom,oreY,strippingT,strippingAndTMT,mon);
|
||||||
|
|
||||||
totalMiningList.add(dtmVoItem);
|
totalMiningList.add(dtmVoItem);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user