28 changed files with 1405 additions and 11 deletions
@ -0,0 +1,114 @@ |
|||
package com.epmet.resi.partymember.dto.partymember; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
public class IcPartyMemberPointDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员ID |
|||
*/ |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 季度 |
|||
*/ |
|||
private String quarter; |
|||
|
|||
/** |
|||
* 基础积分分值 |
|||
*/ |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 基础积分选项 英文逗号隔开 |
|||
*/ |
|||
private String baseOptions; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 民主评议积分选项 |
|||
*/ |
|||
private String reviewOptions; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 激励积分选项 |
|||
*/ |
|||
private String inspireOptions; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 警示扣分选项 |
|||
*/ |
|||
private String warnOptions; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.resi.partymember.dto.partymember; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberPointListCountDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8960345656247021278L; |
|||
|
|||
/** |
|||
* 基础积分分值次数 |
|||
*/ |
|||
private Integer basePointCount; |
|||
|
|||
/** |
|||
* 民主评议积分分值次数 |
|||
*/ |
|||
private Integer reviewPointCount; |
|||
|
|||
/** |
|||
* 激励积分分值次数 |
|||
*/ |
|||
private Integer inspirePointCount; |
|||
|
|||
/** |
|||
* 警示扣分分值次数 |
|||
*/ |
|||
private Integer warnPointCount; |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberPointListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5659445492756209830L; |
|||
|
|||
/** |
|||
* 所属党组织id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 评分年度 |
|||
*/ |
|||
private String year; |
|||
|
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.epmet.resi.partymember.dto.partymember.result; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class PartyMemberPointListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5867583472212661940L; |
|||
|
|||
/** |
|||
* 所属党组织 |
|||
*/ |
|||
private String partyOrg; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 总分 |
|||
*/ |
|||
private Integer TotalScore; |
|||
|
|||
/** |
|||
*基础积分分值 |
|||
*/ |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String Remark; |
|||
|
|||
/** |
|||
* 年度 |
|||
*/ |
|||
private String year; |
|||
|
|||
} |
@ -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,99 @@ |
|||
package com.epmet.modules.partymember.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
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.excel.IcPartyMemberPointExcel; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPointService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; |
|||
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("icPartyMemberPoint") |
|||
public class IcPartyMemberPointController { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPointService icPartyMemberPointService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcPartyMemberPointDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<IcPartyMemberPointDTO> page = icPartyMemberPointService.page(params); |
|||
return new Result<PageData<IcPartyMemberPointDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
|||
public Result<IcPartyMemberPointDTO> get(@PathVariable("id") String id) { |
|||
IcPartyMemberPointDTO data = icPartyMemberPointService.get(id); |
|||
return new Result<IcPartyMemberPointDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody IcPartyMemberPointDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icPartyMemberPointService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcPartyMemberPointDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icPartyMemberPointService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids) { |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icPartyMemberPointService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<IcPartyMemberPointDTO> list = icPartyMemberPointService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, IcPartyMemberPointExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* 量化积分统计 |
|||
* |
|||
* @param form |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO>> |
|||
* @author LZN |
|||
* @date 2022/5/17 17:19 |
|||
*/ |
|||
@PostMapping("getList") |
|||
public Result<List<PartyMemberPointListResultDTO>> getList(@RequestBody PartyMemberPointListFormDTO form, @LoginUser TokenDto tokenDto) { |
|||
List<PartyMemberPointListResultDTO> dto = icPartyMemberPointService.getList(form,tokenDto); |
|||
return new Result<List<PartyMemberPointListResultDTO>>().ok(dto); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.modules.partymember.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
|
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; |
|||
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 2022-05-17 |
|||
*/ |
|||
@Mapper |
|||
public interface IcPartyMemberPointDao extends BaseDao<IcPartyMemberPointEntity> { |
|||
|
|||
List<PartyMemberPointListResultDTO> getList(@Param("idCard") String idCard, |
|||
@Param("mobile") String mobile, |
|||
@Param("name") String name, |
|||
@Param("orgId") String orgId, |
|||
@Param("year") String year, |
|||
@Param("customerId") String customerId); |
|||
|
|||
List<PartyMemberPointListCountDTO> getListCount(@Param("year") String year, |
|||
@Param("customerId") String customerId); |
|||
} |
@ -0,0 +1,89 @@ |
|||
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; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_party_member_point") |
|||
public class IcPartyMemberPointEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员ID |
|||
*/ |
|||
private String partyMemberId; |
|||
|
|||
/** |
|||
* 年 |
|||
*/ |
|||
private String year; |
|||
|
|||
/** |
|||
* 季度 |
|||
*/ |
|||
private String quarter; |
|||
|
|||
/** |
|||
* 基础积分分值 |
|||
*/ |
|||
private Integer basePoint; |
|||
|
|||
/** |
|||
* 基础积分选项 英文逗号隔开 |
|||
*/ |
|||
private String baseOptions; |
|||
|
|||
/** |
|||
* 民主评议积分分值 |
|||
*/ |
|||
private Integer reviewPoint; |
|||
|
|||
/** |
|||
* 民主评议积分选项 |
|||
*/ |
|||
private String reviewOptions; |
|||
|
|||
/** |
|||
* 激励积分分值 |
|||
*/ |
|||
private Integer inspirePoint; |
|||
|
|||
/** |
|||
* 激励积分选项 |
|||
*/ |
|||
private String inspireOptions; |
|||
|
|||
/** |
|||
* 警示扣分分值 |
|||
*/ |
|||
private Integer warnPoint; |
|||
|
|||
/** |
|||
* 警示扣分选项 |
|||
*/ |
|||
private String warnOptions; |
|||
|
|||
/** |
|||
* 总分 |
|||
*/ |
|||
private Integer totalScore; |
|||
|
|||
} |
@ -0,0 +1,75 @@ |
|||
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 IcPartyMemberPointExcel { |
|||
|
|||
@Excel(name = "唯一标识") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户Id (customer.id)") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "党员ID") |
|||
private String partyMemberId; |
|||
|
|||
@Excel(name = "年") |
|||
private String year; |
|||
|
|||
@Excel(name = "季度") |
|||
private String quarter; |
|||
|
|||
@Excel(name = "基础积分分值") |
|||
private Integer basePoint; |
|||
|
|||
@Excel(name = "基础积分选项 英文逗号隔开") |
|||
private String baseOptions; |
|||
|
|||
@Excel(name = "民主评议积分分值") |
|||
private Integer reviewPoint; |
|||
|
|||
@Excel(name = "民主评议积分选项") |
|||
private String reviewOptions; |
|||
|
|||
@Excel(name = "激励积分分值") |
|||
private Integer inspirePoint; |
|||
|
|||
@Excel(name = "激励积分选项") |
|||
private String inspireOptions; |
|||
|
|||
@Excel(name = "警示扣分分值") |
|||
private Integer warnPoint; |
|||
|
|||
@Excel(name = "警示扣分选项") |
|||
private String warnOptions; |
|||
|
|||
@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.partymember.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 IcPartyMemberPointRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,94 @@ |
|||
package com.epmet.modules.partymember.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; |
|||
|
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员量化积分表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-17 |
|||
*/ |
|||
public interface IcPartyMemberPointService extends BaseService<IcPartyMemberPointEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcPartyMemberPointDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
PageData<IcPartyMemberPointDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcPartyMemberPointDTO> |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
List<IcPartyMemberPointDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcPartyMemberPointDTO |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
IcPartyMemberPointDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void save(IcPartyMemberPointDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void update(IcPartyMemberPointDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 量化积分统计 |
|||
* |
|||
* @param form |
|||
* @return java.util.List<com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO> |
|||
* @author LZN |
|||
* @date 2022/5/17 17:19 |
|||
*/ |
|||
List<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form, TokenDto tokenDto); |
|||
|
|||
} |
@ -0,0 +1,132 @@ |
|||
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.NumConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
|
|||
import com.epmet.modules.partymember.dao.IcPartyMemberPointDao; |
|||
import com.epmet.modules.partymember.entity.IcPartyMemberPointEntity; |
|||
import com.epmet.modules.partymember.redis.IcPartyMemberPointRedis; |
|||
import com.epmet.modules.partymember.service.IcPartyMemberPointService; |
|||
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberPointDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.PartyMemberPointListFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO; |
|||
import jdk.nashorn.internal.parser.Token; |
|||
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 IcPartyMemberPointServiceImpl extends BaseServiceImpl<IcPartyMemberPointDao, IcPartyMemberPointEntity> implements IcPartyMemberPointService { |
|||
|
|||
@Autowired |
|||
private IcPartyMemberPointRedis icPartyMemberPointRedis; |
|||
|
|||
@Override |
|||
public PageData<IcPartyMemberPointDTO> page(Map<String, Object> params) { |
|||
IPage<IcPartyMemberPointEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcPartyMemberPointDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcPartyMemberPointDTO> list(Map<String, Object> params) { |
|||
List<IcPartyMemberPointEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcPartyMemberPointDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcPartyMemberPointEntity> getWrapper(Map<String, Object> params) { |
|||
String id = (String) params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcPartyMemberPointEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcPartyMemberPointDTO get(String id) { |
|||
IcPartyMemberPointEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcPartyMemberPointDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcPartyMemberPointDTO dto) { |
|||
IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcPartyMemberPointDTO dto) { |
|||
IcPartyMemberPointEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyMemberPointEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public List<PartyMemberPointListResultDTO> getList(PartyMemberPointListFormDTO form, TokenDto tokenDto) { |
|||
List<PartyMemberPointListResultDTO> dto = baseDao.getList(form.getIdCard(), form.getMobile(), form.getName(), |
|||
form.getOrgId(), form.getYear(),tokenDto.getCustomerId()); |
|||
List<PartyMemberPointListCountDTO> count = baseDao.getListCount(form.getYear(),tokenDto.getCustomerId()); |
|||
// 处理统计的平均值
|
|||
for (int i = 0; i < dto.size(); i++) { |
|||
// 基础积分分值平均值
|
|||
if (dto.get(i).getBasePoint() != null && count.get(i).getBasePointCount() != NumConstant.ZERO) { |
|||
dto.get(i).setBasePoint(dto.get(i).getBasePoint() / count.get(i).getBasePointCount()); |
|||
} else { |
|||
dto.get(i).setBasePoint(NumConstant.ZERO); |
|||
} |
|||
// 民主评议积分分值
|
|||
if (dto.get(i).getInspirePoint() != null && count.get(i).getInspirePointCount() != NumConstant.ZERO) { |
|||
dto.get(i).setInspirePoint(dto.get(i).getInspirePoint() / count.get(i).getInspirePointCount()); |
|||
} else { |
|||
dto.get(i).setInspirePoint(NumConstant.ZERO); |
|||
} |
|||
// 激励积分分值
|
|||
if (dto.get(i).getReviewPoint() != null && count.get(i).getReviewPointCount() != NumConstant.ZERO) { |
|||
dto.get(i).setReviewPoint(dto.get(i).getReviewPoint() / count.get(i).getReviewPointCount()); |
|||
} else { |
|||
dto.get(i).setReviewPoint(NumConstant.ZERO); |
|||
} |
|||
// 警示扣分分值
|
|||
if (dto.get(i).getWarnPoint() != null && count.get(i).getWarnPointCount() != NumConstant.ZERO) { |
|||
dto.get(i).setWarnPoint(dto.get(i).getWarnPoint() / count.get(i).getWarnPointCount()); |
|||
} else { |
|||
dto.get(i).setWarnPoint(NumConstant.ZERO); |
|||
} |
|||
// 总分
|
|||
dto.get(i).setTotalScore(dto.get(i).getBasePoint() + dto.get(i).getInspirePoint() + dto.get(i).getReviewPoint() + dto.get(i).getWarnPoint()); |
|||
} |
|||
return dto; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
<?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.IcPartyMemberPointDao"> |
|||
|
|||
|
|||
<select id="getList" |
|||
resultType="com.epmet.resi.partymember.dto.partymember.result.PartyMemberPointListResultDTO"> |
|||
SELECT |
|||
c.PARTY_ORG_NAME as partyOrg, |
|||
u.NAME, |
|||
u.MOBILE, |
|||
u.ID_CARD, |
|||
u.REMARK, |
|||
a.year, |
|||
sum( a.BASE_POINT ) AS BasePoint, |
|||
sum( a.REVIEW_POINT ) AS reviewPoint, |
|||
sum( a.INSPIRE_POINT ) AS inspirePoint, |
|||
sum( a.WARN_POINT ) AS warnPoint |
|||
FROM |
|||
ic_party_member u |
|||
LEFT JOIN ic_party_member_point a ON a.PARTY_MEMBER_ID = u.id |
|||
AND a.DEL_FLAG = '0' |
|||
LEFT JOIN ic_party_org c ON c.id = u.sszb |
|||
AND c.DEL_FLAG = '0' |
|||
<where> |
|||
u.DEL_FLAG = '0' |
|||
AND u.CUSTOMER_ID = #{customerId} |
|||
<if test="name != null and name != ''"> |
|||
AND u.NAME = #{name} |
|||
</if> |
|||
<if test="mobile != null and mobile != ''"> |
|||
AND u.MOBILE = #{mobile} |
|||
</if> |
|||
<if test="idCard != null and idCard != ''"> |
|||
AND u.ID_CARD = #{idCard} |
|||
</if> |
|||
<if test="year != null and year != ''"> |
|||
AND a.YEAR = #{year} |
|||
</if> |
|||
<if test="orgId != null and orgId != ''"> |
|||
AND c.id = #{orgId} |
|||
</if> |
|||
</where> |
|||
GROUP BY u.ID |
|||
ORDER BY |
|||
a.YEAR DESC, |
|||
u.sszb ASC, |
|||
a.total_score ASC, |
|||
a.CREATED_TIME |
|||
</select> |
|||
<select id="getListCount" |
|||
resultType="com.epmet.resi.partymember.dto.partymember.PartyMemberPointListCountDTO"> |
|||
SELECT |
|||
count( a.BASE_POINT ) AS basePointCount, |
|||
count( a.REVIEW_POINT ) AS reviewPointCount, |
|||
count( a.INSPIRE_POINT ) AS inspirePointCount, |
|||
count( a.WARN_POINT ) AS warnPointCount |
|||
FROM |
|||
ic_party_member u |
|||
LEFT JOIN ic_party_member_point a ON a.PARTY_MEMBER_ID = u.id |
|||
AND a.DEL_FLAG = '0' |
|||
<where> |
|||
u.DEL_FLAG = '0' |
|||
AND u.CUSTOMER_ID = #{customerId} |
|||
<if test="year != null and year != ''"> |
|||
AND a.year = #{year} |
|||
</if> |
|||
</where> |
|||
GROUP BY |
|||
u.id |
|||
ORDER BY |
|||
a.YEAR DESC, |
|||
u.sszb ASC, |
|||
a.total_score ASC, |
|||
a.CREATED_TIME |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
@ -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