Explorar o código

Merge remote-tracking branch 'origin/master'

liuyc hai 1 ano
pai
achega
f45f064af7

+ 43 - 0
blade-service-api/blade-land-api/src/main/java/org/springblade/land/entity/ClearingAgreementInfo.java

@@ -0,0 +1,43 @@
+package org.springblade.land.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+import java.math.BigDecimal;
+
+/**
+ * @Param
+ * @Author wangwl
+ * @Date 2023/10/7 17:31
+ **/
+@Data
+@TableName("l_clearing_agreement_info")
+@EqualsAndHashCode(callSuper = true)
+public class ClearingAgreementInfo extends BaseEntity {
+    @ApiModelProperty(value = "项目id")
+    private Long projectId;
+
+    @ApiModelProperty(value = "计量期")
+    private Long periodId;
+
+    @ApiModelProperty(value = "协议名称")
+    private String name;
+
+    @ApiModelProperty(value = "协议类型")
+    private Integer type;
+
+    @ApiModelProperty(value = "协议金额")
+    private BigDecimal agreementMoney;
+
+    @ApiModelProperty(value = "协议PDF路径")
+    private String mergePdfUrl;
+
+    @ApiModelProperty(value = "区域id")
+    private Long areaId;
+
+    @ApiModelProperty(value = "补偿协议ids")
+    private String agreementIds;
+}

+ 19 - 0
blade-service/blade-land/src/main/java/org/springblade/land/controller/ClearingAgreementInfoController.java

@@ -0,0 +1,19 @@
+package org.springblade.land.controller;
+
+import io.swagger.annotations.Api;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Param
+ * @Author wangwl
+ * @Date 2023/10/7 17:40
+ **/
+@RestController
+@AllArgsConstructor
+@RequestMapping("/clearingAgreementInfo")
+@Api(value = "结算协议", tags = "结算协议接口")
+public class ClearingAgreementInfoController {
+
+}

+ 23 - 15
blade-service/blade-land/src/main/java/org/springblade/land/controller/CompensationInfoController.java

@@ -156,7 +156,7 @@ public class CompensationInfoController extends BladeController {
     }
 
     @GetMapping("/get-buss-pdfInfo")
-    @ApiOperationSupport(order = 18)
+    @ApiOperationSupport(order = 9)
     @ApiOperation(value = "单表pdf预览", notes = "单表pdf预览")
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "id", value = "当前表单的id", required = true)
@@ -166,7 +166,7 @@ public class CompensationInfoController extends BladeController {
     }
 
     @GetMapping("/get-buss-pdfs")
-    @ApiOperationSupport(order = 21)
+    @ApiOperationSupport(order = 10)
     @ApiOperation(value = "多表预览", notes = "多表预览")
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "agreementId", value = "协议的id", required = true),
@@ -175,21 +175,9 @@ public class CompensationInfoController extends BladeController {
         return compensationInfoService.getPdfS(agreementId);
     }
 
-//    @PostMapping("/add-cope-tab")
-//    @ApiOperationSupport(order = 19)
-//    @ApiOperation(value = "表单新增复制", notes = "表单新增复制,,返回协议id")
-//    @ApiImplicitParams(value = {
-//            @ApiImplicitParam(name = "projectId", value = "项目id", required = true),
-//            @ApiImplicitParam(name = "areaId", value = "当前树节点id", required = true),
-//            @ApiImplicitParam(name = "tableId", value = "表单的tableId", required = true),
-//            @ApiImplicitParam(name = "nodeType", value = "新增返回的nodeType", required = true)
-//    })
-//    public R addCopeTab(@RequestBody TableCopyVO vo) {
-//        return compensationInfoService.addCopeTab(vo);
-//    }
 
     @GetMapping("/cope-tab")
-    @ApiOperationSupport(order = 19)
+    @ApiOperationSupport(order = 11)
     @ApiOperation(value = "表单复制", notes = "表单复制,传入当前表id,返回协议id")
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "id", value = "当前表单的id", required = true)
@@ -198,4 +186,24 @@ public class CompensationInfoController extends BladeController {
         return compensationInfoService.updateCopeTab(id);
     }
 
