Compare commits
No commits in common. "ff08e941ee43cd75b4c9854d5b8bb3b955756f5a" and "246d840a41a7313ec32bb554a90b1cf8d2b146a2" have entirely different histories.
ff08e941ee
...
246d840a41
@ -1,37 +0,0 @@
|
|||||||
package com.jdc.jdcproject.controller;
|
|
||||||
|
|
||||||
import com.jdc.jdcproject.entity.VO.DicekeTotalMiningVo;
|
|
||||||
import com.jdc.jdcproject.service.IDicekeTotalMiningService;
|
|
||||||
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 java.time.LocalDate;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 采剥量报表; 前端控制器
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author xvxboo
|
|
||||||
*/
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/dicekeTotalMining")
|
|
||||||
public class DicekeTotalMiningController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IDicekeTotalMiningService iDicekeTotalMiningService;
|
|
||||||
|
|
||||||
@Operation(summary = "通过Month查询采剥量报表")
|
|
||||||
@GetMapping("findTotalMiningByMonth")
|
|
||||||
public Result findTotalMiningByMonth(@RequestParam(required = false) LocalDate Month){
|
|
||||||
List<DicekeTotalMiningVo> totalMiningVoList = iDicekeTotalMiningService.getTotalMiningByMonth(Month);
|
|
||||||
System.out.println(totalMiningVoList.toString());
|
|
||||||
return Result.successResult().data("totalMiningVoList",totalMiningVoList);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,6 +1,7 @@
|
|||||||
package com.jdc.jdcproject.controller;
|
package com.jdc.jdcproject.controller;
|
||||||
|
|
||||||
import com.jdc.jdcproject.entity.DicekePrecipitation;
|
import com.jdc.jdcproject.entity.DicekePrecipitation;
|
||||||
|
import com.jdc.jdcproject.entity.Equipment;
|
||||||
import com.jdc.jdcproject.entity.FangpaishuiWatertreatmentrecord;
|
import com.jdc.jdcproject.entity.FangpaishuiWatertreatmentrecord;
|
||||||
import com.jdc.jdcproject.entity.VO.FangpaishuiWatertreatmentrecordVo;
|
import com.jdc.jdcproject.entity.VO.FangpaishuiWatertreatmentrecordVo;
|
||||||
import com.jdc.jdcproject.service.FangpaishuiWatertreatmentrecordService;
|
import com.jdc.jdcproject.service.FangpaishuiWatertreatmentrecordService;
|
||||||
@ -8,14 +9,12 @@ import com.jdc.jdcproject.utils.LastDayOfMonth;
|
|||||||
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;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -53,4 +52,51 @@ public class FangpaishuiWatertreatmentrecordController {
|
|||||||
|
|
||||||
return Result.successResult().data("fangpaishuiWatertreatmentrecordVo",fangpaishuiWatertreatmentrecordVo);
|
return Result.successResult().data("fangpaishuiWatertreatmentrecordVo",fangpaishuiWatertreatmentrecordVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "根据时间段查询处理水量和拉泥车数详细数据")
|
||||||
|
@GetMapping("findWatertreatmentrecordDetailByMonth/{dateTime}")
|
||||||
|
public Result findWatertreatmentrecordDetailByMonth(@PathVariable String dateTime) throws ParseException {
|
||||||
|
String[] s = dateTime.split("到");
|
||||||
|
List<FangpaishuiWatertreatmentrecord> fangpaishuiWatertreatmentrecords = new ArrayList<>();
|
||||||
|
if (s.length!=0&&!s[0].isEmpty()&&!s[1].isEmpty()) {
|
||||||
|
fangpaishuiWatertreatmentrecords = fangpaishuiWatertreatmentrecordService.findByDate(s[0], s[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.successResult().data("fangpaishuiWatertreatmentrecords",fangpaishuiWatertreatmentrecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "修改处理水量和拉泥车信息")
|
||||||
|
@PostMapping("updateWatertreatmentrecord")
|
||||||
|
public Result updateEquipment(@RequestBody FangpaishuiWatertreatmentrecord fangpaishuiWatertreatmentrecord) {
|
||||||
|
boolean updateflag = fangpaishuiWatertreatmentrecordService.updateById(fangpaishuiWatertreatmentrecord);
|
||||||
|
if (updateflag) {
|
||||||
|
return Result.successResult();
|
||||||
|
} else {
|
||||||
|
return Result.errorResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除处理水量和拉泥车信息")
|
||||||
|
@DeleteMapping("deleteWatertreatmentrecord/{id}")
|
||||||
|
public Result deleteEquipment(@PathVariable String id) {
|
||||||
|
boolean updateflag = fangpaishuiWatertreatmentrecordService.removeById(id);
|
||||||
|
if (updateflag) {
|
||||||
|
return Result.successResult();
|
||||||
|
} else {
|
||||||
|
return Result.errorResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "新增处理水量和拉泥车信息")
|
||||||
|
@PostMapping("addWatertreatmentrecord")
|
||||||
|
public Result addEquipment(@RequestBody FangpaishuiWatertreatmentrecord fangpaishuiWatertreatmentrecord) {
|
||||||
|
System.out.println(fangpaishuiWatertreatmentrecord);
|
||||||
|
boolean updateflag = fangpaishuiWatertreatmentrecordService.save(fangpaishuiWatertreatmentrecord);
|
||||||
|
if (updateflag) {
|
||||||
|
return Result.successResult();
|
||||||
|
} else {
|
||||||
|
return Result.errorResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.jdc.jdcproject.entity;
|
package com.jdc.jdcproject.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
package com.jdc.jdcproject.entity.VO;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
@Data
|
|
||||||
public class DicekeTotalMiningVo {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "平盘名称")
|
|
||||||
private String plateRange;
|
|
||||||
|
|
||||||
@Schema(description = "铲号")
|
|
||||||
private String shovelCode;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String beizhu;
|
|
||||||
|
|
||||||
@Schema(description = "计量单位")
|
|
||||||
private String UOM;
|
|
||||||
|
|
||||||
@Schema(description = "出矿量(吨)")
|
|
||||||
private Double OreYield;
|
|
||||||
|
|
||||||
@Schema(description = "剥离量(吨)")
|
|
||||||
private Double strippingTon;
|
|
||||||
|
|
||||||
@Schema(description = "采剥总量(吨)")
|
|
||||||
private Double strippingAndTotalMiningTon;
|
|
||||||
|
|
||||||
@Schema(description = "月份")
|
|
||||||
private LocalDate month;
|
|
||||||
|
|
||||||
public DicekeTotalMiningVo(String plateRange,
|
|
||||||
String shovelCode,
|
|
||||||
String beizhu,
|
|
||||||
String UOM,
|
|
||||||
Double oreYield,
|
|
||||||
Double strippingTon,
|
|
||||||
Double strippingAndTotalMiningTon,
|
|
||||||
LocalDate month) {
|
|
||||||
this.plateRange = plateRange;
|
|
||||||
this.shovelCode = shovelCode;
|
|
||||||
this.beizhu = beizhu;
|
|
||||||
this.UOM = UOM;
|
|
||||||
OreYield = oreYield;
|
|
||||||
this.strippingTon = strippingTon;
|
|
||||||
this.strippingAndTotalMiningTon = strippingAndTotalMiningTon;
|
|
||||||
this.month = month;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "DicekeTotalMiningVo{" +
|
|
||||||
"plateRange='" + plateRange + '\'' +
|
|
||||||
", shovelCode='" + shovelCode + '\'' +
|
|
||||||
", beizhu='" + beizhu + '\'' +
|
|
||||||
", UOM='" + UOM + '\'' +
|
|
||||||
", OreYield=" + OreYield +
|
|
||||||
", strippingTon=" + strippingTon +
|
|
||||||
", strippingAndTotalMiningTon=" + strippingAndTotalMiningTon +
|
|
||||||
", month=" + month +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
@Data
|
@Data
|
||||||
public class FangpaishuiUnitVo {
|
public class FangpaishuiUnitVo {
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.jdc.jdcproject.service;
|
package com.jdc.jdcproject.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
||||||
import com.jdc.jdcproject.utils.Result;
|
import com.jdc.jdcproject.utils.Result;
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
package com.jdc.jdcproject.service;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.jdc.jdcproject.entity.VO.DicekeTotalMiningVo;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 采剥量报表; 服务类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author xvxboo
|
|
||||||
*/
|
|
||||||
public interface IDicekeTotalMiningService {
|
|
||||||
|
|
||||||
List<DicekeTotalMiningVo> getTotalMiningByMonth(LocalDate Month);
|
|
||||||
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
package com.jdc.jdcproject.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.jdc.jdcproject.entity.DicekeMiningloss;
|
|
||||||
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
|
|
||||||
import com.jdc.jdcproject.entity.VO.DicekeTotalMiningVo;
|
|
||||||
import com.jdc.jdcproject.mapper.DicekeMininglossMapper;
|
|
||||||
import com.jdc.jdcproject.service.IDicekeTotalMiningService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 采剥量报表; 服务实现类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author xvxboo
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class DicekeTotalMiningServiceImpl extends ServiceImpl<DicekeMininglossMapper, DicekeMiningloss> implements IDicekeTotalMiningService {
|
|
||||||
@Override
|
|
||||||
public List<DicekeTotalMiningVo> getTotalMiningByMonth(LocalDate Month) {
|
|
||||||
int year = Month.getYear();
|
|
||||||
int monthV = Month.getMonthValue();
|
|
||||||
List<DicekeMininglossVo> mininglossVoList = baseMapper.findLossByMonth(monthV, year);
|
|
||||||
List<DicekeTotalMiningVo> totalMiningList = new ArrayList<>();
|
|
||||||
//将mininglossListt赋值给totalMiningList
|
|
||||||
for (DicekeMininglossVo dmlVoLItem : mininglossVoList){
|
|
||||||
String plateR = dmlVoLItem.getPlateRange();
|
|
||||||
String shovelC = dmlVoLItem.getShovelCode();
|
|
||||||
String beiZ = dmlVoLItem.getBeizhu();
|
|
||||||
String uom = "t"; /*单位:吨*/
|
|
||||||
Double oreY = dmlVoLItem.getStrippingAndTotalMiningTon()
|
|
||||||
- dmlVoLItem.getStrippingTon(); /*出矿量 = 采剥总量 - 剥离量*/
|
|
||||||
Double strippingT = dmlVoLItem.getStrippingTon();
|
|
||||||
Double strippingAndTMT = dmlVoLItem.getStrippingAndTotalMiningTon();
|
|
||||||
LocalDate mon = dmlVoLItem.getMonth();
|
|
||||||
|
|
||||||
DicekeTotalMiningVo dtmVoItem = new DicekeTotalMiningVo(plateR,
|
|
||||||
shovelC,beiZ,uom,oreY,strippingT,strippingAndTMT,mon);
|
|
||||||
|
|
||||||
totalMiningList.add(dtmVoItem);
|
|
||||||
}
|
|
||||||
return totalMiningList;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user