소스 검색

add
update page

Signed-off-by: lifang <493216081@qq.com>

lifang 3 일 전
부모
커밋
a68b7476ce

+ 2 - 3
tr-modules/tr-module-biz-form/src/main/java/cn/tr/module/farm/controller/AgroPricePredictionController.java

@@ -79,8 +79,7 @@ public class AgroPricePredictionController extends BaseController {
     @ApiOperationSupport(author = "lingma",order = 1)
     @ApiOperation(value="查询测算记录详情",notes = "权限: 无")
     @GetMapping("/queryDetail/{id}")
-    public CommonResult<AgriInsuranceReportRecordVO> selectDetail(@PathVariable("id")String id) {
-
-        return CommonResult.success(new AgriInsuranceReportRecordVO());
+    public CommonResult<AgriInsuranceReportIndicatorsDetailVO> selectDetail(@PathVariable("id")String id) {
+        return CommonResult.success(agriInsuranceReportRecordService.selectAgriInsuranceReportRecordById(id));
     }
 }

+ 4 - 0
tr-modules/tr-module-biz-form/src/main/java/cn/tr/module/farm/controller/BizProductCateAnalysisController.java

@@ -45,6 +45,7 @@ public class BizProductCateAnalysisController extends BaseController{
         if(StrUtil.equalsAny(query.getCateCode(),"040100","040104")){
             query.setCateCode("040102");
         }
+        query.setRegionCode("000000");
         return CommonResult.success(spotWeeklyPriceService.getWeeklyPrice(query));
     }
 
@@ -61,6 +62,7 @@ public class BizProductCateAnalysisController extends BaseController{
         if(StrUtil.equalsAny(query.getCateCode(),"040100","040104")){
             query.setCateCode("040102");
         }
+        query.setRegionCode("000000");
         return CommonResult.success(futuresWeeklyPriceService.getWeeklyPrice(query));
     }
 
@@ -77,6 +79,7 @@ public class BizProductCateAnalysisController extends BaseController{
         if(StrUtil.equalsAny(query.getCateCode(),"040100","040104")){
             query.setCateCode("040102");
         }
+        query.setRegionCode("000000");
         return CommonResult.success(spotMonthlyPriceService.getMonthlyPrice(query));
     }
 
@@ -93,6 +96,7 @@ public class BizProductCateAnalysisController extends BaseController{
         if(StrUtil.equalsAny(query.getCateCode(),"040100","040104")){
             query.setCateCode("040102");
         }
+        query.setRegionCode("000000");
         // TODO: 实现具体的业务逻辑
         return CommonResult.success(weeklyForecastService.getWeeklyPrice(query));
     }

+ 3 - 0
tr-modules/tr-module-biz-form/src/main/java/cn/tr/module/farm/mapper/AgriInsuranceReportRecordMapper.java

@@ -1,5 +1,6 @@
 package cn.tr.module.farm.mapper;
 
+import cn.tr.module.farm.controller.vo.AgriInsuranceReportIndicatorsDetailVO;
 import cn.tr.module.farm.controller.vo.AgriInsuranceReportRecordVO;
 import cn.tr.module.farm.po.AgriInsuranceReportRecordPO;
 import cn.tr.module.farm.dto.AgriInsuranceReportRecordDTO;
@@ -22,6 +23,8 @@ public interface AgriInsuranceReportRecordMapper {
 
     AgriInsuranceReportRecordDTO convertDto(AgriInsuranceReportRecordPO source);
 
+    AgriInsuranceReportIndicatorsDetailVO convertVO(AgriInsuranceReportRecordPO source);
+
     List<AgriInsuranceReportRecordVO> convertVOList(List<AgriInsuranceReportRecordPO> source);
 
     List<AgriInsuranceReportRecordPO> convertPOList(List<AgriInsuranceReportRecordDTO> source);

+ 2 - 1
tr-modules/tr-module-biz-form/src/main/java/cn/tr/module/farm/service/IAgriInsuranceReportRecordService.java

@@ -1,5 +1,6 @@
 package cn.tr.module.farm.service;
 
+import cn.tr.module.farm.controller.vo.AgriInsuranceReportIndicatorsDetailVO;
 import cn.tr.module.farm.controller.vo.AgriInsuranceReportRecordVO;
 import cn.tr.module.farm.dto.AgriInsuranceReportRecordDTO;
 import cn.tr.module.farm.dto.AgriInsuranceReportRecordQueryDTO;
@@ -27,7 +28,7 @@ public interface IAgriInsuranceReportRecordService{
      * @author   lingma
      * @date     2025-12-10
      */
-    AgriInsuranceReportRecordDTO selectAgriInsuranceReportRecordById(String id);
+    AgriInsuranceReportIndicatorsDetailVO selectAgriInsuranceReportRecordById(String id);
 
     /**
      * 编辑智能测算记录

+ 3 - 2
tr-modules/tr-module-biz-form/src/main/java/cn/tr/module/farm/service/impl/AgriInsuranceReportRecordServiceImpl.java

@@ -1,6 +1,7 @@
 package cn.tr.module.farm.service.impl;
 
 import cn.tr.core.exception.TRExcCode;
+import cn.tr.module.farm.controller.vo.AgriInsuranceReportIndicatorsDetailVO;
 import cn.tr.module.farm.controller.vo.AgriInsuranceReportRecordVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -50,8 +51,8 @@ public class AgriInsuranceReportRecordServiceImpl implements IAgriInsuranceRepor
     * @date     2025-12-10
     */
     @Override
-    public AgriInsuranceReportRecordDTO selectAgriInsuranceReportRecordById(String id){
-        return AgriInsuranceReportRecordMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+    public AgriInsuranceReportIndicatorsDetailVO selectAgriInsuranceReportRecordById(String id){
+        return AgriInsuranceReportRecordMapper.INSTANCE.convertVO(baseRepository.selectById(id));
     };
 
     /**

+ 2 - 2
tr-modules/tr-module-biz-form/src/main/java/cn/tr/module/farm/util/PremiumCalculationResultParser.java

@@ -90,8 +90,8 @@ public class PremiumCalculationResultParser {
                             report.setSameAgriFutureHedging("1".equals(sameAgriFutureHedgingValue) ? 1 : 0);
 
                             report.setRelatedAgriFutureHedging(Integer.valueOf(innerArray.get(6).asText()));
-                            report.setPureRateNoFuture(BigDecimal.valueOf(innerArray.get(7).asDouble()));
-                            report.setPureRateSameFuture(BigDecimal.valueOf(innerArray.get(8).asDouble()));
+                            report.setPureRateNoFuture(BigDecimal.valueOf(innerArray.get(7).asDouble()).multiply(BigDecimal.valueOf(100)));
+                            report.setPureRateSameFuture(BigDecimal.valueOf(innerArray.get(8).asDouble()).multiply(BigDecimal.valueOf(100)));
 //                            report.setPureRateRelatedFuture(BigDecimal.valueOf(innerArray.get(9).asDouble()));
 //                            report.setPureRateSameRelatedFuture(BigDecimal.valueOf(innerArray.get(10).asDouble()));
                             report.setSameRelatedAgriFutureHedging(Integer.valueOf(innerArray.get(9).asText()));