16 changed files with 1234 additions and 0 deletions
@ -0,0 +1,115 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyOrgDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 唯一标识 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id (customer.id) |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 党组织的上级ID,没有上级时为0 |
||||
|
*/ |
||||
|
private String orgPid; |
||||
|
|
||||
|
/** |
||||
|
* 党组织的所有上级ID,没有上级时为0 |
||||
|
*/ |
||||
|
private String orgPids; |
||||
|
|
||||
|
/** |
||||
|
* 行政组织 机关ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 行政组织 机关ID |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
||||
|
*/ |
||||
|
private String partyOrgType; |
||||
|
|
||||
|
/** |
||||
|
* 组织名称 |
||||
|
*/ |
||||
|
private String partyOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 组织编码 |
||||
|
*/ |
||||
|
private String partyOrgCode; |
||||
|
|
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 党组织介绍 |
||||
|
*/ |
||||
|
private String introduction; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,175 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partymember; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 数字平台党员信息表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyMemberDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 唯一标识 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id customer.id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 党组织的所有上级ID,没有上级时为0 |
||||
|
*/ |
||||
|
private String orgPids; |
||||
|
|
||||
|
/** |
||||
|
* 行政组织 机关ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 行政组织 机关ID |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 对应的ic_resi_user主表Id |
||||
|
*/ |
||||
|
private String icResiUser; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 身份证号 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 入党时间 |
||||
|
*/ |
||||
|
private String rdsj; |
||||
|
|
||||
|
/** |
||||
|
* 所属支部 |
||||
|
*/ |
||||
|
private String sszb; |
||||
|
|
||||
|
/** |
||||
|
* 是否流动党员 |
||||
|
*/ |
||||
|
private String isLd; |
||||
|
|
||||
|
/** |
||||
|
* 流动党员活动证号 |
||||
|
*/ |
||||
|
private String ldzh; |
||||
|
|
||||
|
/** |
||||
|
* 职务 |
||||
|
*/ |
||||
|
private String partyZw; |
||||
|
|
||||
|
/** |
||||
|
* 是否退休 |
||||
|
*/ |
||||
|
private String isTx; |
||||
|
|
||||
|
/** |
||||
|
* 是否党员中心户 |
||||
|
*/ |
||||
|
private String isDyzxh; |
||||
|
|
||||
|
/** |
||||
|
* 是否免学习0否,1是 |
||||
|
*/ |
||||
|
private String isMxx; |
||||
|
|
||||
|
/** |
||||
|
* 文化程度【字典表】 |
||||
|
*/ |
||||
|
private String culture; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段1 |
||||
|
*/ |
||||
|
private String field1; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段2 |
||||
|
*/ |
||||
|
private String field2; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段3 |
||||
|
*/ |
||||
|
private String field3; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段4 |
||||
|
*/ |
||||
|
private String field4; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段5 |
||||
|
*/ |
||||
|
private String field5; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.modules.partyOrg.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.modules.partyOrg.excel.IcPartyOrgExcel; |
||||
|
import com.epmet.modules.partyOrg.service.IcPartyOrgService; |
||||
|
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icPartyOrg") |
||||
|
public class IcPartyOrgController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcPartyOrgService icPartyOrgService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcPartyOrgDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcPartyOrgDTO> page = icPartyOrgService.page(params); |
||||
|
return new Result<PageData<IcPartyOrgDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcPartyOrgDTO> get(@PathVariable("id") String id){ |
||||
|
IcPartyOrgDTO data = icPartyOrgService.get(id); |
||||
|
return new Result<IcPartyOrgDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcPartyOrgDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icPartyOrgService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcPartyOrgDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icPartyOrgService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icPartyOrgService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<IcPartyOrgDTO> list = icPartyOrgService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, IcPartyOrgExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.modules.partyOrg.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
package com.epmet.modules.partyOrg.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_party_org") |
||||
|
public class IcPartyOrgEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id (customer.id) |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 党组织的上级ID,没有上级时为0 |
||||
|
*/ |
||||
|
private String orgPid; |
||||
|
|
||||
|
/** |
||||
|
* 党组织的所有上级ID,没有上级时为0 |
||||
|
*/ |
||||
|
private String orgPids; |
||||
|
|
||||
|
/** |
||||
|
* 行政组织 机关ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 行政组织 机关ID |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
||||
|
*/ |
||||
|
private String partyOrgType; |
||||
|
|
||||
|
/** |
||||
|
* 组织名称 |
||||
|
*/ |
||||
|
private String partyOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 组织编码 |
||||
|
*/ |
||||
|
private String partyOrgCode; |
||||
|
|
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 党组织介绍 |
||||
|
*/ |
||||
|
private String introduction; |
||||
|
|
||||
|
} |
@ -0,0 +1,75 @@ |
|||||
|
package com.epmet.modules.partyOrg.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyOrgExcel { |
||||
|
|
||||
|
@Excel(name = "唯一标识") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户Id (customer.id)") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "党组织的上级ID,没有上级时为0") |
||||
|
private String orgPid; |
||||
|
|
||||
|
@Excel(name = "党组织的所有上级ID,没有上级时为0") |
||||
|
private String orgPids; |
||||
|
|
||||
|
@Excel(name = "行政组织 机关ID") |
||||
|
private String agencyId; |
||||
|
|
||||
|
@Excel(name = "行政组织 机关ID") |
||||
|
private String agencyPids; |
||||
|
|
||||
|
@Excel(name = "党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部") |
||||
|
private String partyOrgType; |
||||
|
|
||||
|
@Excel(name = "组织名称") |
||||
|
private String partyOrgName; |
||||
|
|
||||
|
@Excel(name = "组织编码") |
||||
|
private String partyOrgCode; |
||||
|
|
||||
|
@Excel(name = "经度") |
||||
|
private String longitude; |
||||
|
|
||||
|
@Excel(name = "纬度") |
||||
|
private String latitude; |
||||
|
|
||||
|
@Excel(name = "地址") |
||||
|
private String address; |
||||
|
|
||||
|
@Excel(name = "党组织介绍") |
||||
|
private String introduction; |
||||
|
|
||||
|
@Excel(name = "删除标识:0.未删除 1.已删除") |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.modules.partyOrg.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class IcPartyOrgRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.modules.partyOrg.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
||||
|
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
public interface IcPartyOrgService extends BaseService<IcPartyOrgEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcPartyOrgDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
PageData<IcPartyOrgDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcPartyOrgDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
List<IcPartyOrgDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcPartyOrgDTO |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
IcPartyOrgDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
void save(IcPartyOrgDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
void update(IcPartyOrgDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,84 @@ |
|||||
|
package com.epmet.modules.partyOrg.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.modules.partyOrg.dao.IcPartyOrgDao; |
||||
|
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity; |
||||
|
import com.epmet.modules.partyOrg.service.IcPartyOrgService; |
||||
|
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPartyOrgEntity> implements IcPartyOrgService { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcPartyOrgDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcPartyOrgEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcPartyOrgDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcPartyOrgDTO> list(Map<String, Object> params) { |
||||
|
List<IcPartyOrgEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcPartyOrgDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcPartyOrgEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcPartyOrgEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcPartyOrgDTO get(String id) { |
||||
|
IcPartyOrgEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcPartyOrgDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcPartyOrgDTO dto) { |
||||
|
IcPartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyOrgEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcPartyOrgDTO dto) { |
||||
|
IcPartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyOrgEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.modules.partymember.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 数字平台党员信息表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcPartyMemberDao extends BaseDao<IcPartyMemberEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,141 @@ |
|||||
|
package com.epmet.modules.partymember.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 数字平台党员信息表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_party_member") |
||||
|
public class IcPartyMemberEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id customer.id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 党组织的所有上级ID,没有上级时为0 |
||||
|
*/ |
||||
|
private String orgPids; |
||||
|
|
||||
|
/** |
||||
|
* 行政组织 机关ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 行政组织 机关ID |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 对应的ic_resi_user主表Id |
||||
|
*/ |
||||
|
private String icResiUser; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 身份证号 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 入党时间 |
||||
|
*/ |
||||
|
private String rdsj; |
||||
|
|
||||
|
/** |
||||
|
* 所属支部 |
||||
|
*/ |
||||
|
private String sszb; |
||||
|
|
||||
|
/** |
||||
|
* 是否流动党员 |
||||
|
*/ |
||||
|
private String isLd; |
||||
|
|
||||
|
/** |
||||
|
* 流动党员活动证号 |
||||
|
*/ |
||||
|
private String ldzh; |
||||
|
|
||||
|
/** |
||||
|
* 职务 |
||||
|
*/ |
||||
|
private String partyZw; |
||||
|
|
||||
|
/** |
||||
|
* 是否退休 |
||||
|
*/ |
||||
|
private String isTx; |
||||
|
|
||||
|
/** |
||||
|
* 是否党员中心户 |
||||
|
*/ |
||||
|
private String isDyzxh; |
||||
|
|
||||
|
/** |
||||
|
* 是否免学习0否,1是 |
||||
|
*/ |
||||
|
private String isMxx; |
||||
|
|
||||
|
/** |
||||
|
* 文化程度【字典表】 |
||||
|
*/ |
||||
|
private String culture; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段1 |
||||
|
*/ |
||||
|
private String field1; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段2 |
||||
|
*/ |
||||
|
private String field2; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段3 |
||||
|
*/ |
||||
|
private String field3; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段4 |
||||
|
*/ |
||||
|
private String field4; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段5 |
||||
|
*/ |
||||
|
private String field5; |
||||
|
|
||||
|
} |
@ -0,0 +1,111 @@ |
|||||
|
package com.epmet.modules.partymember.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 数字平台党员信息表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyMemberExcel { |
||||
|
|
||||
|
@Excel(name = "唯一标识") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户Id customer.id") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "党组织的所有上级ID,没有上级时为0") |
||||
|
private String orgPids; |
||||
|
|
||||
|
@Excel(name = "行政组织 机关ID") |
||||
|
private String agencyId; |
||||
|
|
||||
|
@Excel(name = "行政组织 机关ID") |
||||
|
private String agencyPids; |
||||
|
|
||||
|
@Excel(name = "对应的ic_resi_user主表Id") |
||||
|
private String icResiUser; |
||||
|
|
||||
|
@Excel(name = "姓名") |
||||
|
private String name; |
||||
|
|
||||
|
@Excel(name = "手机号") |
||||
|
private String mobile; |
||||
|
|
||||
|
@Excel(name = "身份证号") |
||||
|
private String idCard; |
||||
|
|
||||
|
@Excel(name = "地址") |
||||
|
private String address; |
||||
|
|
||||
|
@Excel(name = "入党时间") |
||||
|
private String rdsj; |
||||
|
|
||||
|
@Excel(name = "所属支部") |
||||
|
private String sszb; |
||||
|
|
||||
|
@Excel(name = "是否流动党员") |
||||
|
private String isLd; |
||||
|
|
||||
|
@Excel(name = "流动党员活动证号") |
||||
|
private String ldzh; |
||||
|
|
||||
|
@Excel(name = "职务") |
||||
|
private String partyZw; |
||||
|
|
||||
|
@Excel(name = "是否退休") |
||||
|
private String isTx; |
||||
|
|
||||
|
@Excel(name = "是否党员中心户") |
||||
|
private String isDyzxh; |
||||
|
|
||||
|
@Excel(name = "是否免学习0否,1是") |
||||
|
private String isMxx; |
||||
|
|
||||
|
@Excel(name = "文化程度【字典表】") |
||||
|
private String culture; |
||||
|
|
||||
|
@Excel(name = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
@Excel(name = "预留字段1") |
||||
|
private String field1; |
||||
|
|
||||
|
@Excel(name = "预留字段2") |
||||
|
private String field2; |
||||
|
|
||||
|
@Excel(name = "预留字段3") |
||||
|
private String field3; |
||||
|
|
||||
|
@Excel(name = "预留字段4") |
||||
|
private String field4; |
||||
|
|
||||
|
@Excel(name = "预留字段5") |
||||
|
private String field5; |
||||
|
|
||||
|
@Excel(name = "删除标识 0.未删除 1.已删除") |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.modules.partymember.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcPartyMemberDTO; |
||||
|
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 数字平台党员信息表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
public interface IcPartyMemberService extends BaseService<IcPartyMemberEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcPartyMemberDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
PageData<IcPartyMemberDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcPartyMemberDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
List<IcPartyMemberDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcPartyMemberDTO |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
IcPartyMemberDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
void save(IcPartyMemberDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
void update(IcPartyMemberDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-17 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.modules.partymember.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dto.IcPartyMemberDTO; |
||||
|
import com.epmet.modules.partymember.dao.IcPartyMemberDao; |
||||
|
import com.epmet.modules.partymember.entity.IcPartyMemberEntity; |
||||
|
import com.epmet.modules.partymember.service.IcPartyMemberService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 数字平台党员信息表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao, IcPartyMemberEntity> implements IcPartyMemberService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcPartyMemberDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcPartyMemberEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcPartyMemberDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcPartyMemberDTO> list(Map<String, Object> params) { |
||||
|
List<IcPartyMemberEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcPartyMemberDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcPartyMemberEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcPartyMemberEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcPartyMemberDTO get(String id) { |
||||
|
IcPartyMemberEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcPartyMemberDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcPartyMemberDTO dto) { |
||||
|
IcPartyMemberEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcPartyMemberDTO dto) { |
||||
|
IcPartyMemberEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
<?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.modules.partyOrg.dao.IcPartyOrgDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.modules.partyOrg.entity.IcPartyOrgEntity" id="icPartyOrgMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgPid" column="ORG_PID"/> |
||||
|
<result property="orgPids" column="ORG_PIDS"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="agencyPids" column="AGENCY_PIDS"/> |
||||
|
<result property="partyOrgType" column="PARTY_ORG_TYPE"/> |
||||
|
<result property="partyOrgName" column="PARTY_ORG_NAME"/> |
||||
|
<result property="partyOrgCode" column="PARTY_ORG_CODE"/> |
||||
|
<result property="longitude" column="LONGITUDE"/> |
||||
|
<result property="latitude" column="LATITUDE"/> |
||||
|
<result property="address" column="ADDRESS"/> |
||||
|
<result property="introduction" column="INTRODUCTION"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</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.modules.partymember.dao.IcPartyMemberDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.modules.partymember.entity.IcPartyMemberEntity" id="icPartyMemberMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgPids" column="ORG_PIDS"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="agencyPids" column="AGENCY_PIDS"/> |
||||
|
<result property="icResiUser" column="IC_RESI_USER"/> |
||||
|
<result property="name" column="NAME"/> |
||||
|
<result property="mobile" column="MOBILE"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="address" column="ADDRESS"/> |
||||
|
<result property="rdsj" column="RDSJ"/> |
||||
|
<result property="sszb" column="SSZB"/> |
||||
|
<result property="isLd" column="IS_LD"/> |
||||
|
<result property="ldzh" column="LDZH"/> |
||||
|
<result property="partyZw" column="PARTY_ZW"/> |
||||
|
<result property="isTx" column="IS_TX"/> |
||||
|
<result property="isDyzxh" column="IS_DYZXH"/> |
||||
|
<result property="isMxx" column="IS_MXX"/> |
||||
|
<result property="culture" column="CULTURE"/> |
||||
|
<result property="remark" column="REMARK"/> |
||||
|
<result property="field1" column="FIELD1"/> |
||||
|
<result property="field2" column="FIELD2"/> |
||||
|
<result property="field3" column="FIELD3"/> |
||||
|
<result property="field4" column="FIELD4"/> |
||||
|
<result property="field5" column="FIELD5"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue