Parcourir la source

Merge branch 'master' of http://39.108.216.210:3000/zhuwei/bladex

huangtf il y a 7 mois
Parent
commit
d2242f105a
21 fichiers modifiés avec 109 ajouts et 31 suppressions
  1. 17 0
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/dto/ContractMaterialDTO2.java
  2. 4 0
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/entity/ContractMaterialAdjust.java
  3. 1 1
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/ContractMaterialVO3.java
  4. 4 1
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/ContractMaterialVO4.java
  5. 3 0
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/GetMaterialCurrentPriceVO.java
  6. 25 0
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/MaterialDetailVO.java
  7. 5 4
      blade-service/blade-meter/src/main/java/org/springblade/meter/controller/ContractMaterialAdjustController.java
  8. 1 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/controller/ContractMaterialController.java
  9. 1 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/controller/ContractMaterialValidityController.java
  10. 4 4
      blade-service/blade-meter/src/main/java/org/springblade/meter/controller/MeterPeriodController.java
  11. 3 0
      blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/ContractMaterialAdjustMapper.xml
  12. 1 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/ContractMaterialValidityMapper.java
  13. 2 2
      blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/ContractMaterialValidityMapper.xml
  14. 1 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MeterPeriodMapper.java
  15. 2 2
      blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MeterPeriodMapper.xml
  16. 1 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/service/IContractMaterialValidityService.java
  17. 1 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/service/IMeterPeriodService.java
  18. 8 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/ContractInventoryFormServiceImpl.java
  19. 3 3
      blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/ContractMaterialAdjustServiceImpl.java
  20. 19 5
      blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/ContractMaterialValidityServiceImpl.java
  21. 3 2
      blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/MeterPeriodServiceImpl.java

+ 17 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/dto/ContractMaterialDTO2.java

@@ -24,6 +24,7 @@ import org.springframework.validation.annotation.Validated;
 
 import javax.validation.constraints.NotNull;
 import javax.validation.groups.Default;
+import java.math.BigDecimal;
 
 /**
  * 合同材料表数据传输对象实体类
@@ -47,6 +48,22 @@ public class ContractMaterialDTO2 {
 	@NotNull(message = "请传入调差期id!")
 	private Long contractPeriodId;
 
+	@ApiModelProperty(value = "价格有效期id")
+	@NotNull(message = "请传入材料价格有效期id!")
+	private Long materialValidityId;
+
+	@ApiModelProperty(value = "材料基准价格")
+	@NotNull(message = "请传入材料基准价格!")
+	private BigDecimal materialPrice;
+
+	@ApiModelProperty(value = "实时价格")
+	@NotNull(message = "请传入材料实时价格!")
+	private BigDecimal currentPrice;
+
+	@ApiModelProperty(value = "价差幅度,百分比")
+	@NotNull(message = "请传入价差幅度!")
+	private BigDecimal rangePriceRatio;
+
 	@ApiModelProperty(value = "调差时间")
 	private String adjustMonth;
 

+ 4 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/entity/ContractMaterialAdjust.java

@@ -54,6 +54,10 @@ public class ContractMaterialAdjust extends BaseEntity {
     @NotNull(message = "请传入合同段id!")
     private Long contractId;
 
+    @ApiModelProperty(value = "材料计量期id")
+    @NotNull(message = "请传入材料计量期id!")
+    private Long meterPeriodId;
+
     @ApiModelProperty(value = "合同材料id")
     @NotNull(message = "请传入合同材料id!")
     private Long contractMaterialId;

+ 1 - 1
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/ContractMaterialVO3.java

@@ -24,7 +24,7 @@ import org.springblade.meter.entity.ContractMaterial;
 import java.math.BigDecimal;
 
 /**
- * 材料实时价格-材料列表不分页
+ * 材料实时价格-材料列表不分页	price为null
  *
  * @author BladeX
  * @since 2023-11-29

+ 4 - 1
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/ContractMaterialVO4.java

@@ -22,7 +22,7 @@ import lombok.Data;
 import java.math.BigDecimal;
 
 /**
- * 材料实时价格-材料列表不分页
+ * 调差系数-材料列表不分页  price要返回
  *
  * @author BladeX
  * @since 2023-11-29
@@ -43,5 +43,8 @@ public class ContractMaterialVO4 {
 	@ApiModelProperty(value = "单位")
 	private String unit;
 
+	@ApiModelProperty(value = "价格")
+	private String price;
+
 
 }

+ 3 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/GetMaterialCurrentPriceVO.java

@@ -17,6 +17,9 @@ public class GetMaterialCurrentPriceVO {
     @ApiModelProperty(value = "材料实时价格id")
     private Long id;
 
+    @ApiModelProperty(value = "材料价格有效期id")
+    private Long materialValidityId;
+
     @ApiModelProperty(value = "节点名称")
     private String nodeName;
 

+ 25 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/MaterialDetailVO.java

@@ -0,0 +1,25 @@
+package org.springblade.meter.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.meter.entity.AttachmentForm;
+import org.springblade.meter.entity.ContractMaterialAdjust;
+import org.springblade.meter.entity.ContractMaterialAdjustDetail;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @Param   新增时获取材料明细,同时返回计算式与调差金额(暂时未使用)
+ * @Author wangwl
+ * @Date 2024/4/25 10:15
+ **/
+@Data
+public class MaterialDetailVO  {
+
+    @ApiModelProperty(value = "材料明细集合")
+    private List<ContractMaterialAdjustDetail> details;
+
+
+}

