Browse Source

党建地点

master
lichao 1 year ago
parent
commit
37dd83fb3d
  1. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyOrgTypeEnum.java
  2. 80
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcPartyPlaceDTO.java
  3. 78
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyPlaceController.java
  4. 16
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyPlaceDao.java
  5. 49
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyPlaceEntity.java
  6. 71
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartyPlaceExcel.java
  7. 47
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/redis/IcPartyPlaceRedis.java
  8. 78
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyPlaceService.java
  9. 85
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyPlaceServiceImpl.java
  10. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/YiFengScreenServiceImpl.java
  11. 22
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyPlace/IcPartyPlaceDao.xml

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyOrgTypeEnum.java

@ -7,9 +7,9 @@ public enum PartyOrgTypeEnum {
PROVINCIAL("0", "省委"), PROVINCIAL("0", "省委"),
MUNICIPAL("1", "市委"), MUNICIPAL("1", "市委"),
DISTRICT("2", "区委"), DISTRICT("2", "区委"),
WORKING("3", "党委"), WORKING("3", "党委"),
PARTY("4", "党委"), PARTY("4", "新村党委"),
BRANCH("5", "支部"), BRANCH("5", "自然村党支部"),
GROUP("6", "党小组"); GROUP("6", "党小组");

80
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcPartyPlaceDTO.java

@ -0,0 +1,80 @@
package com.epmet.resi.partymember.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 移风党建
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
@Data
public class IcPartyPlaceDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 封面
*/
private String cover;
/**
* 名称
*/
private String name;
/**
* 描述
*/
private String description;
/**
* 地址
*/
private String address;
/**
* 0未删除1已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

78
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyPlaceController.java

@ -0,0 +1,78 @@
package com.epmet.modules.partymember.controller;
import com.elink.esua.epdc.excel.IcPartyPlaceExcel;
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.partymember.service.IcPartyPlaceService;
import com.epmet.resi.partymember.dto.IcPartyPlaceDTO;
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 qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
@RestController
@RequestMapping("icpartyplace")
public class IcPartyPlaceController {
@Autowired
private IcPartyPlaceService icPartyPlaceService;
@GetMapping("page")
public Result<PageData<IcPartyPlaceDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcPartyPlaceDTO> page = icPartyPlaceService.page(params);
return new Result<PageData<IcPartyPlaceDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<IcPartyPlaceDTO> get(@PathVariable("id") String id){
IcPartyPlaceDTO data = icPartyPlaceService.get(id);
return new Result<IcPartyPlaceDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody IcPartyPlaceDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icPartyPlaceService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody IcPartyPlaceDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icPartyPlaceService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icPartyPlaceService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<IcPartyPlaceDTO> list = icPartyPlaceService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, IcPartyPlaceExcel.class);
}
}

16
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/IcPartyPlaceDao.java

@ -0,0 +1,16 @@
package com.epmet.modules.partymember.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.partymember.entity.IcPartyPlaceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 移风党建
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
@Mapper
public interface IcPartyPlaceDao extends BaseDao<IcPartyPlaceEntity> {
}

49
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyPlaceEntity.java

@ -0,0 +1,49 @@
package com.epmet.modules.partymember.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 移风党建
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_party_place")
public class IcPartyPlaceEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
@TableField(fill = FieldFill.INSERT)
private String customerId;
/**
* 封面
*/
private String cover;
/**
* 名称
*/
private String name;
/**
* 描述
*/
private String description;
/**
* 地址
*/
private String address;
}

71
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartyPlaceExcel.java

