Compare commits

...

7 Commits

Author SHA1 Message Date
ff08e941ee [add]水泵运行日志管理 2025-05-07 15:38:40 +08:00
2965f39f28 Merge branch 'main-cj'
# Conflicts:
#	src/main/java/com/jdc/jdcproject/controller/FangpaishuiUnitController.java
#	src/main/java/com/jdc/jdcproject/mapper/FangpaishuiUnitMapper.java
#	src/main/java/com/jdc/jdcproject/mapper/xml/FangpaishuiUnitMapper.xml
#	src/main/java/com/jdc/jdcproject/service/FangpaishuiUnitService.java
#	src/main/java/com/jdc/jdcproject/service/impl/FangpaishuiUnitServiceImpl.java
2025-05-07 15:32:15 +08:00
xvx
901e565bf8 Revert "损失与贫化返回值修改;采剥量报表vo;
This reverts commit 4bda6d1d
2025-05-07 12:57:45 +08:00
xvx
69405ab0b1 损失与贫化返回值修改;采剥量报表通过月查询 2025-05-07 12:51:54 +08:00
da6303841e Merge branch 'main-cj' 2025-05-07 11:08:47 +08:00
xvx
2de1f22e16 revert 4bda6d1df766d93d1b41619e74e91ad66de68b7b
revert 损失与贫化返回值修改;采剥量报表vo;采剥量报表出矿量不清楚获取哪里的数值
2025-05-06 23:27:51 +08:00
xvx
4bda6d1df7 损失与贫化返回值修改;采剥量报表vo;采剥量报表出矿量不清楚获取哪里的数值 2025-05-06 23:00:32 +08:00
8 changed files with 181 additions and 53 deletions

View File

@ -0,0 +1,37 @@
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);
}
}

View File

@ -1,7 +1,6 @@
package com.jdc.jdcproject.controller;
import com.jdc.jdcproject.entity.DicekePrecipitation;
import com.jdc.jdcproject.entity.Equipment;
import com.jdc.jdcproject.entity.FangpaishuiWatertreatmentrecord;
import com.jdc.jdcproject.entity.VO.FangpaishuiWatertreatmentrecordVo;
import com.jdc.jdcproject.service.FangpaishuiWatertreatmentrecordService;
@ -9,12 +8,14 @@ import com.jdc.jdcproject.utils.LastDayOfMonth;
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.web.bind.annotation.GetMapping;
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.SimpleDateFormat;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -52,51 +53,4 @@ public class FangpaishuiWatertreatmentrecordController {
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();
}
}
}

View File

@ -1,6 +1,5 @@
package com.jdc.jdcproject.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

View File

@ -0,0 +1,68 @@
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 +
'}';
}
}

View File

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
@Data
public class FangpaishuiUnitVo {

View File

@ -1,7 +1,7 @@
package com.jdc.jdcproject.service;
import com.jdc.jdcproject.entity.DicekeMiningloss;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jdc.jdcproject.entity.DicekeMiningloss;
import com.jdc.jdcproject.entity.VO.DicekeMininglossVo;
import com.jdc.jdcproject.utils.Result;

View File

@ -0,0 +1,21 @@
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);
}

View File

@ -0,0 +1,50 @@
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;
}
}