+ 5 - 4
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/ContractMaterialAdjustController.java

@@ -65,8 +65,9 @@ public class ContractMaterialAdjustController extends BladeController {
         return R.data(list);
     }
 
+
     @PostMapping("/add")
-    @ApiOperationSupport(order = 2)
+    @ApiOperationSupport(order = 3)
     @ApiOperation(value = "新增", notes = "传入材料调差单")
     public R add(@Valid @RequestBody ContractMaterialAdjustAddDTO dto) {
         adjustService.add(dto);
@@ -74,7 +75,7 @@ public class ContractMaterialAdjustController extends BladeController {
     }
 
     @PostMapping("/page")
-    @ApiOperationSupport(order = 3)
+    @ApiOperationSupport(order = 4)
     @ApiOperation(value = "材料调差分页", notes = "传入合同id分页信息,搜索条件:调差期id,调差时间")
     public R<IPage<ContractMaterialAdjustVO>> page(@RequestBody ContractMaterialDTO2 dto) {
         IPage<ContractMaterialAdjustVO> list = adjustService.page2(dto);
@@ -82,7 +83,7 @@ public class ContractMaterialAdjustController extends BladeController {
     }
 
     @GetMapping("/detail")
-    @ApiOperationSupport(order = 4)
+    @ApiOperationSupport(order = 5)
     @ApiOperation(value = "材料调差详情", notes = "传入材料调差表id")
     public R<MaterialAdjustDetailVO> detail(Long id) {
         MaterialAdjustDetailVO vo = adjustService.detail(id);
@@ -90,7 +91,7 @@ public class ContractMaterialAdjustController extends BladeController {
     }
 
     @PostMapping("/update")
-    @ApiOperationSupport(order = 5)
+    @ApiOperationSupport(order = 6)
     @ApiOperation(value = "修改", notes = "传入材料调差单")
     public R update(@Valid @RequestBody ContractMaterialAdjustAddDTO dto) {
         adjustService.update2(dto);

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/ContractMaterialController.java

@@ -48,7 +48,7 @@ import java.util.List;
 @RestController
 @AllArgsConstructor
 @RequestMapping("/contractMaterial")
-@Api(value = "合同材料", tags = "合同材料接口")
+@Api(value = "合同材料", tags = "合同材料接口")
 public class ContractMaterialController extends BladeController {
 
 	private final IContractMaterialService contractMaterialService;

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/ContractMaterialValidityController.java

@@ -81,7 +81,7 @@ public class ContractMaterialValidityController extends BladeController {
 	@GetMapping("/get-material-current-price")
 	@ApiOperationSupport(order = 3)
 	@ApiOperation(value = "材料调差-选择实时价格", notes = "传入合同id,材料id,传入年月")
-	public R<List<GetMaterialCurrentPriceVO>> getMaterialCurrentPrice(Long contractId, Long materialId, YearMonth yearMonth) {
+	public R<List<GetMaterialCurrentPriceVO>> getMaterialCurrentPrice(Long contractId, Long materialId, String yearMonth) {
 		List<GetMaterialCurrentPriceVO> list = validityService.getMaterialCurrentPrice(contractId,materialId,yearMonth);
 		return R.data(list);
 	}

+ 4 - 4
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/MeterPeriodController.java

@@ -107,13 +107,13 @@ public class MeterPeriodController extends BladeController {
 	}
 
 	/**
-	 * 计量期列表-已审批 材料开工计量期表
+	 * 计量期列表-已审批或未上报  材料开工计量期表
 	 */
 	@GetMapping("/approvalPeriod")
 	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "计量期列表-已审批", notes = "传入contractId,type:材料传1开工传2")
-	public R<List<MeterPeriod>> approvalPeriod(Long contractId,Integer type) {
-		return R.data(meterPeriodService.approvalPeriod(contractId,type));
+	@ApiOperation(value = "计量期列表-已审批或未上报", notes = "传入contractId,type:材料传1开工传2,传notApp代表查询未上报的")
+	public R<List<MeterPeriod>> approvalPeriod(Long contractId,Integer type,Integer notApp) {
+		return R.data(meterPeriodService.approvalPeriod(contractId,type,notApp));
 	}
 
 

+ 3 - 0
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/ContractMaterialAdjustMapper.xml

@@ -20,6 +20,9 @@
         select *,if(approve_status = 0,'未完成','已完成') as approveStatusName
         from s_contract_material_adjust
         where contract_id = #{dto.contractId} and is_deleted = 0 and contract_period_id = #{dto.contractPeriodId}
+        <if test="dto.contractPeriodId != null and dto.contractPeriodId != ''">
+            and contract_period_id = #{dto.contractPeriodId}
+        </if>
         <if test="dto.adjustMonth != null and dto.adjustMonth != ''">
             and adjust_month = #{dto.adjustMonth}
         </if>

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/ContractMaterialValidityMapper.java

@@ -48,7 +48,7 @@ public interface ContractMaterialValidityMapper extends BaseMapper<ContractMater
 
     List<ContractMaterialVO3> detail(@Param("id") Long id);
 
-    List<GetMaterialCurrentPriceVO> getMaterialCurrentPrice(@Param("contractId") Long contractId,@Param("materialId") Long materialId,@Param("yearMonth") YearMonth yearMonth);
+    List<GetMaterialCurrentPriceVO> getMaterialCurrentPrice(@Param("contractId") Long contractId,@Param("materialId") Long materialId,@Param("yearMonth") String yearMonth);
 
     ContractMaterial getMaterial(@Param("id") Long materialId);
 }

+ 2 - 2
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/ContractMaterialValidityMapper.xml

@@ -24,13 +24,13 @@
         where scmp.is_deleted = 0 and scmp.material_validity_id = #{id}
     </select>
     <select id="getMaterialCurrentPrice" resultType="org.springblade.meter.vo.GetMaterialCurrentPriceVO">
-        select scmv.node_name ,scmp.current_price,scmp.id,scmv.start_date,scmv.end_date,
+        select scmv.node_name ,scmp.current_price,scmp.id,scmv.start_date,scmv.end_date,scmp.material_validity_id,
         (select material_number from s_contract_material scm where scm.id = scmp.contract_material_id) as materialNumber,
         (select material_name from s_contract_material scm where scm.id = scmp.contract_material_id) as materialName,
         (select unit from s_contract_material scm where scm.id = scmp.contract_material_id) as unit
         from s_contract_material_validity scmv inner join s_contract_material_price scmp on scmv.id = scmp.material_validity_id
         where scmp.contract_material_id = #{materialId} and scmp.is_deleted = 0 and scmv.is_deleted = 0
-        <if test="yearMonth != null">
+        <if test="yearMonth != null and yearMonth != ''">
           and #{yearMonth} between date_format(scmv.start_date,'%Y-%m') and date_format(scmv.end_date ,'%Y-%m')
         </if>
         order by end_date desc

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MeterPeriodMapper.java

@@ -41,5 +41,5 @@ public interface MeterPeriodMapper extends BaseMapper<MeterPeriod> {
 
     List<MeterPeriodVO> allPeriod(@Param("contractId") Long contractId,@Param("type") Integer type);
 
-    List<MeterPeriod> approvalPeriod(@Param("contractId") Long contractId,@Param("type") Integer type);
+    List<MeterPeriod> approvalPeriod(@Param("contractId") Long contractId,@Param("type") Integer type,@Param("noApp") Integer notApp);
 }

+ 2 - 2
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MeterPeriodMapper.xml

@@ -73,7 +73,7 @@
             if(smp.is_lock = 0,if((select count(1) from s_material_meter_form mmf where contract_id = #{contractId} and is_deleted = 0 and mmf.meter_period_id = smp.id)=0,
             if((select count(1) from s_material_start_statement mss where contract_id = #{contractId} and is_deleted = 0 and mss.meter_period_id = smp.id)=0,0,1),1),1) as citeStatus
             from s_meter_period smp
-            where is_deleted = 0 and contract_id = #{contractId} and type = 1 and approve_status = 2
+            where is_deleted = 0 and contract_id = #{contractId} and type = 1 and approve_status = #{noApp}
             ORDER BY sort
         </if>
         <if test="type == 2">
@@ -81,7 +81,7 @@
             if(smp.is_lock = 0,if((select count(1) from s_start_pay_meter_form smf where contract_id = #{contractId} and is_deleted = 0 and smf.meter_period_id = smp.id)=0,
             if((select count(1) from s_material_start_statement mss where contract_id = #{contractId} and is_deleted = 0 and mss.meter_period_id = smp.id)=0,0,1),1),1) as citeStatus
             from s_meter_period smp
-            where is_deleted = 0 and contract_id = #{contractId} and type = 2 and approve_status = 2
+            where is_deleted = 0 and contract_id = #{contractId} and type = 2 and approve_status = #{noApp}
             ORDER BY sort
         </if>
     </select>

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/service/IContractMaterialValidityService.java

@@ -44,7 +44,7 @@ public interface IContractMaterialValidityService extends BaseService<ContractMa
 
     List<ContractMaterialVO3> detail(Long id);
 
-    List<GetMaterialCurrentPriceVO> getMaterialCurrentPrice(Long contractId, Long materialId, YearMonth yearMonth);
+    List<GetMaterialCurrentPriceVO> getMaterialCurrentPrice(Long contractId, Long materialId, String yearMonth);
 
     Map<String, Object> getMaterialRangePrice( Long priceId);
 }

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/service/IMeterPeriodService.java

@@ -44,5 +44,5 @@ public interface IMeterPeriodService extends BaseService<MeterPeriod> {
 
     List<MeterPeriod> conditionPeriod(Long contractId, Integer type);
 
-    List<MeterPeriod> approvalPeriod(Long contractId, Integer type);
+    List<MeterPeriod> approvalPeriod(Long contractId, Integer type,Integer notApp);
 }

+ 8 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/ContractInventoryFormServiceImpl.java

@@ -453,7 +453,14 @@ public class ContractInventoryFormServiceImpl extends BaseServiceImpl<ContractIn
         //判断是否已经被分解或者被变更,包括零号变更
         Boolean isChange = this.nodeIsChange(nodeInfo);
         if (isChange){
-            throw new ServiceException("当前节点已经被分解或者变更,不允许修改");
+            if ((nodeInfo.getIsAdjust() == 1 && form.getIsAdjust() == 0) || (nodeInfo.getIsAdjust() == 0 && form.getIsAdjust() == 1)){
+                this.update(new LambdaUpdateWrapper<ContractInventoryForm>()
+                        .eq(ContractInventoryForm::getId,nodeInfo.getId())
+                        .set(ContractInventoryForm::getIsAdjust,form.getIsAdjust()));
+                return;
+            }else {
+                throw new ServiceException("当前节点已经被分解或者变更,不允许修改");
+            }
         }
         //校验是否允许调差是否被修改,如果从是修改为否,则校验是否已经关联了
         if (nodeInfo.getIsAdjust() == 1 && form.getIsAdjust() == 0){

+ 3 - 3
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/ContractMaterialAdjustServiceImpl.java

@@ -110,7 +110,7 @@ public class ContractMaterialAdjustServiceImpl extends BaseServiceImpl<ContractM
     }
 
     @Override
-    public List<ContractMaterialAdjustDetail> getMaterialDetail(ContractMaterialDTO2 dto) {
+    public  List<ContractMaterialAdjustDetail> getMaterialDetail(ContractMaterialDTO2 dto) {
         //1 获取所有材料关联的清单,如果没有则提示
         List<InventoryFormMaterial> formMaterials = formMaterialService.list(new LambdaQueryWrapper<InventoryFormMaterial>()
                 .eq(InventoryFormMaterial::getContractMaterialId, dto.getContractMaterialId()));
@@ -128,8 +128,8 @@ public class ContractMaterialAdjustServiceImpl extends BaseServiceImpl<ContractM
 
     @Override
     public IPage<ContractMaterialAdjustVO> page2(ContractMaterialDTO2 dto) {
-        if (dto.getContractId() == null || dto.getContractPeriodId() == null){
-            throw new ServiceException("请传入合同id和调差期id");
+        if (dto.getContractId() == null){
+            throw new ServiceException("请传入合同id");
         }
         IPage<ContractMaterialAdjustVO> iPage = new Page<>(dto.getCurrent(),dto.getSize());
         return baseMapper.page2(iPage,dto);

+ 19 - 5
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/ContractMaterialValidityServiceImpl.java

@@ -23,10 +23,7 @@ import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.meter.dto.ContractMaterialValidityDTO;
-import org.springblade.meter.entity.AttachmentForm;
-import org.springblade.meter.entity.ContractMaterial;
-import org.springblade.meter.entity.ContractMaterialPrice;
-import org.springblade.meter.entity.ContractMaterialValidity;
+import org.springblade.meter.entity.*;
 import org.springblade.meter.mapper.AttachmentFormMapper;
 import org.springblade.meter.mapper.ContractMaterialMapper;
 import org.springblade.meter.mapper.ContractMaterialValidityMapper;
@@ -37,6 +34,7 @@ import org.springblade.meter.utils.ForestNodeMerger;
 import org.springblade.meter.vo.ContractMaterialVO3;
 import org.springblade.meter.vo.ContractMaterialValidityVO;
 import org.springblade.meter.vo.GetMaterialCurrentPriceVO;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -44,6 +42,7 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.time.LocalDate;
 import java.time.YearMonth;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 
 /**
@@ -131,7 +130,7 @@ public class ContractMaterialValidityServiceImpl extends BaseServiceImpl<Contrac
     }
 
     @Override
-    public List<GetMaterialCurrentPriceVO> getMaterialCurrentPrice(Long contractId, Long materialId, YearMonth yearMonth) {
+    public List<GetMaterialCurrentPriceVO> getMaterialCurrentPrice(Long contractId, Long materialId, String yearMonth) {
         List<GetMaterialCurrentPriceVO> vos = baseMapper.getMaterialCurrentPrice(contractId,materialId,yearMonth);
         return vos;
     }
@@ -152,10 +151,25 @@ public class ContractMaterialValidityServiceImpl extends BaseServiceImpl<Contrac
         if (quotaRatio == null){
             throw new ServiceException("材料未设置调差限额");
         }
+        //获取材料有效期
+        ContractMaterialValidity validity1 = this.getById(validity.getMaterialValidityId());
+        //获取材料调差名称
+        //计算调差金额,生成计算式
+        StringBuilder str = new StringBuilder("调差价格依据于:"+material.getMaterialName()+
+                "("+validity1.getStartDate().format(DateTimeFormatter.ofPattern("yyyyMMdd"))+"至"+
+                validity1.getEndDate().format(DateTimeFormatter.ofPattern("yyyyMMdd"))+")\n");
         //计算比例
+        if (price.compareTo(currentPrice) == 1){
+            //市场价低于基准价
+            str.append("调差公式(标准):调增金额=调差数量×[市场价-基准价×(1-风险幅度差%)]×(1+合同增值税税率)\n");
+        }else {
+            //市场价高于基准价
+            str.append("调差公式(标准):调增金额=调差数量×[市场价-基准价×(1+风险幅度差%)]×(1+合同增值税税率)\n");
+        }
         Map<String, Object> map = new HashMap<>();
         BigDecimal decimal = currentPrice.subtract(price).multiply(new BigDecimal(100)).divide(price, 2, RoundingMode.DOWN);
         map.put("rangePriceRatio",decimal);
+        map.put("adjustCalculation",str.toString());
         if (decimal.compareTo(quotaRatio.negate()) == 1 && decimal.compareTo(quotaRatio) == -1){
             map.put("isAdjust",0);
         }else {

+ 3 - 2
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/MeterPeriodServiceImpl.java

@@ -160,7 +160,8 @@ public class MeterPeriodServiceImpl extends BaseServiceImpl<MeterPeriodMapper, M
      * 计量期列表-已审批 材料开工计量期表
      */
     @Override
-    public List<MeterPeriod> approvalPeriod(Long contractId, Integer type) {
-        return baseMapper.approvalPeriod(contractId,type);
+    public List<MeterPeriod> approvalPeriod(Long contractId, Integer type,Integer notApp) {
+        notApp = notApp == null?2:0;
+        return baseMapper.approvalPeriod(contractId,type,notApp);
     }
 }