@ -0,0 +1,71 @@
/**
* 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.elink.esua.epdc.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 移风党建
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
@Data
public class IcPartyPlaceExcel {
@Excel(name = "ID")
private String id;
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "封面")
private String cover;
@Excel(name = "名称")
private String name;
@Excel(name = "描述")
private String description;
@Excel(name = "地址")
private String address;
@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;
}

47
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/redis/IcPartyPlaceRedis.java

@ -0,0 +1,47 @@
/**
* 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.elink.esua.epdc.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 移风党建
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
@Component
public class IcPartyPlaceRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

78
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyPlaceService.java

@ -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.modules.partymember.entity.IcPartyPlaceEntity;
import com.epmet.resi.partymember.dto.IcPartyPlaceDTO;
import java.util.List;
import java.util.Map;
/**
* 移风党建
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
public interface IcPartyPlaceService extends BaseService<IcPartyPlaceEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcPartyPlaceDTO>
* @author generator
* @date 2024-03-05
*/
PageData<IcPartyPlaceDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcPartyPlaceDTO>
* @author generator
* @date 2024-03-05
*/
List<IcPartyPlaceDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcPartyPlaceDTO
* @author generator
* @date 2024-03-05
*/
IcPartyPlaceDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2024-03-05
*/
void save(IcPartyPlaceDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2024-03-05
*/
void update(IcPartyPlaceDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2024-03-05
*/
void delete(String[] ids);
}

85
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyPlaceServiceImpl.java

@ -0,0 +1,85 @@
package com.epmet.modules.partymember.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.redis.IcPartyPlaceRedis;
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.partymember.dao.IcPartyPlaceDao;
import com.epmet.modules.partymember.entity.IcPartyPlaceEntity;
import com.epmet.modules.partymember.service.IcPartyPlaceService;
import com.epmet.resi.partymember.dto.IcPartyPlaceDTO;
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 qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
@Service
public class IcPartyPlaceServiceImpl extends BaseServiceImpl<IcPartyPlaceDao, IcPartyPlaceEntity> implements IcPartyPlaceService {
@Override
public PageData<IcPartyPlaceDTO> page(Map<String, Object> params) {
IPage<IcPartyPlaceEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcPartyPlaceDTO.class);
}
@Override
public List<IcPartyPlaceDTO> list(Map<String, Object> params) {
List<IcPartyPlaceEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcPartyPlaceDTO.class);
}
private QueryWrapper<IcPartyPlaceEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcPartyPlaceEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcPartyPlaceDTO get(String id) {
IcPartyPlaceEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcPartyPlaceDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcPartyPlaceDTO dto) {
IcPartyPlaceEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyPlaceEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcPartyPlaceDTO dto) {
IcPartyPlaceEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyPlaceEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

2
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/YiFengScreenServiceImpl.java

@ -101,6 +101,7 @@ public class YiFengScreenServiceImpl implements YiFengScreenService, ResultDataR
dangyuanDto.setName("党员"); dangyuanDto.setName("党员");
dangyuanDto.setPartyOrgType("7"); dangyuanDto.setPartyOrgType("7");
dangyuanDto.setValue(icPartyMemberDao.selectCount(dangyuanQw)); dangyuanDto.setValue(icPartyMemberDao.selectCount(dangyuanQw));
l.add(dangyuanDto);
// 党员 // 党员
LambdaQueryWrapper<IcPartyMemberEntity> zhongxinhuLqW = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IcPartyMemberEntity> zhongxinhuLqW = new LambdaQueryWrapper<>();
@ -112,6 +113,7 @@ public class YiFengScreenServiceImpl implements YiFengScreenService, ResultDataR
zhongxinhuDto.setName("党员中心户"); zhongxinhuDto.setName("党员中心户");
zhongxinhuDto.setPartyOrgType("7"); zhongxinhuDto.setPartyOrgType("7");
zhongxinhuDto.setValue(icPartyMemberDao.selectCount(zhongxinhuLqW)); zhongxinhuDto.setValue(icPartyMemberDao.selectCount(zhongxinhuLqW));
l.add(zhongxinhuDto);
return l; return l;
} }

22
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyPlace/IcPartyPlaceDao.xml

@ -0,0 +1,22 @@
<?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.IcPartyPlaceDao">
<resultMap type="com.epmet.modules.partymember.entity.IcPartyPlaceEntity" id="icPartyPlaceMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="cover" column="COVER"/>
<result property="name" column="NAME"/>
<result property="description" column="DESCRIPTION"/>
<result property="address" column="ADDRESS"/>
<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…
Cancel
Save