41 changed files with 430 additions and 1521 deletions
@ -1,136 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Data |
|||
public class BaseGridInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织/网格Id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格层级[07:网格] |
|||
*/ |
|||
private String gridLevel; |
|||
|
|||
/** |
|||
* 专属网格类型[01:党政机关; 02:医院; 03:学校; 04:企业; 05:园区; 06:商圈; 07:市场; 08:景区; |
|||
*/ |
|||
private String gridType; |
|||
|
|||
/** |
|||
* 网格内人口规模[01:500人以下(含500人); 02:500-1000人(含1000人); 03:1000-1500人(含1500人); 04:1500人以上] |
|||
*/ |
|||
private String populationSize; |
|||
|
|||
/** |
|||
* 是否成立网格党支部或网格党小组[Y:是、N:否] |
|||
*/ |
|||
private String isPartyBranch; |
|||
|
|||
/** |
|||
* 网格党组织类型[01:网格党支部; 02:网格党小组] |
|||
*/ |
|||
private String partyBranchType; |
|||
|
|||
/** |
|||
* 中心点(质心)经度 |
|||
*/ |
|||
private String lng; |
|||
|
|||
/** |
|||
* 中心点(质心)纬度 |
|||
*/ |
|||
private String lat; |
|||
|
|||
/** |
|||
* 网格颜色 |
|||
*/ |
|||
private String gridColor; |
|||
|
|||
/** |
|||
* 空间范围 |
|||
*/ |
|||
private String shape; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Long delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -1,191 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格员基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Data |
|||
public class BaseGridUserDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 人员Id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格员姓名 |
|||
*/ |
|||
private String nickName; |
|||
|
|||
/** |
|||
* 专属网格类型[01:党政机关; 02:医院; 03:学校; 04:企业; 05:园区; 06:商圈; 07:市场; 08:景区; |
|||
*/ |
|||
private String cardNum; |
|||
|
|||
/** |
|||
* 网格员类型[01:专职网格员; 02:兼职网格员; 03:网格长; 04:综治机构人员; 05:职能部门人员] |
|||
*/ |
|||
private String userType; |
|||
|
|||
/** |
|||
* 手机号码 |
|||
*/ |
|||
private String phonenumber; |
|||
|
|||
/** |
|||
* 性别[1:男性; 2:女性; 9:未说明的性别] |
|||
*/ |
|||
private String sex; |
|||
|
|||
/** |
|||
* 民族[字典表主键] |
|||
*/ |
|||
private String nation; |
|||
|
|||
/** |
|||
* 政治面貌[字典表主键] |
|||
*/ |
|||
private String paerty; |
|||
|
|||
/** |
|||
* 出生日期[YYYY-MM-DD] |
|||
*/ |
|||
private Date birthday; |
|||
|
|||
/** |
|||
* 学历[字典表主键] |
|||
*/ |
|||
private String education; |
|||
|
|||
/** |
|||
* 入职时间 |
|||
*/ |
|||
private Date entryDate; |
|||
|
|||
/** |
|||
* 是否离职 |
|||
*/ |
|||
private String isLeave; |
|||
|
|||
/** |
|||
* 离职时间 |
|||
*/ |
|||
private Date leaveDate; |
|||
|
|||
/** |
|||
* 网格员年收入 |
|||
*/ |
|||
private String income; |
|||
|
|||
/** |
|||
* 是否社区(村)两委委员[Y:是、N:否] |
|||
*/ |
|||
private String isCommittee; |
|||
|
|||
/** |
|||
* 是否社区工作者[Y:是、N:否] |
|||
*/ |
|||
private String isCommunityWorkers; |
|||
|
|||
/** |
|||
* 是否社会工作者[Y:是、N:否] |
|||
*/ |
|||
private String isSocialWorker; |
|||
|
|||
/** |
|||
* 是否村(居)民小组长[Y:是、N:否 |
|||
*/ |
|||
private String isVillageLeader; |
|||
|
|||
/** |
|||
* 是否警务助理[Y:是、N:否] |
|||
*/ |
|||
private String isPoliceAssistant; |
|||
|
|||
/** |
|||
* 是否人民调解员[Y:是、N:否] |
|||
*/ |
|||
private String isMediator; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Long delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -1,41 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.opendata.entity.BaseGridInfoEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 网格基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Mapper |
|||
public interface BaseGridInfoDao extends BaseDao<BaseGridInfoEntity> { |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 网格基础信息批量更新部分字段 |
|||
**/ |
|||
void updateBatch(@Param("list") List<BaseGridInfoEntity> entityList); |
|||
} |
@ -1,41 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.opendata.entity.BaseGridUserEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 网格员基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Mapper |
|||
public interface BaseGridUserDao extends BaseDao<BaseGridUserEntity> { |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 网格员基础信息批量更新部分字段 |
|||
**/ |
|||
void updateBatch(@Param("list") List<BaseGridUserEntity> entityList); |
|||
} |
@ -1,106 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("base_grid_info") |
|||
public class BaseGridInfoEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织/网格Id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格层级[07:网格] |
|||
*/ |
|||
private String gridLevel; |
|||
|
|||
/** |
|||
* 专属网格类型[01:党政机关; 02:医院; 03:学校; 04:企业; 05:园区; 06:商圈; 07:市场; 08:景区; |
|||
*/ |
|||
private String gridType; |
|||
|
|||
/** |
|||
* 网格内人口规模[01:500人以下(含500人); 02:500-1000人(含1000人); 03:1000-1500人(含1500人); 04:1500人以上] |
|||
*/ |
|||
private String populationSize; |
|||
|
|||
/** |
|||
* 是否成立网格党支部或网格党小组[Y:是、N:否] |
|||
*/ |
|||
private String isPartyBranch; |
|||
|
|||
/** |
|||
* 网格党组织类型[01:网格党支部; 02:网格党小组] |
|||
*/ |
|||
private String partyBranchType; |
|||
|
|||
/** |
|||
* 中心点(质心)经度 |
|||
*/ |
|||
private String lng; |
|||
|
|||
/** |
|||
* 中心点(质心)纬度 |
|||
*/ |
|||
private String lat; |
|||
|
|||
/** |
|||
* 网格颜色 |
|||
*/ |
|||
private String gridColor; |
|||
|
|||
/** |
|||
* 空间范围 |
|||
*/ |
|||
private String shape; |
|||
|
|||
} |
@ -1,161 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格员基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("base_grid_user") |
|||
public class BaseGridUserEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 人员Id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格员姓名 |
|||
*/ |
|||
private String nickName; |
|||
|
|||
/** |
|||
* 专属网格类型[01:党政机关; 02:医院; 03:学校; 04:企业; 05:园区; 06:商圈; 07:市场; 08:景区; |
|||
*/ |
|||
private String cardNum; |
|||
|
|||
/** |
|||
* 网格员类型[01:专职网格员; 02:兼职网格员; 03:网格长; 04:综治机构人员; 05:职能部门人员] |
|||
*/ |
|||
private String userType; |
|||
|
|||
/** |
|||
* 手机号码 |
|||
*/ |
|||
private String phonenumber; |
|||
|
|||
/** |
|||
* 性别[1:男性; 2:女性; 9:未说明的性别] |
|||
*/ |
|||
private String sex; |
|||
|
|||
/** |
|||
* 民族[字典表主键] |
|||
*/ |
|||
private String nation; |
|||
|
|||
/** |
|||
* 政治面貌[字典表主键] |
|||
*/ |
|||
private String paerty; |
|||
|
|||
/** |
|||
* 出生日期[YYYY-MM-DD] |
|||
*/ |
|||
private Date birthday; |
|||
|
|||
/** |
|||
* 学历[字典表主键] |
|||
*/ |
|||
private String education; |
|||
|
|||
/** |
|||
* 入职时间 |
|||
*/ |
|||
private Date entryDate; |
|||
|
|||
/** |
|||
* 是否离职 |
|||
*/ |
|||
private String isLeave; |
|||
|
|||
/** |
|||
* 离职时间 |
|||
*/ |
|||
private Date leaveDate; |
|||
|
|||
/** |
|||
* 网格员年收入 |
|||
*/ |
|||
private String income; |
|||
|
|||
/** |
|||
* 是否社区(村)两委委员[Y:是、N:否] |
|||
*/ |
|||
private String isCommittee; |
|||
|
|||
/** |
|||
* 是否社区工作者[Y:是、N:否] |
|||
*/ |
|||
private String isCommunityWorkers; |
|||
|
|||
/** |
|||
* 是否社会工作者[Y:是、N:否] |
|||
*/ |
|||
private String isSocialWorker; |
|||
|
|||
/** |
|||
* 是否村(居)民小组长[Y:是、N:否 |
|||
*/ |
|||
private String isVillageLeader; |
|||
|
|||
/** |
|||
* 是否警务助理[Y:是、N:否] |
|||
*/ |
|||
private String isPoliceAssistant; |
|||
|
|||
/** |
|||
* 是否人民调解员[Y:是、N:否] |
|||
*/ |
|||
private String isMediator; |
|||
|
|||
} |
@ -1,44 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.opendata.dto.form.GridBaseInfoFormDTO; |
|||
import com.epmet.opendata.entity.BaseGridInfoEntity; |
|||
|
|||
/** |
|||
* 网格基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
public interface BaseGridInfoService extends BaseService<BaseGridInfoEntity> { |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 组织基础信息中介库同步 |
|||
**/ |
|||
void getAgencyBaseInfo(GridBaseInfoFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 网格基础信息中介库同步 |
|||
**/ |
|||
void getGridBaseInfo(GridBaseInfoFormDTO formDTO); |
|||
|
|||
} |
@ -1,38 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; |
|||
import com.epmet.opendata.entity.BaseGridUserEntity; |
|||
|
|||
/** |
|||
* 网格员基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
public interface BaseGridUserService extends BaseService<BaseGridUserEntity> { |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 网格员信息中间库同步 |
|||
**/ |
|||
void getStaffBaseInfo(StaffBaseInfoFormDTO formDTO); |
|||
|
|||
} |
@ -1,155 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.service.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.org.result.CustomerAgencyDTO; |
|||
import com.epmet.dto.org.result.CustomerGridDTO; |
|||
import com.epmet.feign.DataStatisticalOpenFeignClient; |
|||
import com.epmet.opendata.dao.BaseGridInfoDao; |
|||
import com.epmet.opendata.dao.ExDeptDao; |
|||
import com.epmet.opendata.dto.form.GridBaseInfoFormDTO; |
|||
import com.epmet.opendata.entity.BaseGridInfoEntity; |
|||
import com.epmet.opendata.entity.ExDeptEntity; |
|||
import com.epmet.opendata.service.BaseGridInfoService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 网格基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Service |
|||
public class BaseGridInfoServiceImpl extends BaseServiceImpl<BaseGridInfoDao, BaseGridInfoEntity> implements BaseGridInfoService { |
|||
@Autowired |
|||
private DataStatisticalOpenFeignClient dataStatisticalOpenFeignClient; |
|||
@Autowired |
|||
private ExDeptDao exDeptDao; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 组织基础信息中介库同步 |
|||
**/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void getAgencyBaseInfo(GridBaseInfoFormDTO formDTO) { |
|||
//1.查询组织基础信息
|
|||
com.epmet.dto.org.form.GridBaseInfoFormDTO formDTO1 = ConvertUtils.sourceToTarget(formDTO, com.epmet.dto.org.form.GridBaseInfoFormDTO.class); |
|||
Result<List<CustomerAgencyDTO>> result = dataStatisticalOpenFeignClient.getAgencyBaseInfo(formDTO1); |
|||
if (!result.success()) { |
|||
throw new RenException(result.getInternalMsg()); |
|||
} |
|||
if (null == result.getData() || result.getData().size() < NumConstant.ONE) { |
|||
return; |
|||
} |
|||
//2.中间库新增/修改数据
|
|||
/*List<BaseGridInfoEntity> entityList = new ArrayList<>(); |
|||
result.getData().forEach(ag->{ |
|||
BaseGridInfoEntity entity = new BaseGridInfoEntity(); |
|||
entity.setCustomerId(ag.getCustomerId()); |
|||
entity.setOrgId(ag.getId()); |
|||
entity.setCode(""); |
|||
entity.setGridName(ag.getOrganizationName()); |
|||
String level = "06"; |
|||
if("province".equals(ag.getLevel())){ level = "01"; } |
|||
else if("city".equals(ag.getLevel())){ level = "02"; } |
|||
else if("district".equals(ag.getLevel())){ level = "03"; } |
|||
else if("street".equals(ag.getLevel())){ level = "04"; } |
|||
entity.setGridLevel(level); |
|||
entity.setGridType("01"); |
|||
entity.setDelFlag(ag.getDelFlag().toString()); |
|||
entity.setUpdatedBy(ag.getUpdatedBy()); |
|||
entity.setUpdatedTime(ag.getUpdatedTime()); |
|||
entityList.add(entity); |
|||
});*/ |
|||
List<ExDeptEntity> ExList = new ArrayList<>(); |
|||
result.getData().forEach(ag->{ |
|||
ExDeptEntity entity = new ExDeptEntity(); |
|||
entity.setQxDeptId(ag.getId()); |
|||
entity.setQxDeptName(ag.getOrganizationName()); |
|||
entity.setGridCode(ag.getCode()); |
|||
ExList.add(entity); |
|||
}); |
|||
if(null!=formDTO.getType()&& "all".equals(formDTO.getType())){ |
|||
exDeptDao.updateBatch(ExList); |
|||
}else { |
|||
exDeptDao.insertBatch(ExList); |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 网格基础信息中介库同步 |
|||
**/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void getGridBaseInfo(GridBaseInfoFormDTO formDTO) { |
|||
//1.查询网格基础信息
|
|||
com.epmet.dto.org.form.GridBaseInfoFormDTO formDTO1 = ConvertUtils.sourceToTarget(formDTO, com.epmet.dto.org.form.GridBaseInfoFormDTO.class); |
|||
Result<List<CustomerGridDTO>> result = dataStatisticalOpenFeignClient.getGridBaseInfo(formDTO1); |
|||
if (!result.success()) { |
|||
throw new RenException(result.getInternalMsg()); |
|||
} |
|||
if (null == result.getData() || result.getData().size() < NumConstant.ONE) { |
|||
return; |
|||
} |
|||
//2.中间库新增/修改数据
|
|||
/*List<BaseGridInfoEntity> entityList = new ArrayList<>(); |
|||
result.getData().forEach(ag->{ |
|||
BaseGridInfoEntity entity = new BaseGridInfoEntity(); |
|||
entity.setCustomerId(ag.getCustomerId()); |
|||
entity.setOrgId(ag.getId()); |
|||
entity.setCode(""); |
|||
entity.setGridName(ag.getGridName()); |
|||
entity.setGridLevel("07"); |
|||
entity.setGridType("01"); |
|||
entity.setDelFlag(ag.getDelFlag().toString()); |
|||
entity.setUpdatedBy(ag.getUpdatedBy()); |
|||
entity.setUpdatedTime(ag.getUpdatedTime()); |
|||
entityList.add(entity); |
|||
});*/ |
|||
List<ExDeptEntity> ExList = new ArrayList<>(); |
|||
result.getData().forEach(ag -> { |
|||
ExDeptEntity entity = new ExDeptEntity(); |
|||
entity.setQxDeptId(ag.getId()); |
|||
entity.setQxDeptName(ag.getGridName()); |
|||
entity.setGridCode(ag.getCode()); |
|||
ExList.add(entity); |
|||
}); |
|||
if (null != formDTO.getType() && "all".equals(formDTO.getType())) { |
|||
exDeptDao.updateBatch(ExList); |
|||
//exDeptDao.updateBatchGrid(ExList);
|
|||
} else { |
|||
exDeptDao.insertBatch(ExList); |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
@ -1,74 +0,0 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.opendata.service.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.org.result.CustomerAgencyDTO; |
|||
import com.epmet.dto.user.result.CustomerStaffDTO; |
|||
import com.epmet.dto.user.result.GridUserInfoDTO; |
|||
import com.epmet.feign.DataStatisticalOpenFeignClient; |
|||
import com.epmet.opendata.dao.BaseGridUserDao; |
|||
import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; |
|||
import com.epmet.opendata.entity.BaseGridInfoEntity; |
|||
import com.epmet.opendata.entity.BaseGridUserEntity; |
|||
import com.epmet.opendata.service.BaseGridUserService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 网格员基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Service |
|||
public class BaseGridUserServiceImpl extends BaseServiceImpl<BaseGridUserDao, BaseGridUserEntity> implements BaseGridUserService { |
|||
@Autowired |
|||
private DataStatisticalOpenFeignClient dataStatisticalOpenFeignClient; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 网格员信息中间库同步 |
|||
**/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) { |
|||
//1.查询网格基础信息
|
|||
com.epmet.dto.user.form.StaffBaseInfoFormDTO formDTO1 = ConvertUtils.sourceToTarget(formDTO, com.epmet.dto.user.form.StaffBaseInfoFormDTO.class); |
|||
Result<List<GridUserInfoDTO>> result = dataStatisticalOpenFeignClient.getStaffBaseInfo(formDTO1); |
|||
if (!result.success()) { |
|||
throw new RenException(result.getInternalMsg()); |
|||
} |
|||
//2.中间库新增/修改数据
|
|||
List<BaseGridUserEntity> entityList = ConvertUtils.sourceToTarget(result.getData(), BaseGridUserEntity.class); |
|||
if("add".equals(formDTO.getType())){ |
|||
insertBatch(entityList); |
|||
}else { |
|||
baseDao.updateBatch(entityList); |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
@ -1,50 +0,0 @@ |
|||
<?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="com.epmet.opendata.dao.BaseGridInfoDao"> |
|||
|
|||
<update id="updateBatch" > |
|||
UPDATE base_grid_info |
|||
<trim prefix="set" suffixOverrides=","> |
|||
|
|||
<trim prefix="grid_name =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.gridName'> |
|||
when org_id = #{item.orgId} then #{item.gridName} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="del_flag =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.delFlag'> |
|||
when org_id = #{item.orgId} then #{item.delFlag} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="updated_by =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.updatedBy'> |
|||
when org_id = #{item.orgId} then #{item.updatedBy} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="updated_time =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.updatedTime'> |
|||
when org_id = #{item.orgId} then #{item.updatedTime} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
</trim> |
|||
WHERE |
|||
1=1 |
|||
<foreach collection="list" item="item" open="AND( " separator=" OR " index="index" close=")"> |
|||
org_id = #{item.orgId} |
|||
</foreach> |
|||
</update> |
|||
|
|||
</mapper> |
@ -1,58 +0,0 @@ |
|||
<?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="com.epmet.opendata.dao.BaseGridUserDao"> |
|||
|
|||
<update id="updateBatch"> |
|||
UPDATE base_grid_user |
|||
<trim prefix="set" suffixOverrides=","> |
|||
|
|||
<trim prefix="grid_name =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.gridName'> |
|||
when (grid_id = #{item.gridId} AND staff_id = #{item.staffId} ) then #{item.gridName} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="nick_name =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.nickName'> |
|||
when (grid_id = #{item.gridId} AND staff_id = #{item.staffId} ) then #{item.nickName} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="del_flag =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.delFlag'> |
|||
when (grid_id = #{item.gridId} AND staff_id = #{item.staffId} ) then #{item.delFlag} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="updated_by =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.updatedBy'> |
|||
when (grid_id = #{item.gridId} AND staff_id = #{item.staffId} ) then #{item.updatedBy} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="updated_time =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.updatedTime'> |
|||
when (grid_id = #{item.gridId} AND staff_id = #{item.staffId} ) then #{item.updatedTime} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
</trim> |
|||
WHERE |
|||
1=1 |
|||
<foreach collection="list" item="item" open="AND( " separator=" OR " index="index" close=")"> |
|||
(grid_id = #{item.gridId} AND staff_id = #{item.staffId} ) |
|||
</foreach> |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,41 @@ |
|||
<?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="com.epmet.opendata.dao.ExUserDao"> |
|||
|
|||
<update id="updateBatch"> |
|||
UPDATE ex_user |
|||
<trim prefix="set" suffixOverrides=","> |
|||
|
|||
<trim prefix="qx_user_name =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.qxUserName'> |
|||
when (qx_user_id = #{item.qxUserId} ) then #{item.qxUserName} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="qx_mobile =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.qxMobile'> |
|||
when (qx_user_id = #{item.qxUserId} ) then #{item.qxMobile} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
<trim prefix="qx_customer_id =(case" suffix="end),"> |
|||
<foreach collection="list" item="item"> |
|||
<if test='null != item.qxCustomerId'> |
|||
when (qx_user_id = #{item.qxUserId} ) then #{item.qxCustomerId} |
|||
</if> |
|||
</foreach> |
|||
</trim> |
|||
|
|||
</trim> |
|||
WHERE 1=1 |
|||
<foreach collection="list" item="item" open="AND( " separator=" OR " index="index" close=")"> |
|||
(qx_user_id = #{item.qxUserId} ) |
|||
</foreach> |
|||
</update> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue