16 changed files with 514 additions and 11 deletions
@ -0,0 +1,81 @@ |
|||||
|
package com.epmet.modules.partymember.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.resi.partymember.dto.partymember.IcPartyMemberDTO; |
||||
|
import com.epmet.modules.partymember.excel.IcPartyMemberExcel; |
||||
|
import com.epmet.modules.partymember.service.IcPartyMemberService; |
||||
|
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("icPartyMember") |
||||
|
public class IcPartyMemberController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcPartyMemberService icPartyMemberService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcPartyMemberDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcPartyMemberDTO> page = icPartyMemberService.page(params); |
||||
|
return new Result<PageData<IcPartyMemberDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcPartyMemberDTO> get(@PathVariable("id") String id){ |
||||
|
IcPartyMemberDTO data = icPartyMemberService.get(id); |
||||
|
return new Result<IcPartyMemberDTO>().ok(data); |
||||
|
} |
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result<String> save(@RequestBody IcPartyMemberDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
String id = icPartyMemberService.save(dto); |
||||
|
return new Result<String>().ok(id); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcPartyMemberDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icPartyMemberService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icPartyMemberService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<IcPartyMemberDTO> list = icPartyMemberService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, IcPartyMemberExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/5/17 18:13 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyMemberSyncDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 663543282690909994L; |
||||
|
|
||||
|
/** |
||||
|
* 客户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 volunteerCategory; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.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,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcVolunteerEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 志愿者 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcVolunteerDao extends BaseDao<IcVolunteerEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
<?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.dao.IcPartyMemberDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcPartyMemberEntity" id="icPartyMemberMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="icResiUser" column="IC_RESI_USER"/> |
||||
|
<result property="rdsj" column="RDSJ"/> |
||||
|
<result property="zzsj" column="ZZSJ"/> |
||||
|
<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="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"/> |
||||
|
<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"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,26 @@ |
|||||
|
<?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.dao.IcVolunteerDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcVolunteerEntity" id="icVolunteerMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="icResiUser" column="IC_RESI_USER"/> |
||||
|
<result property="volunteerCategory" column="VOLUNTEER_CATEGORY"/> |
||||
|
<result property="volunteerRemark" column="VOLUNTEER_REMARK"/> |
||||
|
<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"/> |
||||
|
<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"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue