80 changed files with 2239 additions and 93 deletions
@ -0,0 +1,24 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @ClassName BcAdminLoginFormDTO |
||||
|
* @Description 区块链管理系统staff身份认证 |
||||
|
* @Author wangxianzhang |
||||
|
* @Date 2022/1/17 10:11 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BcStaffAuthenticationFormDTO { |
||||
|
|
||||
|
@NotBlank(message = "客户ID必填") |
||||
|
private String customerId; |
||||
|
|
||||
|
@NotBlank(message = "手机号必填") |
||||
|
private String mobile; |
||||
|
|
||||
|
@NotBlank(message = "密码必填") |
||||
|
private String password; |
||||
|
} |
||||
@ -0,0 +1,72 @@ |
|||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
|
||||
|
import java.util.Objects; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
*/ |
||||
|
|
||||
|
public enum DateEnum { |
||||
|
/** |
||||
|
* 月份相关枚举 |
||||
|
*/ |
||||
|
JAN("01", "1月"), |
||||
|
FEB("02", "2月"), |
||||
|
MAR("03", "3月"), |
||||
|
APR("04", "4月"), |
||||
|
MAY("05", "5月"), |
||||
|
JUN("06", "6月"), |
||||
|
JUL("07", "7月"), |
||||
|
AUG("08", "8月"), |
||||
|
SEP("09", "9月"), |
||||
|
OCT("10", "10月"), |
||||
|
NOV("11", "11月"), |
||||
|
DEC("12", "12月"), |
||||
|
/** |
||||
|
* 季度相关枚举 |
||||
|
*/ |
||||
|
Q1("Q1", "第一季度"), |
||||
|
Q2("Q2", "第二季度"), |
||||
|
Q3("Q3", "第三季度"), |
||||
|
Q4("Q4", "第四季度"), |
||||
|
|
||||
|
|
||||
|
UN_KNOWN("0", "未知"); |
||||
|
|
||||
|
private String code; |
||||
|
private String name; |
||||
|
|
||||
|
|
||||
|
DateEnum(String code, String name) { |
||||
|
this.code = code; |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public static String getName(String code) { |
||||
|
DateEnum[] dateEnums = values(); |
||||
|
for (DateEnum dateEnum : dateEnums) { |
||||
|
if (Objects.equals(dateEnum.getCode(), code)) { |
||||
|
return dateEnum.getName(); |
||||
|
} |
||||
|
} |
||||
|
return EpmetErrorCode.SERVER_ERROR.getMsg(); |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
} |
||||
@ -1,47 +0,0 @@ |
|||||
package com.epmet.dataaggre.dto.epmetuser.result; |
|
||||
|
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
|
|
||||
/** |
|
||||
* @Description 工作人员信息结果 |
|
||||
* @Auth sun |
|
||||
*/ |
|
||||
@Data |
|
||||
public class StaffInfoResultDTO implements Serializable { |
|
||||
|
|
||||
private static final long serialVersionUID = -746814280620822111L; |
|
||||
/** |
|
||||
* 用户Id |
|
||||
*/ |
|
||||
private String userId; |
|
||||
|
|
||||
/** |
|
||||
* 用户名 |
|
||||
*/ |
|
||||
private String userName; |
|
||||
|
|
||||
/** |
|
||||
* 手机号 |
|
||||
*/ |
|
||||
private String mobile; |
|
||||
|
|
||||
/** |
|
||||
* 性别0.未知,1男,2.女 |
|
||||
*/ |
|
||||
private Integer gender; |
|
||||
|
|
||||
/** |
|
||||
* 组织Id |
|
||||
*/ |
|
||||
private String orgId; |
|
||||
|
|
||||
/** |
|
||||
* 组织名 |
|
||||
*/ |
|
||||
private String orgName; |
|
||||
|
|
||||
|
|
||||
|
|
||||
} |
|
||||
@ -0,0 +1,115 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 联建单位完成情况 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-01-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyUnitCompletionDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 单位ID |
||||
|
*/ |
||||
|
@NotNull(message = "单位ID不能为空",groups = AddGroup.class) |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 类型 monthly月度,quarter季度 |
||||
|
*/ |
||||
|
@NotNull(message = "类型不能为空",groups = AddGroup.class) |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 评分 百分制 |
||||
|
*/ |
||||
|
@NotNull(message = "评分不能为空",groups = AddGroup.class) |
||||
|
private String score; |
||||
|
|
||||
|
/** |
||||
|
* 完成情况1已完成,0未完成 |
||||
|
*/ |
||||
|
@NotNull(message = "完成情况不能为空",groups = AddGroup.class) |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* 年份 |
||||
|
*/ |
||||
|
@NotNull(message = "年份不能为空",groups = AddGroup.class) |
||||
|
private String year; |
||||
|
|
||||
|
/** |
||||
|
* 月或季度 |
||||
|
*/ |
||||
|
@NotNull(message = "月或季度",groups = AddGroup.class) |
||||
|
private String monthQuarter; |
||||
|
|
||||
|
private String monthQuarterName; |
||||
|
|
||||
|
/** |
||||
|
* 时间 |
||||
|
*/ |
||||
|
private String recordDate; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/1/17 15:46 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CompletionFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 4925867264241549310L; |
||||
|
private String unitId; |
||||
|
private Integer pageNo = 1; |
||||
|
private Integer pageSize = 10; |
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/1/18 9:34 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class PointRecordFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -5200348821951188343L; |
||||
|
/** |
||||
|
* 服务方类型:社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit |
||||
|
*/ |
||||
|
private String serviceType; |
||||
|
/** |
||||
|
* 服务方ID |
||||
|
*/ |
||||
|
private String serviceId; |
||||
|
/** |
||||
|
* 开始时间 |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
|
private String startTime; |
||||
|
/** |
||||
|
* 结束时间 |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
|
private String endTime; |
||||
|
private Integer pageNo = 1; |
||||
|
private Integer pageSize = 10; |
||||
|
private String customerId; |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/1/18 9:30 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class PointRecordDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 8562346042241117055L; |
||||
|
/** |
||||
|
* 需求类型 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String categoryCode; |
||||
|
private String categoryName; |
||||
|
/** |
||||
|
* 需求人 |
||||
|
*/ |
||||
|
private String demandUserName; |
||||
|
/** |
||||
|
* 需求内容 |
||||
|
*/ |
||||
|
private String content; |
||||
|
/** |
||||
|
* 发放积分时间 |
||||
|
*/ |
||||
|
private String pointTime; |
||||
|
/** |
||||
|
* 评价 |
||||
|
*/ |
||||
|
private String score; |
||||
|
/** |
||||
|
* 积分 |
||||
|
*/ |
||||
|
private String point; |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/1/18 9:28 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class PointRecordResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -2359756064125925616L; |
||||
|
private Integer totalPoint; |
||||
|
private PageData<PointRecordDTO> page; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,50 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
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.dto.IcPartyUnitCompletionDTO; |
||||
|
import com.epmet.dto.form.CompletionFormDTO; |
||||
|
import com.epmet.service.IcPartyUnitCompletionService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 联建单位完成情况 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-01-17 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icpartyunitcompletion") |
||||
|
public class IcPartyUnitCompletionController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcPartyUnitCompletionService icPartyUnitCompletionService; |
||||
|
|
||||
|
@PostMapping("list") |
||||
|
public Result<PageData<IcPartyUnitCompletionDTO>> page(@RequestParam CompletionFormDTO formDTO){ |
||||
|
PageData<IcPartyUnitCompletionDTO> page = icPartyUnitCompletionService.page(formDTO); |
||||
|
return new Result<PageData<IcPartyUnitCompletionDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcPartyUnitCompletionDTO dto){ |
||||
|
//效验数据
|
||||
|
if (StringUtils.isBlank(dto.getUnitId())) { |
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
} |
||||
|
icPartyUnitCompletionService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody IcPartyUnitCompletionDTO dto){ |
||||
|
icPartyUnitCompletionService.delete(dto.getId()); |
||||
|
return new Result(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcPartyUnitCompletionEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 联建单位完成情况 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-01-17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcPartyUnitCompletionDao extends BaseDao<IcPartyUnitCompletionEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,71 @@ |
|||||
|
package com.epmet.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-01-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_party_unit_completion") |
||||
|
public class IcPartyUnitCompletionEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 单位ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 类型 monthly月度,quarter季度 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 评分 百分制 |
||||
|
*/ |
||||
|
private String score; |
||||
|
|
||||
|
/** |
||||
|
* 完成情况1已完成,0未完成 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* 年份 |
||||
|
*/ |
||||
|
private String year; |
||||
|
|
||||
|
/** |
||||
|
* 月或季度 |
||||
|
*/ |
||||
|
private String monthQuarter; |
||||
|
|
||||
|
/** |
||||
|
* 时间 |
||||
|
*/ |
||||
|
private String recordDate; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,46 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcPartyUnitCompletionDTO; |
||||
|
import com.epmet.dto.form.CompletionFormDTO; |
||||
|
import com.epmet.entity.IcPartyUnitCompletionEntity; |
||||
|
|
||||
|
/** |
||||
|
* 联建单位完成情况 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-01-17 |
||||
|
*/ |
||||
|
public interface IcPartyUnitCompletionService extends BaseService<IcPartyUnitCompletionEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return PageData<IcPartyUnitCompletionDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-01-17 |
||||
|
*/ |
||||
|
PageData<IcPartyUnitCompletionDTO> page(CompletionFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-01-17 |
||||
|
*/ |
||||
|
void save(IcPartyUnitCompletionDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 删除 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-01-17 |
||||
|
*/ |
||||
|
void delete(String id); |
||||
|
} |
||||
@ -0,0 +1,86 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.enums.DateEnum; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.IcPartyUnitCompletionDao; |
||||
|
import com.epmet.dto.IcPartyUnitCompletionDTO; |
||||
|
import com.epmet.dto.IcPartyUnitDTO; |
||||
|
import com.epmet.dto.form.CompletionFormDTO; |
||||
|
import com.epmet.entity.IcPartyUnitCompletionEntity; |
||||
|
import com.epmet.service.IcPartyUnitCompletionService; |
||||
|
import com.epmet.service.IcPartyUnitService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 联建单位完成情况 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-01-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcPartyUnitCompletionServiceImpl extends BaseServiceImpl<IcPartyUnitCompletionDao, IcPartyUnitCompletionEntity> implements IcPartyUnitCompletionService { |
||||
|
|
||||
|
@Resource |
||||
|
private IcPartyUnitService icPartyUnitService; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcPartyUnitCompletionDTO> page(CompletionFormDTO formDTO) { |
||||
|
if (StringUtils.isBlank(formDTO.getUnitId())) { |
||||
|
return new PageData<>(Collections.emptyList(), NumConstant.ZERO); |
||||
|
} |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
LambdaQueryWrapper<IcPartyUnitCompletionEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(IcPartyUnitCompletionEntity::getUnitId, formDTO.getUnitId()); |
||||
|
wrapper.orderByDesc(IcPartyUnitCompletionEntity::getCreatedTime); |
||||
|
List<IcPartyUnitCompletionEntity> list = baseDao.selectList(wrapper); |
||||
|
PageInfo<IcPartyUnitCompletionEntity> pageInfo = new PageInfo<>(list); |
||||
|
List<IcPartyUnitCompletionDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitCompletionDTO.class); |
||||
|
|
||||
|
if(CollectionUtils.isNotEmpty(dtoList)) { |
||||
|
dtoList.forEach(item -> { |
||||
|
item.setMonthQuarterName(DateEnum.getName(item.getMonthQuarter())); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
return new PageData<>(dtoList, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcPartyUnitCompletionDTO dto) { |
||||
|
IcPartyUnitCompletionEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyUnitCompletionEntity.class); |
||||
|
if (StringUtils.isNotBlank(dto.getYear()) && StringUtils.isNotBlank(dto.getMonthQuarter())) { |
||||
|
entity.setRecordDate(dto.getYear().concat(dto.getMonthQuarter())); |
||||
|
} |
||||
|
if(StringUtils.isBlank(dto.getId())) { |
||||
|
IcPartyUnitDTO unity = icPartyUnitService.get(dto.getUnitId()); |
||||
|
entity.setCustomerId(unity.getCustomerId()); |
||||
|
entity.setAgencyId(unity.getAgencyId()); |
||||
|
entity.setPids(unity.getPids()); |
||||
|
insert(entity); |
||||
|
} else { |
||||
|
updateById(entity); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String id) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteById(id); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,22 @@ |
|||||
|
CREATE TABLE `ic_party_unit_completion` |
||||
|
( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
||||
|
`AGENCY_ID` varchar(64) NOT NULL COMMENT '组织ID', |
||||
|
`PIDS` varchar(255) NOT NULL, |
||||
|
`UNIT_ID` varchar(64) NOT NULL COMMENT '单位ID', |
||||
|
`TYPE` varchar(10) NOT NULL COMMENT '类型 monthly月度,quarter季度', |
||||
|
`SCORE` varchar(5) NOT NULL COMMENT '评分 百分制', |
||||
|
`STATUS` varchar(1) NOT NULL COMMENT '完成情况1已完成,0未完成', |
||||
|
`YEAR` varchar(4) NOT NULL COMMENT '年份', |
||||
|
`MONTH_QUARTER` varchar(4) NOT NULL COMMENT '月或季度', |
||||
|
`RECORD_DATE` varchar(12) NOT NULL COMMENT '时间', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB |
||||
|
DEFAULT CHARSET = utf8mb4 COMMENT ='联建单位完成情况'; |
||||
@ -0,0 +1,27 @@ |
|||||
|
<?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.IcPartyUnitCompletionDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcPartyUnitCompletionEntity" id="icPartyUnitCompletionMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="pids" column="PIDS"/> |
||||
|
<result property="unitId" column="UNIT_ID"/> |
||||
|
<result property="type" column="TYPE"/> |
||||
|
<result property="score" column="SCORE"/> |
||||
|
<result property="status" column="STATUS"/> |
||||
|
<result property="year" column="YEAR"/> |
||||
|
<result property="monthQuarter" column="MONTH_QUARTER"/> |
||||
|
<result property="recordDate" column="RECORD_DATE"/> |
||||
|
<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,27 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/1/17 5:20 下午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class PackageAddOftenUseFunctionFormDTO implements Serializable { |
||||
|
|
||||
|
public interface PackageAddOftenUseFunctionForm{} |
||||
|
|
||||
|
@Valid |
||||
|
public List<AddOftenUseFunctionFormDTO> list; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 查询组织、网格、小区、楼栋、单元、房屋信息 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcResiUserOrgMsgFormDTO implements Serializable { |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
/** |
||||
|
* 组织Id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
/** |
||||
|
* 网格Id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
/** |
||||
|
* 小区Id |
||||
|
*/ |
||||
|
private String neighborHoodId; |
||||
|
/** |
||||
|
* 楼宇Id |
||||
|
*/ |
||||
|
private String buildingId; |
||||
|
/** |
||||
|
* 单元Id |
||||
|
*/ |
||||
|
private String buildingUnitId; |
||||
|
/** |
||||
|
* 房屋Id |
||||
|
*/ |
||||
|
private String houseId; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,60 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.epmet.dto.*; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 查询组织、网格、小区、楼栋、单元、房屋信息 |
||||
|
* |
||||
|
* @author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcResiUserOrgMsgResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 组织信息 |
||||
|
*/ |
||||
|
private CustomerAgencyDTO agencyDTO; |
||||
|
/** |
||||
|
* 组织信息 |
||||
|
*/ |
||||
|
private CustomerGridDTO gridDTO; |
||||
|
/** |
||||
|
* 组织信息 |
||||
|
*/ |
||||
|
private IcNeighborHoodDTO neighborHoodDTO; |
||||
|
/** |
||||
|
* 组织信息 |
||||
|
*/ |
||||
|
private IcBuildingDTO buildingDTO; |
||||
|
/** |
||||
|
* 组织信息 |
||||
|
*/ |
||||
|
private IcBuildingUnitDTO buildingUnitDTO; |
||||
|
/** |
||||
|
* 组织信息 |
||||
|
*/ |
||||
|
private IcHouseDTO houseDTO; |
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/1/17 5:49 下午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class PackageEditIndividualCategoryFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -6112833952805305270L; |
||||
|
|
||||
|
public interface PackageEditIndividualCategoryForm{} |
||||
|
|
||||
|
@Valid |
||||
|
private List<EditIndividualCategoryFormDTO> list; |
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/1/18 10:04 上午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerCategoryShowAndWarnListResultDTO implements Serializable { |
||||
|
|
||||
|
/** |
||||
|
* 居民类别配置表ID |
||||
|
*/ |
||||
|
private String statsConfigId; |
||||
|
|
||||
|
/** |
||||
|
* 居民类别预警配置表ID |
||||
|
*/ |
||||
|
private String warnConfigId; |
||||
|
|
||||
|
/** |
||||
|
* 字段名 |
||||
|
*/ |
||||
|
private String columnName; |
||||
|
|
||||
|
/** |
||||
|
* 标签 |
||||
|
*/ |
||||
|
private String label; |
||||
|
|
||||
|
/** |
||||
|
* 管理平台分类图标 |
||||
|
*/ |
||||
|
private String managementIcon; |
||||
|
|
||||
|
/** |
||||
|
* 数据平台分类图标 |
||||
|
*/ |
||||
|
private String dataIcon; |
||||
|
|
||||
|
/** |
||||
|
* 房屋显示分类图标 |
||||
|
*/ |
||||
|
private String houseShowIcon; |
||||
|
|
||||
|
private Integer level1; |
||||
|
private Integer level2; |
||||
|
private Integer level3; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/1/17 3:27 下午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PersonWarnLeftPieDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 337571869959815613L; |
||||
|
|
||||
|
private Integer count; |
||||
|
|
||||
|
private String configId; |
||||
|
|
||||
|
public PersonWarnLeftPieDTO() { |
||||
|
this.count = NumConstant.ZERO; |
||||
|
this.configId = ""; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 【基础信息】变更记录 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcResiUserChangeRecordFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 9156247659994638103L; |
||||
|
public interface ChangeRecord extends CustomerClientShowGroup {} |
||||
|
|
||||
|
/** |
||||
|
* 字段对应表名 |
||||
|
*/ |
||||
|
@NotBlank(message = "人员Id不能为空" , groups = ChangeRecord.class) |
||||
|
private String icUserId; |
||||
|
|
||||
|
/** |
||||
|
* 页码 |
||||
|
*/ |
||||
|
private Integer pageNo = 1; |
||||
|
/** |
||||
|
* 每页显示数量 |
||||
|
*/ |
||||
|
private Integer pageSize = 20; |
||||
|
} |
||||
@ -0,0 +1,71 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Description 【基础信息】人员调动 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcResiUserTransferFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 9156247659994638103L; |
||||
|
public interface TransferAdd extends CustomerClientShowGroup {} |
||||
|
|
||||
|
/** |
||||
|
* 被调动人ID |
||||
|
*/ |
||||
|
@NotBlank(message = "被调动人Id不能为空" , groups = TransferAdd.class) |
||||
|
private String icUserId; |
||||
|
/** |
||||
|
* 操作类型【客户外out,客户内in】 |
||||
|
*/ |
||||
|
@NotBlank(message = "操作类型不能为空" , groups = TransferAdd.class) |
||||
|
private String type; |
||||
|
/** |
||||
|
* 调动到的组织Id |
||||
|
*/ |
||||
|
private String newAgencyId; |
||||
|
/** |
||||
|
* 调动到的网格Id |
||||
|
*/ |
||||
|
private String newGridId; |
||||
|
/** |
||||
|
* 调动到的小区ID |
||||
|
*/ |
||||
|
private String newNeighborHoodId; |
||||
|
/** |
||||
|
* 调动到的楼宇Id |
||||
|
*/ |
||||
|
private String newBuildingId; |
||||
|
/** |
||||
|
* 调动到的单元Id |
||||
|
*/ |
||||
|
private String newBuildingUnitId; |
||||
|
/** |
||||
|
* 调动到的房屋Id |
||||
|
*/ |
||||
|
private String newHouseId; |
||||
|
/** |
||||
|
* 调动时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
@NotNull(message = "调动时间不能为空" , groups = TransferAdd.class) |
||||
|
private Date transferTime; |
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
//标识,默认为true,为false表示是居民信息修改调用了人员调动的接口,只需要生成调动记录,不涉及修改基础信息
|
||||
|
private Boolean idEdit = true; |
||||
|
//token中信息
|
||||
|
private String customerId; |
||||
|
private String staffId; |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/1/17 4:13 下午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PersonWarnRightListFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -3561699479212127370L; |
||||
|
|
||||
|
public interface PersonWarnRightListForm{} |
||||
|
|
||||
|
@NotNull(message = "pageNo不能为空",groups = PersonWarnRightListForm.class) |
||||
|
private Integer pageNo; |
||||
|
|
||||
|
@NotNull(message = "pageSize不能为空",groups = PersonWarnRightListForm.class) |
||||
|
private Integer pageSize; |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.epmet.dto.IcUserChangeRecordDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 【基础信息】变更记录 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcUserChangeRecordResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
//集合总条数
|
||||
|
private Integer total = 0; |
||||
|
//变更记录
|
||||
|
private List<IcUserChangeRecordDTO> list; |
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/1/17 2:33 下午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PersonWarnLeftPieResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -111604873581992490L; |
||||
|
|
||||
|
private Integer total; |
||||
|
|
||||
|
private List<PersonWarnLeftPie> list; |
||||
|
|
||||
|
public PersonWarnLeftPieResultDTO() { |
||||
|
this.total = NumConstant.ZERO; |
||||
|
this.list = new ArrayList<>(); |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
public static class PersonWarnLeftPie{ |
||||
|
|
||||
|
@JsonIgnore |
||||
|
private String configId; |
||||
|
|
||||
|
private String typeName; |
||||
|
|
||||
|
private String typeCode; |
||||
|
|
||||
|
private Integer typeCount; |
||||
|
|
||||
|
public PersonWarnLeftPie() { |
||||
|
this.typeName = ""; |
||||
|
this.typeCode = ""; |
||||
|
this.typeCount = NumConstant.ZERO; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,68 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/1/17 4:16 下午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PersonWarnRightListResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -9181230625228226662L; |
||||
|
|
||||
|
private Integer total; |
||||
|
|
||||
|
private List<PersonWarnRightList> list; |
||||
|
|
||||
|
public PersonWarnRightListResultDTO() { |
||||
|
this.total = NumConstant.ZERO; |
||||
|
this.list = new ArrayList<>(); |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
public static class PersonWarnRightList{ |
||||
|
|
||||
|
/** |
||||
|
* 类型 |
||||
|
*/ |
||||
|
private List<String> type; |
||||
|
|
||||
|
/** |
||||
|
* 所属网格 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 所属家庭 |
||||
|
*/ |
||||
|
private String family; |
||||
|
|
||||
|
/** |
||||
|
* 电话 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
private String userId; |
||||
|
|
||||
|
public PersonWarnRightList() { |
||||
|
this.type = new ArrayList<>(); |
||||
|
this.gridName = ""; |
||||
|
this.name = ""; |
||||
|
this.family = ""; |
||||
|
this.mobile = ""; |
||||
|
this.userId = ""; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue