小修改
This commit is contained in:
parent
fed3345b8a
commit
5156669d27
@ -9,6 +9,7 @@ import com.jdc.jdcproject.service.IDicekePlateareaService;
|
|||||||
import com.jdc.jdcproject.service.IDicekeShovelService;
|
import com.jdc.jdcproject.service.IDicekeShovelService;
|
||||||
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 io.swagger.v3.oas.annotations.Parameter;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@ -43,14 +44,18 @@ public class DicekeMininglossController {
|
|||||||
|
|
||||||
@Operation(summary = "通过Month查询损失和贫化报表")
|
@Operation(summary = "通过Month查询损失和贫化报表")
|
||||||
@GetMapping("findLossByMonth")
|
@GetMapping("findLossByMonth")
|
||||||
public Result findLossByMonth(@RequestParam(required = false) LocalDate Month,
|
public Result findLossByMonth(@RequestParam(required = false)
|
||||||
@RequestParam(required = false) LocalDate endMonth) {
|
@Parameter(description = "yyyy-MM-dd",example = "2002-10-11")LocalDate Month
|
||||||
|
/*,@RequestParam(required = false) LocalDate endMonth*/) {
|
||||||
|
|
||||||
|
/*
|
||||||
if(Month != null && endMonth != null){ //两个时间段内查询
|
if(Month != null && endMonth != null){ //两个时间段内查询
|
||||||
List<DicekeMininglossVo> LossByMonthRangeVoList = dicekeMininglossService.getLossByMonthRange(Month,endMonth);
|
List<DicekeMininglossVo> LossByMonthRangeVoList = dicekeMininglossService.getLossByMonthRange(Month,endMonth);
|
||||||
System.out.println(LossByMonthRangeVoList.toString());
|
System.out.println(LossByMonthRangeVoList.toString());
|
||||||
return Result.successResult().data("LossMonthRangeList", LossByMonthRangeVoList);
|
return Result.successResult().data("LossMonthRangeList", LossByMonthRangeVoList);
|
||||||
} else if (Month != null){ //Month存在 通过获取year年和month月查询此月报表
|
} else
|
||||||
|
*/
|
||||||
|
if (Month != null){ //Month存在 通过获取year年和month月查询此月报表
|
||||||
List<DicekeMininglossVo> LossByMonthVoList = dicekeMininglossService.getLossByMonth(Month);
|
List<DicekeMininglossVo> LossByMonthVoList = dicekeMininglossService.getLossByMonth(Month);
|
||||||
System.out.println(LossByMonthVoList.toString());
|
System.out.println(LossByMonthVoList.toString());
|
||||||
return Result.successResult().data("LossMonthVoList", LossByMonthVoList);
|
return Result.successResult().data("LossMonthVoList", LossByMonthVoList);
|
||||||
|
@ -6,6 +6,7 @@ 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;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -20,6 +21,9 @@ import java.util.List;
|
|||||||
* @author xvxboo
|
* @author xvxboo
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 该业务只是查询diceke_miningloss表,并不存在自己的数据库。
|
||||||
|
* */
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/dicekeTotalMining")
|
@RequestMapping("/dicekeTotalMining")
|
||||||
public class DicekeTotalMiningController {
|
public class DicekeTotalMiningController {
|
||||||
@ -30,8 +34,9 @@ public class DicekeTotalMiningController {
|
|||||||
private IDicekeMininglossService dicekeMininglossService;
|
private IDicekeMininglossService dicekeMininglossService;
|
||||||
|
|
||||||
@Operation(summary = "通过Month查询采剥量报表")
|
@Operation(summary = "通过Month查询采剥量报表")
|
||||||
@GetMapping("findTotalMiningByMonth")
|
@GetMapping("findTotalMiningByMonth/{Month}")
|
||||||
public Result findTotalMiningByMonth(@RequestParam(required = false) LocalDate Month){
|
public Result findTotalMiningByMonth(@RequestParam(required = false)
|
||||||
|
@Parameter(description = "yyyy-MM-dd",example = "2002-10-11")LocalDate Month){
|
||||||
List<DicekeTotalMiningVo> totalMiningVoList = dicekeTotalMiningService.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);
|
||||||
@ -61,10 +66,16 @@ public class DicekeTotalMiningController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
//TODO: 删除不清楚业务逻辑,是否直接删除所使用的diceke_miningloss表数据
|
||||||
*
|
@Operation(summary = "删除采剥量报表")
|
||||||
* 删除直接删掉对应表的字段?
|
@DeleteMapping("deleteTotalMining/{totalID}")
|
||||||
*
|
public Result deleteLoss(@PathVariable String totalID){
|
||||||
* */
|
boolean updateflag = dicekeMininglossService.removeById(totalID);
|
||||||
|
if(updateflag){
|
||||||
|
return Result.successResult();
|
||||||
|
} else {
|
||||||
|
return Result.errorResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,9 +23,10 @@ public class DicekeTotalMiningVo {
|
|||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String beizhu;
|
private String beizhu;
|
||||||
|
|
||||||
|
/*
|
||||||
@Schema(description = "计量单位")
|
@Schema(description = "计量单位")
|
||||||
private String UOM;
|
private String UOM;
|
||||||
|
*/
|
||||||
@Schema(description = "出矿量(吨)")
|
@Schema(description = "出矿量(吨)")
|
||||||
private Double OreYield;
|
private Double OreYield;
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ public class DicekeTotalMiningVo {
|
|||||||
@Schema(description = "采剥总量(吨)")
|
@Schema(description = "采剥总量(吨)")
|
||||||
private Double strippingAndTotalMiningTon;
|
private Double strippingAndTotalMiningTon;
|
||||||
|
|
||||||
@Schema(description = "月份")
|
@Schema(description = "月份",name="月份")
|
||||||
private LocalDate month;
|
private LocalDate month;
|
||||||
|
|
||||||
public DicekeTotalMiningVo(String totalID,
|
public DicekeTotalMiningVo(String totalID,
|
||||||
@ -51,7 +52,7 @@ public class DicekeTotalMiningVo {
|
|||||||
this.plateID = plateID;
|
this.plateID = plateID;
|
||||||
this.shovelID = shovelID;
|
this.shovelID = shovelID;
|
||||||
this.beizhu = beizhu;
|
this.beizhu = beizhu;
|
||||||
this.UOM = UOM;
|
// this.UOM = UOM;
|
||||||
OreYield = oreYield;
|
OreYield = oreYield;
|
||||||
this.strippingTon = strippingTon;
|
this.strippingTon = strippingTon;
|
||||||
this.strippingAndTotalMiningTon = strippingAndTotalMiningTon;
|
this.strippingAndTotalMiningTon = strippingAndTotalMiningTon;
|
||||||
@ -65,7 +66,7 @@ public class DicekeTotalMiningVo {
|
|||||||
", plateID='" + plateID + '\'' +
|
", plateID='" + plateID + '\'' +
|
||||||
", shovelID='" + shovelID + '\'' +
|
", shovelID='" + shovelID + '\'' +
|
||||||
", beizhu='" + beizhu + '\'' +
|
", beizhu='" + beizhu + '\'' +
|
||||||
", UOM='" + UOM + '\'' +
|
// ", UOM='" + UOM + '\'' +
|
||||||
", OreYield=" + OreYield +
|
", OreYield=" + OreYield +
|
||||||
", strippingTon=" + strippingTon +
|
", strippingTon=" + strippingTon +
|
||||||
", strippingAndTotalMiningTon=" + strippingAndTotalMiningTon +
|
", strippingAndTotalMiningTon=" + strippingAndTotalMiningTon +
|
||||||
|
@ -22,8 +22,10 @@ public interface DicekeMininglossMapper extends BaseMapper<DicekeMiningloss> {
|
|||||||
|
|
||||||
List<DicekeMininglossVo> findAllLoss();
|
List<DicekeMininglossVo> findAllLoss();
|
||||||
|
|
||||||
|
/*
|
||||||
|
// 两个时间内查询
|
||||||
List<DicekeMininglossVo> findLossByMonthRange(int SmonthM, int SmonthY, int endMonthM, int endMonthY);
|
List<DicekeMininglossVo> findLossByMonthRange(int SmonthM, int SmonthY, int endMonthM, int endMonthY);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
List<DicekeMininglossVo> findLossByMonth(int monthV,int year);
|
List<DicekeMininglossVo> findLossByMonth(int monthV,int year);
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
LEFT JOIN diceke_platearea dp ON dml.PlateID = dp.PlateID
|
LEFT JOIN diceke_platearea dp ON dml.PlateID = dp.PlateID
|
||||||
LEFT JOIN diceke_shovel ds ON dml.ShovelID = ds.ShovelID
|
LEFT JOIN diceke_shovel ds ON dml.ShovelID = ds.ShovelID
|
||||||
</select>
|
</select>
|
||||||
|
<!--
|
||||||
|
// 两个时间内查询
|
||||||
<select id="findLossByMonthRange" resultType="com.jdc.jdcproject.entity.VO.DicekeMininglossVo">
|
<select id="findLossByMonthRange" resultType="com.jdc.jdcproject.entity.VO.DicekeMininglossVo">
|
||||||
select dml.LossID,
|
select dml.LossID,
|
||||||
dp.PlateRange,
|
dp.PlateRange,
|
||||||
@ -39,6 +40,7 @@
|
|||||||
AND
|
AND
|
||||||
(YEAR(dml.Month) < #{endMonthY} OR (YEAR(dml.Month) = #{endMonthY} AND MONTH(dml.Month) <= #{endMonthM}))
|
(YEAR(dml.Month) < #{endMonthY} OR (YEAR(dml.Month) = #{endMonthY} AND MONTH(dml.Month) <= #{endMonthM}))
|
||||||
</select>
|
</select>
|
||||||
|
-->
|
||||||
|
|
||||||
<select id="findLossByMonth" resultType="com.jdc.jdcproject.entity.VO.DicekeMininglossVo">
|
<select id="findLossByMonth" resultType="com.jdc.jdcproject.entity.VO.DicekeMininglossVo">
|
||||||
select dml.LossID,
|
select dml.LossID,
|
||||||
|
@ -22,9 +22,11 @@ public interface IDicekeMininglossService extends IService<DicekeMiningloss> {
|
|||||||
|
|
||||||
int savedml(DicekeMininglossVo dicekeMininglossVo);
|
int savedml(DicekeMininglossVo dicekeMininglossVo);
|
||||||
|
|
||||||
|
/*
|
||||||
|
// 两个时间内查询
|
||||||
List<DicekeMininglossVo> getLossByMonthRange(LocalDate Month, LocalDate endMonth);
|
List<DicekeMininglossVo> getLossByMonthRange(LocalDate Month, LocalDate endMonth);
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
List<DicekeMininglossVo> getLossByMonth(LocalDate Month);
|
List<DicekeMininglossVo> getLossByMonth(LocalDate Month);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,8 @@ public class DicekeMininglossServiceImpl extends ServiceImpl<DicekeMininglossMap
|
|||||||
return baseMapper.findAllLoss();
|
return baseMapper.findAllLoss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// 两个时间内查询
|
||||||
@Override
|
@Override
|
||||||
public List<DicekeMininglossVo> getLossByMonthRange(LocalDate month, LocalDate endMonth) {
|
public List<DicekeMininglossVo> getLossByMonthRange(LocalDate month, LocalDate endMonth) {
|
||||||
|
|
||||||
@ -72,6 +73,7 @@ public class DicekeMininglossServiceImpl extends ServiceImpl<DicekeMininglossMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user