+
+    /**
+     * 结算获取补偿协议,不分页,不显示已经引用的
+     * @param info
+     * @return
+     */
+    @GetMapping("/getAgreementList")
+    @ApiOperationSupport(order = 12)
+    @ApiOperation(value = "结算查询补偿协议", notes = "结算查询补偿协议")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "projectId", value = "项目id", required = true),
+            @ApiImplicitParam(name = "areaId", value = "当前树节点id", required = true),
+            @ApiImplicitParam(name = "type", value = "协议类型1征地补偿2坟地补偿3专项设施", required = true),
+            @ApiImplicitParam(name = "number", value = "编号搜索值", required = false)
+    })
+    public R<List<CompensationInfo>> getAgreementList(CompensationInfo info)  {
+        List<CompensationInfo> list = compensationInfoService.getAgreementList(info);
+        return R.data(list);
+    }
+
 }

+ 34 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/ClearingAgreementInfoMapper.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.land.entity.ClearingAgreementInfo;
+import org.springblade.land.entity.SettlementInterval;
+
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface ClearingAgreementInfoMapper extends BaseMapper<ClearingAgreementInfo> {
+
+
+}

+ 5 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/ClearingAgreementInfoMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.land.mapper.ClearingAgreementInfoMapper">
+
+</mapper>

+ 2 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/CompensationInfoMapper.java

@@ -67,4 +67,6 @@ public interface CompensationInfoMapper extends BaseMapper<CompensationInfo> {
     IPage<CompensationInfo> page(IPage<CompensationInfo> iPage,@Param("info") CompensationInfo info);
 
     Integer getNumber(@Param("areaId") Long areaId);
+
+    List<CompensationInfo> getAgreementList(@Param("info") CompensationInfo info);
 }

+ 8 - 0
blade-service/blade-land/src/main/java/org/springblade/land/mapper/CompensationInfoMapper.xml

@@ -59,6 +59,14 @@
         select count(1)
         from l_compensation_info where area_id = #{areaId}
     </select>
+    <select id="getAgreementList" resultType="org.springblade.land.entity.CompensationInfo">
+        select id,number,name,all_money,is_quote from l_compensation_info
+        where project_id = #{info.projectId} and is_deleted = 0 and `type` = #{info.type} and is_quote = 0
+        and area_id in (select id from l_region_tree_info where is_deleted = 0 and (id = #{info.areaId} or ancestors like CONCAT(CONCAT('%', #{info.areaId}), '%')))
+        <if test="info.number != null and info.number != ''">
+            and number like CONCAT(CONCAT('%', #{info.number}), '%')
+        </if>
+    </select>
 
 
 </mapper>

+ 35 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/IClearingAgreementInfoService.java

@@ -0,0 +1,35 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.land.service;
+
+
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.land.dto.SettlementIntervalDTO;
+import org.springblade.land.entity.ClearingAgreementInfo;
+import org.springblade.land.entity.SettlementInterval;
+
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface IClearingAgreementInfoService extends BaseService<ClearingAgreementInfo> {
+
+
+}

+ 2 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/ICompensationInfoService.java

@@ -68,4 +68,6 @@ public interface ICompensationInfoService extends BaseService<CompensationInfo>
     Long add(Long projectId, Long areaId, Integer type);
 
     void remove(List<Long> ids);
+
+    List<CompensationInfo> getAgreementList(CompensationInfo info);
 }

+ 24 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/ClearingAgreementInfoServiceImpl.java

@@ -0,0 +1,24 @@
+package org.springblade.land.service.impl;
+
+
+import lombok.AllArgsConstructor;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.land.dto.SettlementIntervalDTO;
+import org.springblade.land.entity.ClearingAgreementInfo;
+import org.springblade.land.entity.SettlementInterval;
+import org.springblade.land.mapper.ClearingAgreementInfoMapper;
+import org.springblade.land.mapper.SettlementIntervalMapper;
+import org.springblade.land.service.IClearingAgreementInfoService;
+import org.springblade.land.service.ISettlementIntervalService;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDate;
+import java.util.List;
+
+@Service
+@AllArgsConstructor
+public class ClearingAgreementInfoServiceImpl extends BaseServiceImpl<ClearingAgreementInfoMapper, ClearingAgreementInfo> implements IClearingAgreementInfoService {
+
+
+}

+ 11 - 0
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/CompensationInfoServiceImpl.java

@@ -474,6 +474,17 @@ public class CompensationInfoServiceImpl extends BaseServiceImpl<CompensationInf
         this.deleteLogic(ids);
     }
 
+    /**
+     * 结算获取补偿协议列表
+     * @param info
+     * @return
+     */
+    @Override
+    public List<CompensationInfo> getAgreementList(CompensationInfo info) {
+        List<CompensationInfo> list = baseMapper.getAgreementList(info);
+        return list;
+    }
+
     //获取当前节点的补偿编号
     private String getNumber(Long areaId) {
         Integer number = baseMapper.getNumber(areaId);