Merge remote-tracking branch 'git-pipIrr/master'
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivideDetails; |
| | | import com.dy.pipIrrGlobal.voPr.VoSimpleDivide; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | int insertSelective(PrDivide record); |
| | | |
| | | /** |
| | | * 2025-01-21 废弃 |
| | | */ |
| | | PrDivide selectByPrimaryKey(Long id); |
| | | |
| | | VoDivideDetails getDivideDetails(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(PrDivide record); |
| | | |
| | | int updateByPrimaryKey(PrDivide record); |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voPr; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2025-01-21 17:27 |
| | | * @LastEditTime 2025-01-21 17:27 |
| | | * @Description 分水房详细对象,移动端分水房详细页使用 |
| | | */ |
| | | |
| | | @Data |
| | | @JsonPropertyOrder({"id", "countyId", "townId", "villageId", "blockId", "name", "villages", "area", "header", "phone", "lat", "lng", "operateDt", "operator", "blockName", "address", "remarks"}) |
| | | public class VoDivideDetails implements BaseEntity { |
| | | public static final long serialVersionUID = 202501211730001L; |
| | | |
| | | /** |
| | | * 分水房ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 县ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long countyId; |
| | | |
| | | /** |
| | | * 镇ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long townId; |
| | | |
| | | /** |
| | | * 村ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long villageId; |
| | | |
| | | /** |
| | | * 片区ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long blockId; |
| | | |
| | | /** |
| | | * 分水房编号 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 覆盖村 |
| | | */ |
| | | private String villages; |
| | | |
| | | /** |
| | | * 覆盖面积 |
| | | */ |
| | | private Double area; |
| | | |
| | | /** |
| | | * 负责人 |
| | | */ |
| | | private String header; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | private Double lat; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | private Double lng; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date operateDt; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 片区名称 |
| | | */ |
| | | private String blockName; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 备注信息 |
| | | */ |
| | | private String remarks; |
| | | |
| | | } |
| | |
| | | allow-bean-definition-overriding: true #设置为true时,后定义的bean会覆盖之前定义的相同名称的bean |
| | | datasource: #配置数据源 |
| | | #多个数据源名称在此配置,要求与spring。datasource。[ym][sp][test]中的一致 |
| | | names: ym,mj,sp,test,mq |
| | | # names: ym,mj,sp,test,mq |
| | | names: ym,sp,test |
| | |
| | | id, countyId, townId, villageId, blockId, `name`, villages, area, `header`, phone, |
| | | lng, lat, remarks, `operator`, operateDt, deleted |
| | | </sql> |
| | | |
| | | <!--2025-01-21 废弃--> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | |
| | | from pr_divide |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="getDivideDetails" resultType="com.dy.pipIrrGlobal.voPr.VoDivideDetails"> |
| | | SELECT |
| | | divi.id, |
| | | divi.countyId, |
| | | divi.townId, |
| | | divi.villageId, |
| | | divi.blockId, |
| | | divi.name, |
| | | divi.villages, |
| | | divi.area, |
| | | divi.header, |
| | | divi.phone, |
| | | divi.lat, |
| | | divi.lng, |
| | | divi.operateDt, |
| | | divi.operator, |
| | | blo.`name` AS blockName, |
| | | CONCAT(country.`name`, town.`name`, village.`name`) AS address, |
| | | divi.remarks |
| | | FROM pr_divide divi |
| | | INNER JOIN ba_block blo ON divi.blockId = blo.id |
| | | Left JOIN ba_district country ON divi.countyId = country.id |
| | | Left JOIN ba_district town ON divi.townId = town.id |
| | | Left JOIN ba_district village ON divi.villageid = village.id |
| | | , (SELECT @i:=0) AS itable |
| | | WHERE divi.deleted = 0 AND divi.id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from pr_divide |
| | |
| | | import com.dy.pipIrrGlobal.pojoBa.BaClient; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivideDetails; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import com.dy.pipIrrProject.result.ProjectResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | }) |
| | | @GetMapping(path = "/getone/{id}") |
| | | @SsoAop() |
| | | public BaseResponse<PrDivide> getOneDivide(@PathVariable("id") Long id){ |
| | | //public BaseResponse<PrDivide> getOneDivide(@PathVariable("id") Long id){ |
| | | public BaseResponse<VoDivideDetails> getOneDivide(@PathVariable("id") Long id){ |
| | | try { |
| | | PrDivide res = divideSv.getOneDivide(id); |
| | | if(res != null) { |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | }else { |
| | | return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_DIVIDES.getMessage()); |
| | | } |
| | | //PrDivide res = divideSv.getOneDivide(id); |
| | | //if(res != null) { |
| | | // return BaseResponseUtils.buildSuccess(res); |
| | | //}else { |
| | | // return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_DIVIDES.getMessage()); |
| | | //} |
| | | return BaseResponseUtils.buildSuccess(divideSv.getDivideDetails(id)); |
| | | } catch (Exception e) { |
| | | log.error("查询农户异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | |
| | | import com.dy.pipIrrGlobal.daoPr.PrDivideMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivideDetails; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | /** |
| | | * 根据分水房主键获取分水房对象 |
| | | * 2025-01-21 废弃 |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | return prDivideMapper.selectByPrimaryKey(id); |
| | | } |
| | | |
| | | public VoDivideDetails getDivideDetails(Long id) { |
| | | return prDivideMapper.getDivideDetails(id); |
| | | } |
| | | |
| | | /** |
| | | * 根据主键逻辑删除一个分水房 |
| | | * @param id |