41 changed files with 2527 additions and 0 deletions
@ -0,0 +1,42 @@ |
|||||
|
package com.epmet.enums; |
||||
|
|
||||
|
/** |
||||
|
* @description: 灵山街道-特殊人群 |
||||
|
* @param null: |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/19 10:55 AM |
||||
|
*/ |
||||
|
public enum LingShanSpecialCrowdTypeEnums { |
||||
|
AZBJ("anzhibangjiao", "安置帮教", 1), |
||||
|
SQJZ("shequjiaozheng", "社区矫正", 1), |
||||
|
JDRY("xidurenyuan", "戒毒人员", 1), |
||||
|
JZHZ("jingzhanghuanzhe", "精障患者", 1), |
||||
|
XFRY("xinfangrenyuan", "信访人员", 1); |
||||
|
|
||||
|
/** |
||||
|
* 类型。anzhibangjiao, |
||||
|
*/ |
||||
|
private String type; |
||||
|
private String name; |
||||
|
|
||||
|
private Integer headerRowNumber; |
||||
|
|
||||
|
LingShanSpecialCrowdTypeEnums(String type, String name, Integer headerRowNumber) { |
||||
|
this.type = type; |
||||
|
this.name = name; |
||||
|
this.headerRowNumber = headerRowNumber; |
||||
|
} |
||||
|
|
||||
|
public String getType() { |
||||
|
return type; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public Integer getHeaderRowNumber() { |
||||
|
return headerRowNumber; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,114 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.utils.DateUtils; |
||||
|
import com.epmet.commons.tools.utils.FileUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.service.LingShanSpecialCrowdService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.io.IOUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import java.io.FileOutputStream; |
||||
|
import java.io.IOException; |
||||
|
import java.nio.file.Files; |
||||
|
import java.nio.file.Path; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @description: 灵山社会维稳(特殊人群) |
||||
|
* @param null: |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 9:08 AM |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("lingShan/specialCrowd") |
||||
|
public class LingShanSpecialCrowdController { |
||||
|
|
||||
|
@Autowired |
||||
|
private LingShanSpecialCrowdService lingShanSpecialCrowdService; |
||||
|
|
||||
|
/** |
||||
|
* @description: 特殊人群导入 |
||||
|
* @param file: |
||||
|
* @param crowdCategory: 人群类别 |
||||
|
* anzhibangjiao |
||||
|
* buliangqingshaonian |
||||
|
* shequjiaozheng |
||||
|
* xidurenyuan |
||||
|
* xiejiaorenyuan |
||||
|
* zhaoshizhaohuojingshenbing |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 9:12 AM |
||||
|
*/ |
||||
|
@PostMapping("import") |
||||
|
public Result importSpecialCowd(MultipartFile file, @RequestParam("crowdCategory") String crowdCategory) { |
||||
|
|
||||
|
// 1.存文件
|
||||
|
Path fileSavePath = saveSpecialCrowdTempFile(file); |
||||
|
|
||||
|
// 2.执行业务导入
|
||||
|
try { |
||||
|
lingShanSpecialCrowdService.importSpecialCrowd(crowdCategory, fileSavePath.toString()); |
||||
|
} catch (Exception e) { |
||||
|
throw e; |
||||
|
// ...
|
||||
|
} finally { |
||||
|
// 3.删除文件
|
||||
|
deleteSpecialCrowdTempFile(fileSavePath); |
||||
|
} |
||||
|
|
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 保存特殊人群临时文件 |
||||
|
* @param file: |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 9:46 AM |
||||
|
*/ |
||||
|
public Path saveSpecialCrowdTempFile(@RequestParam("file") MultipartFile file) { |
||||
|
Path fileSavePath; |
||||
|
FileOutputStream os = null; |
||||
|
try { |
||||
|
Path fileSaveDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("special_crowd_import"); |
||||
|
String fileName = DateUtils.format(new Date(), "yyyyMMdd_HHmmss_" + System.nanoTime()); |
||||
|
fileSavePath = fileSaveDir.resolve(fileName); |
||||
|
IOUtils.copy(file.getInputStream(), (os = new FileOutputStream(fileSavePath.toString()))); |
||||
|
return fileSavePath; |
||||
|
} catch (IOException e) { |
||||
|
log.error("【灵山街道】导入社会维稳数据,缓存文件失败。"); |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, null); |
||||
|
} finally { |
||||
|
org.apache.poi.util.IOUtils.closeQuietly(os); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 删除特殊人群临时文件 |
||||
|
* @param fileSavePath: |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 9:47 AM |
||||
|
*/ |
||||
|
public void deleteSpecialCrowdTempFile(Path fileSavePath) { |
||||
|
if (fileSavePath != null) { |
||||
|
try { |
||||
|
Files.deleteIfExists(fileSavePath); |
||||
|
} catch ( |
||||
|
IOException e) { |
||||
|
log.error("【灵山街道】导入社会维稳数据,删除临时文件失败"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailAzbjEntity; |
||||
|
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 2023-04-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LingshanSpecialCrowdDetailAzbjDao extends BaseDao<LingshanSpecialCrowdDetailAzbjEntity> { |
||||
|
|
||||
|
void saveBatchManually(@Param("asbjList") List<LingshanSpecialCrowdDetailAzbjEntity> l); |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailJdryEntity; |
||||
|
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 2023-04-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LingshanSpecialCrowdDetailJdryDao extends BaseDao<LingshanSpecialCrowdDetailJdryEntity> { |
||||
|
|
||||
|
void saveBatchManually(@Param("list") List<LingshanSpecialCrowdDetailJdryEntity> l); |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailJzhzEntity; |
||||
|
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 2023-04-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LingshanSpecialCrowdDetailJzhzDao extends BaseDao<LingshanSpecialCrowdDetailJzhzEntity> { |
||||
|
|
||||
|
void saveBatchManually(@Param("list") List<LingshanSpecialCrowdDetailJzhzEntity> l); |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailSqjzEntity; |
||||
|
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 2023-04-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LingshanSpecialCrowdDetailSqjzDao extends BaseDao<LingshanSpecialCrowdDetailSqjzEntity> { |
||||
|
|
||||
|
void saveBatchManually(@Param("list") List<LingshanSpecialCrowdDetailSqjzEntity> l); |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailXfryEntity; |
||||
|
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 2023-04-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LingshanSpecialCrowdDetailXfryDao extends BaseDao<LingshanSpecialCrowdDetailXfryEntity> { |
||||
|
|
||||
|
void saveBatchManually(@Param("list") List<LingshanSpecialCrowdDetailXfryEntity> l); |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailAzbjEntity; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdPersonEntity; |
||||
|
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 2023-04-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LingshanSpecialCrowdPersonDao extends BaseDao<LingshanSpecialCrowdPersonEntity> { |
||||
|
|
||||
|
void saveOrUpdateManually(@Param("list") List<LingshanSpecialCrowdPersonEntity> list); |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdPersonTypeEntity; |
||||
|
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 2023-04-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LingshanSpecialCrowdPersonTypeDao extends BaseDao<LingshanSpecialCrowdPersonTypeEntity> { |
||||
|
|
||||
|
void saveOrUpdateManually(@Param("types") List<LingshanSpecialCrowdPersonTypeEntity> types); |
||||
|
} |
||||
@ -0,0 +1,69 @@ |
|||||
|
package com.epmet.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 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("lingshan_special_crowd_detail_azbj") |
||||
|
public class LingshanSpecialCrowdDetailAzbjEntity extends LingshanSpecialCrowdDetailBaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 原罪名 |
||||
|
*/ |
||||
|
private String originalCharge; |
||||
|
|
||||
|
/** |
||||
|
* 释放日期 |
||||
|
*/ |
||||
|
private Date releaseDate; |
||||
|
|
||||
|
/** |
||||
|
* 原判刑期(单位:月) |
||||
|
*/ |
||||
|
private Date originPrisonTerm; |
||||
|
|
||||
|
/** |
||||
|
* 是否累犯。0否,1是 |
||||
|
*/ |
||||
|
private Integer recidivismFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否安置。0否,1是 |
||||
|
*/ |
||||
|
private Integer emplacementFlag; |
||||
|
|
||||
|
/** |
||||
|
* 安置日期 |
||||
|
*/ |
||||
|
private Date emplacementDate; |
||||
|
|
||||
|
/** |
||||
|
* 安置帮教情况 |
||||
|
*/ |
||||
|
private String emplacementInfo; |
||||
|
|
||||
|
/** |
||||
|
* 是否注销 |
||||
|
*/ |
||||
|
private Integer canceledFlag; |
||||
|
|
||||
|
/** |
||||
|
* 注销原因 |
||||
|
*/ |
||||
|
private String canceledReason; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class LingshanSpecialCrowdDetailBaseEntity extends BaseEpmetEntity { |
||||
|
/** |
||||
|
* 客户Id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* org id路径,:分割 |
||||
|
*/ |
||||
|
private String orgIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 证件号 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
} |
||||
@ -0,0 +1,69 @@ |
|||||
|
package com.epmet.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 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("lingshan_special_crowd_detail_jdry") |
||||
|
public class LingshanSpecialCrowdDetailJdryEntity extends LingshanSpecialCrowdDetailBaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 有无犯罪史 |
||||
|
*/ |
||||
|
private Integer criminalHistoryFlag; |
||||
|
|
||||
|
/** |
||||
|
* 有无复吸史 |
||||
|
*/ |
||||
|
private Integer drugRepetitionFlag; |
||||
|
|
||||
|
/** |
||||
|
* 初次发现日期 |
||||
|
*/ |
||||
|
private Date firstDiscoveryDate; |
||||
|
|
||||
|
/** |
||||
|
* 管控人姓名 |
||||
|
*/ |
||||
|
private String controllerName; |
||||
|
|
||||
|
/** |
||||
|
* 管控人联系方式 |
||||
|
*/ |
||||
|
private String controllerContact; |
||||
|
|
||||
|
/** |
||||
|
* 帮扶人姓名 |
||||
|
*/ |
||||
|
private String helperName; |
||||
|
|
||||
|
/** |
||||
|
* 帮扶人联系方式 |
||||
|
*/ |
||||
|
private String helperContact; |
||||
|
|
||||
|
/** |
||||
|
* 是否脱管 |
||||
|
*/ |
||||
|
private Integer detachedFlag; |
||||
|
|
||||
|
/** |
||||
|
* 脱管原因 |
||||
|
*/ |
||||
|
private String detachedReason; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,74 @@ |
|||||
|
package com.epmet.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 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("lingshan_special_crowd_detail_jzhz") |
||||
|
public class LingshanSpecialCrowdDetailJzhzEntity extends LingshanSpecialCrowdDetailBaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 有无肇事肇祸史 |
||||
|
*/ |
||||
|
private Integer causeTroubleHistoryFlag; |
||||
|
|
||||
|
/** |
||||
|
* 肇事肇祸次数 |
||||
|
*/ |
||||
|
private Integer causeTroubleTimes; |
||||
|
|
||||
|
/** |
||||
|
* 目前诊断类型。1精神分裂症,2分裂情感性障碍,3持久的妄想性障碍(偏执性精神病),4双相(情感)障碍,5癫痫所致精神障碍,6精神发育迟滞伴发精神障碍,7重度抑郁发作,8精神活性物质所致精神障碍,9其他 |
||||
|
*/ |
||||
|
private Integer currentDiagnosis; |
||||
|
|
||||
|
/** |
||||
|
* 危险性评估等级。0,1,2,3,4,5 |
||||
|
*/ |
||||
|
private Integer dangerousClass; |
||||
|
|
||||
|
/** |
||||
|
* 是否具备外出能力 |
||||
|
*/ |
||||
|
private Integer canGoOutFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否有暴力倾向 |
||||
|
*/ |
||||
|
private Integer violenceFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否落实监管补助 |
||||
|
*/ |
||||
|
private Integer allowanceFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否纳入低保 |
||||
|
*/ |
||||
|
private Integer subsistenceFlag; |
||||
|
|
||||
|
/** |
||||
|
* 监护人姓名 |
||||
|
*/ |
||||
|
private String guardianName; |
||||
|
|
||||
|
/** |
||||
|
* 监护人联系方式 |
||||
|
*/ |
||||
|
private String guardianContact; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.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 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("lingshan_special_crowd_detail_sqjz") |
||||
|
public class LingshanSpecialCrowdDetailSqjzEntity extends LingshanSpecialCrowdDetailBaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 矫正类型。1.管制,2缓刑,3假释,4暂予监外执行,5剥夺政治权利 |
||||
|
*/ |
||||
|
private Integer rectificateType; |
||||
|
|
||||
|
/** |
||||
|
* 矫正开始日期 |
||||
|
*/ |
||||
|
private Date rectificateStartDate; |
||||
|
|
||||
|
/** |
||||
|
* 矫正结束日期 |
||||
|
*/ |
||||
|
private Date rectificateEndDate; |
||||
|
|
||||
|
/** |
||||
|
* 原羁押场所 |
||||
|
*/ |
||||
|
private String originDetainAddress; |
||||
|
|
||||
|
/** |
||||
|
* 原罪名 |
||||
|
*/ |
||||
|
private String originalCharge; |
||||
|
|
||||
|
/** |
||||
|
* 接受方式。1.自行报到,2狱所押送,3当庭交接,4其他 |
||||
|
*/ |
||||
|
private Integer receiveWay; |
||||
|
|
||||
|
/** |
||||
|
* 矫正情况说明 |
||||
|
*/ |
||||
|
private String rectificateInfo; |
||||
|
|
||||
|
/** |
||||
|
* 是否脱管 |
||||
|
*/ |
||||
|
private Integer detachedFlag; |
||||
|
|
||||
|
/** |
||||
|
* 脱管原因 |
||||
|
*/ |
||||
|
private String detachedReason; |
||||
|
|
||||
|
/** |
||||
|
* 是否注销 |
||||
|
*/ |
||||
|
private Integer canceledFlag; |
||||
|
|
||||
|
/** |
||||
|
* 注销原因 |
||||
|
*/ |
||||
|
private String canceledReason; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,70 @@ |
|||||
|
package com.epmet.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 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("lingshan_special_crowd_detail_xfry") |
||||
|
public class LingshanSpecialCrowdDetailXfryEntity extends LingshanSpecialCrowdDetailBaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 反映问题 |
||||
|
*/ |
||||
|
private String problem; |
||||
|
|
||||
|
/** |
||||
|
* 稳控措施 |
||||
|
*/ |
||||
|
private String stableControlMeasurement; |
||||
|
|
||||
|
/** |
||||
|
* 是否多次上访 |
||||
|
*/ |
||||
|
private Integer multipleFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否在当地 |
||||
|
*/ |
||||
|
private Integer localFlag; |
||||
|
|
||||
|
/** |
||||
|
* 分管领导 |
||||
|
*/ |
||||
|
private String branchLeader; |
||||
|
|
||||
|
/** |
||||
|
* 分管领导联系方式 |
||||
|
*/ |
||||
|
private String branchLeaderContact; |
||||
|
|
||||
|
/** |
||||
|
* 负责人 |
||||
|
*/ |
||||
|
private String principal; |
||||
|
|
||||
|
/** |
||||
|
* 负责人联系方式 |
||||
|
*/ |
||||
|
private String principalContact; |
||||
|
|
||||
|
/** |
||||
|
* 稳控人员名单 |
||||
|
*/ |
||||
|
private String stableControlerList; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,64 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-特殊人群-人员基础信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("lingshan_special_crowd_person") |
||||
|
public class LingshanSpecialCrowdPersonEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* org id路径,:分割 |
||||
|
*/ |
||||
|
private String orgIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 证件号 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
|
||||
|
public LingshanSpecialCrowdPersonEntity() { |
||||
|
} |
||||
|
|
||||
|
public LingshanSpecialCrowdPersonEntity(String id, String customerId, String orgIdPath, String name, String idCard, |
||||
|
String delFlag, Integer revision, Date createdTime, String createdBy, Date updatedTime, |
||||
|
String updatedBy) { |
||||
|
this.customerId = customerId; |
||||
|
this.orgIdPath = orgIdPath; |
||||
|
this.name = name; |
||||
|
this.idCard = idCard; |
||||
|
this.setDelFlag(delFlag); |
||||
|
this.setCreatedBy(createdBy); |
||||
|
this.setCreatedTime(createdTime); |
||||
|
this.setUpdatedBy(updatedBy); |
||||
|
this.setUpdatedTime(updatedTime); |
||||
|
this.setRevision(revision); |
||||
|
this.setId(id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,59 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-特殊人群-人员具有的特殊人群类型信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("lingshan_special_crowd_person_type") |
||||
|
public class LingshanSpecialCrowdPersonTypeEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* org id路径,:分割 |
||||
|
*/ |
||||
|
private String orgIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 证件号 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
|
||||
|
/** |
||||
|
* 特殊人群类别 |
||||
|
*/ |
||||
|
private String specialType; |
||||
|
|
||||
|
public LingshanSpecialCrowdPersonTypeEntity(String id, String customerId, String orgIdPath, String idCard, String specialType, String delFlag, |
||||
|
Integer revision, Date createdTime, String createdBy, Date updatedTime, String updatedBy) { |
||||
|
this.customerId = customerId; |
||||
|
this.orgIdPath = orgIdPath; |
||||
|
this.idCard = idCard; |
||||
|
this.specialType = specialType; |
||||
|
this.setDelFlag(delFlag); |
||||
|
this.setCreatedBy(createdBy); |
||||
|
this.setCreatedTime(createdTime); |
||||
|
this.setUpdatedBy(updatedBy); |
||||
|
this.setUpdatedTime(updatedTime); |
||||
|
this.setRevision(revision); |
||||
|
this.setId(id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
package com.epmet.excel.converter; |
||||
|
|
||||
|
import com.alibaba.excel.converters.Converter; |
||||
|
import com.alibaba.excel.converters.ReadConverterContext; |
||||
|
import com.alibaba.excel.enums.CellDataTypeEnum; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-是否转换器 |
||||
|
*/ |
||||
|
public class LingShanSpecialCrowdIsOrNotConverter implements Converter<Integer> { |
||||
|
@Override |
||||
|
public CellDataTypeEnum supportExcelTypeKey() { |
||||
|
return CellDataTypeEnum.STRING; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Class<?> supportJavaTypeKey() { |
||||
|
return Integer.class; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Integer convertToJavaData(ReadConverterContext<?> context) throws Exception { |
||||
|
String content = context.getReadCellData().getStringValue(); |
||||
|
if (StringUtils.isNotBlank(content)) { |
||||
|
if (content.equals("是") || content.equals("有")) { |
||||
|
return 1; |
||||
|
} else if (content.equals("无") || content.equals("否")) { |
||||
|
return 0; |
||||
|
} |
||||
|
} |
||||
|
return Converter.super.convertToJavaData(context); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,57 @@ |
|||||
|
package com.epmet.excel.converter; |
||||
|
|
||||
|
import com.alibaba.excel.converters.Converter; |
||||
|
import com.alibaba.excel.converters.ReadConverterContext; |
||||
|
import com.alibaba.excel.enums.CellDataTypeEnum; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-诊断类型转换器 |
||||
|
*/ |
||||
|
public class LingShanSpecialCrowdJzhzConverter implements Converter<Integer> { |
||||
|
@Override |
||||
|
public CellDataTypeEnum supportExcelTypeKey() { |
||||
|
return CellDataTypeEnum.STRING; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Integer convertToJavaData(ReadConverterContext<?> context) throws Exception { |
||||
|
String content = context.getReadCellData().getStringValue(); |
||||
|
if (content instanceof String) { |
||||
|
switch (content) { |
||||
|
// 诊断类型
|
||||
|
case "精神分裂症": |
||||
|
return 1; |
||||
|
case "分裂情感性障碍": |
||||
|
return 2; |
||||
|
case "持久的妄想性障碍(偏执性精神病)": |
||||
|
return 3; |
||||
|
case "双相(情感)障碍": |
||||
|
return 4; |
||||
|
case "癫痫所致精神障碍": |
||||
|
return 5; |
||||
|
case "精神发育迟滞伴发精神障碍": |
||||
|
return 6; |
||||
|
case "重度抑郁发作": |
||||
|
return 7; |
||||
|
case "精神活性物质所致精神障碍": |
||||
|
return 8; |
||||
|
case "其他": |
||||
|
return 9; |
||||
|
// 危险性评估等级
|
||||
|
case "0级": |
||||
|
return 0; |
||||
|
case "1级": |
||||
|
return 1; |
||||
|
case "2级": |
||||
|
return 2; |
||||
|
case "3级": |
||||
|
return 3; |
||||
|
case "4级": |
||||
|
return 4; |
||||
|
case "5级": |
||||
|
return 5; |
||||
|
} |
||||
|
} |
||||
|
return Converter.super.convertToJavaData(context); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,51 @@ |
|||||
|
package com.epmet.excel.converter; |
||||
|
|
||||
|
import com.alibaba.excel.converters.Converter; |
||||
|
import com.alibaba.excel.converters.ReadConverterContext; |
||||
|
import com.alibaba.excel.enums.CellDataTypeEnum; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-社区矫正转换器 |
||||
|
*/ |
||||
|
public class LingShanSpecialCrowdSqjzConverter implements Converter<Integer> { |
||||
|
@Override |
||||
|
public CellDataTypeEnum supportExcelTypeKey() { |
||||
|
return CellDataTypeEnum.STRING; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Class<?> supportJavaTypeKey() { |
||||
|
return Integer.class; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Integer convertToJavaData(ReadConverterContext<?> context) throws Exception { |
||||
|
Object content = context.getReadCellData().getStringValue(); |
||||
|
if (content instanceof String) { |
||||
|
switch ((String) content) { |
||||
|
// 矫正类型
|
||||
|
case "管制": |
||||
|
return 1; |
||||
|
case "缓刑": |
||||
|
return 2; |
||||
|
case "假释": |
||||
|
return 3; |
||||
|
case "暂予监外执行": |
||||
|
return 4; |
||||
|
case "剥夺政治权利": |
||||
|
return 5; |
||||
|
// 接受方式
|
||||
|
case "自行报到": |
||||
|
return 1; |
||||
|
case "狱所押送": |
||||
|
return 2; |
||||
|
case "当庭交接": |
||||
|
return 3; |
||||
|
case "其他": |
||||
|
return 4; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
return Converter.super.convertToJavaData(context); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,73 @@ |
|||||
|
package com.epmet.excel.data; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.epmet.excel.converter.LingShanSpecialCrowdIsOrNotConverter; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 安置帮教 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LingShanSpecialCrowdDetailAzbjExcelData extends LingShanSpecialCrowdDetailBaseExcelData { |
||||
|
|
||||
|
/** |
||||
|
* 原罪名 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*原罪名") |
||||
|
@NotBlank(message = "原罪名不能为空") |
||||
|
private String originalCharge; |
||||
|
|
||||
|
/** |
||||
|
* 释放日期 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*释放日期") |
||||
|
@NotNull(message = "释放日期不能为空") |
||||
|
private Date releaseDate; |
||||
|
|
||||
|
/** |
||||
|
* 原判刑期(单位:月) |
||||
|
*/ |
||||
|
@ExcelProperty(value = "原判刑期(单位:月)") |
||||
|
private Date originPrisonTerm; |
||||
|
|
||||
|
/** |
||||
|
* 是否累犯。0否,1是 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否累犯", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer recidivismFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否安置。0否,1是 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否安置", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer emplacementFlag; |
||||
|
|
||||
|
/** |
||||
|
* 安置日期 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "安置日期") |
||||
|
private Date emplacementDate; |
||||
|
|
||||
|
/** |
||||
|
* 安置帮教情况 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "安置帮教情况") |
||||
|
private String emplacementInfo; |
||||
|
|
||||
|
/** |
||||
|
* 是否注销 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否注销", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer canceledFlag; |
||||
|
|
||||
|
/** |
||||
|
* 注销原因 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "注销原因") |
||||
|
private String canceledReason; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.excel.data; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LingShanSpecialCrowdDetailBaseExcelData { |
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*姓名") |
||||
|
@NotBlank(message = "姓名不能为空") |
||||
|
private String name; |
||||
|
/** |
||||
|
* 证件号 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*身份证号") |
||||
|
@NotBlank(message = "身份证号不能为空") |
||||
|
private String idCard; |
||||
|
|
||||
|
/** |
||||
|
* 错误信息 |
||||
|
*/ |
||||
|
private String errorInfo; |
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.excel.data; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import com.epmet.excel.converter.LingShanSpecialCrowdIsOrNotConverter; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-特殊人群-戒毒人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LingshanSpecialCrowdDetailJdryExcelData extends LingShanSpecialCrowdDetailBaseExcelData { |
||||
|
|
||||
|
/** |
||||
|
* 有无犯罪史 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*有无犯罪史", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
@NotNull(message = "有无犯罪史不能为空") |
||||
|
private Integer criminalHistoryFlag; |
||||
|
|
||||
|
/** |
||||
|
* 有无复吸史 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*有无复吸史", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
@NotNull(message = "有无复吸史不能为空") |
||||
|
private Integer drugRepetitionFlag; |
||||
|
|
||||
|
/** |
||||
|
* 初次发现日期 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "初次发现日期") |
||||
|
private Date firstDiscoveryDate; |
||||
|
|
||||
|
/** |
||||
|
* 管控人姓名 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "管控人姓名") |
||||
|
private String controllerName; |
||||
|
|
||||
|
/** |
||||
|
* 管控人联系方式 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "管控人联系方式") |
||||
|
private String controllerContact; |
||||
|
|
||||
|
/** |
||||
|
* 帮扶人姓名 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "帮扶人姓名") |
||||
|
private String helperName; |
||||
|
|
||||
|
/** |
||||
|
* 帮扶人联系方式 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "帮扶人联系方式") |
||||
|
private String helperContact; |
||||
|
|
||||
|
/** |
||||
|
* 是否脱管 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否脱管", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer detachedFlag; |
||||
|
|
||||
|
/** |
||||
|
* 脱管原因 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "脱管原因") |
||||
|
private String detachedReason; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
package com.epmet.excel.data; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.epmet.excel.converter.LingShanSpecialCrowdIsOrNotConverter; |
||||
|
import com.epmet.excel.converter.LingShanSpecialCrowdJzhzConverter; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-特殊人群-精障患者 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LingshanSpecialCrowdDetailJzhzExcelData extends LingShanSpecialCrowdDetailBaseExcelData { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 有无肇事肇祸史 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*有无肇事肇祸史", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
@NotNull(message = "有无肇事肇祸史不能为空") |
||||
|
private Integer causeTroubleHistoryFlag; |
||||
|
|
||||
|
/** |
||||
|
* 肇事肇祸次数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*肇事肇祸次数") |
||||
|
@NotNull(message = "肇事肇祸次数不能为空") |
||||
|
private Integer causeTroubleTimes; |
||||
|
|
||||
|
/** |
||||
|
* 目前诊断类型。1精神分裂症,2分裂情感性障碍,3持久的妄想性障碍(偏执性精神病),4双相(情感)障碍,5癫痫所致精神障碍,6精神发育迟滞伴发精神障碍,7重度抑郁发作,8精神活性物质所致精神障碍,9其他 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "目前诊断类型", converter = LingShanSpecialCrowdJzhzConverter.class) |
||||
|
private Integer currentDiagnosis; |
||||
|
|
||||
|
/** |
||||
|
* 危险性评估等级。0,1,2,3,4,5 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "危险性评估等级", converter = LingShanSpecialCrowdJzhzConverter.class) |
||||
|
private Integer dangerousClass; |
||||
|
|
||||
|
/** |
||||
|
* 是否具备外出能力 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否具备外出能力", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer canGoOutFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否有暴力倾向 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否有暴力倾向", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer violenceFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否落实监管补助 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否落实监管补助", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer allowanceFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否纳入低保 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否纳入低保", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer subsistenceFlag; |
||||
|
|
||||
|
/** |
||||
|
* 监护人姓名 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "监护人姓名") |
||||
|
private String guardianName; |
||||
|
|
||||
|
/** |
||||
|
* 监护人联系方式 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "监护人联系方式") |
||||
|
private String guardianContact; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,92 @@ |
|||||
|
package com.epmet.excel.data; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import com.epmet.excel.converter.LingShanSpecialCrowdIsOrNotConverter; |
||||
|
import com.epmet.excel.converter.LingShanSpecialCrowdSqjzConverter; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-特殊人群-社区矫正 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LingshanSpecialCrowdDetailSqjzExcelData extends LingShanSpecialCrowdDetailBaseExcelData { |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 矫正类型。1.管制,2缓刑,3假释,4暂予监外执行,5剥夺政治权利 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*矫正类型", converter = LingShanSpecialCrowdSqjzConverter.class) |
||||
|
@NotNull(message = "矫正类型不能为空") |
||||
|
private Integer rectificateType; |
||||
|
|
||||
|
/** |
||||
|
* 矫正开始日期 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "矫正开始日期") |
||||
|
private Date rectificateStartDate; |
||||
|
|
||||
|
/** |
||||
|
* 矫正结束日期 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "矫正结束日期") |
||||
|
private Date rectificateEndDate; |
||||
|
|
||||
|
/** |
||||
|
* 原羁押场所 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "原羁押场所") |
||||
|
private String originDetainAddress; |
||||
|
|
||||
|
/** |
||||
|
* 原罪名 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "原罪名") |
||||
|
private String originalCharge; |
||||
|
|
||||
|
/** |
||||
|
* 接受方式。1.自行报到,2狱所押送,3当庭交接,4其他 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "接受方式", converter = LingShanSpecialCrowdSqjzConverter.class) |
||||
|
private Integer receiveWay; |
||||
|
|
||||
|
/** |
||||
|
* 矫正情况说明 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "矫正情况说明") |
||||
|
private String rectificateInfo; |
||||
|
|
||||
|
/** |
||||
|
* 是否脱管 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否脱管", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer detachedFlag; |
||||
|
|
||||
|
/** |
||||
|
* 脱管原因 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "脱管原因") |
||||
|
private String detachedReason; |
||||
|
|
||||
|
/** |
||||
|
* 是否注销 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否注销" , converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer canceledFlag; |
||||
|
|
||||
|
/** |
||||
|
* 注销原因 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "注销原因") |
||||
|
private String canceledReason; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,77 @@ |
|||||
|
package com.epmet.excel.data; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import com.epmet.excel.converter.LingShanSpecialCrowdIsOrNotConverter; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-特殊人群-信访人员 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-04-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LingshanSpecialCrowdDetailXfryExcelData extends LingShanSpecialCrowdDetailBaseExcelData { |
||||
|
|
||||
|
/** |
||||
|
* 反映问题 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*反映问题") |
||||
|
@NotBlank(message = "反映问题不能为空") |
||||
|
private String problem; |
||||
|
|
||||
|
/** |
||||
|
* 稳控措施 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "*稳控措施") |
||||
|
@NotBlank(message = "稳控措施不能为空") |
||||
|
private String stableControlMeasurement; |
||||
|
|
||||
|
/** |
||||
|
* 是否多次上访 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否多次上访", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer multipleFlag; |
||||
|
|
||||
|
/** |
||||
|
* 是否在当地 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "是否在当地", converter = LingShanSpecialCrowdIsOrNotConverter.class) |
||||
|
private Integer localFlag; |
||||
|
|
||||
|
/** |
||||
|
* 分管领导 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "分管领导") |
||||
|
private String branchLeader; |
||||
|
|
||||
|
/** |
||||
|
* 分管领导联系方式 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "分管领导联系方式") |
||||
|
private String branchLeaderContact; |
||||
|
|
||||
|
/** |
||||
|
* 负责人 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "负责人") |
||||
|
private String principal; |
||||
|
|
||||
|
/** |
||||
|
* 负责人联系方式 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "负责人联系方式") |
||||
|
private String principalContact; |
||||
|
|
||||
|
/** |
||||
|
* 稳控人员名单 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "稳控人员名单") |
||||
|
private String stableControlerList; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,351 @@ |
|||||
|
package com.epmet.excel.handler; |
||||
|
|
||||
|
import com.alibaba.excel.context.AnalysisContext; |
||||
|
import com.alibaba.excel.event.AnalysisEventListener; |
||||
|
import com.alibaba.excel.metadata.data.ReadCellData; |
||||
|
import com.alibaba.excel.read.listener.ReadListener; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
||||
|
import com.epmet.common.token.util.TokenUtil; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import com.epmet.commons.tools.distributedlock.DistributedLock; |
||||
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.exception.ValidateException; |
||||
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
||||
|
import com.epmet.commons.tools.utils.PidUtils; |
||||
|
import com.epmet.commons.tools.utils.SpringContextUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailBaseEntity; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdPersonEntity; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdPersonTypeEntity; |
||||
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
||||
|
import com.epmet.excel.data.LingShanSpecialCrowdDetailBaseExcelData; |
||||
|
import com.epmet.service.LingShanSpecialCrowdService; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.apache.commons.collections4.ListUtils; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.redisson.api.RLock; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 灵山大屏-抽象的导入excel监听器 |
||||
|
*/ |
||||
|
public abstract class AbstractLingShanSpecialCrowdExcelImportListener<T extends LingShanSpecialCrowdDetailBaseExcelData, E extends LingshanSpecialCrowdDetailBaseEntity> |
||||
|
extends AnalysisEventListener<T> { |
||||
|
|
||||
|
/** |
||||
|
* @description: 分布式锁 |
||||
|
* @param null: |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 11:43 PM |
||||
|
*/ |
||||
|
private DistributedLock distributedLock; |
||||
|
|
||||
|
/** |
||||
|
* 按批次保存,单次最大数据量 |
||||
|
*/ |
||||
|
private static final Integer MAX_BATCH_SIZE = 500; |
||||
|
|
||||
|
/** |
||||
|
* 表头应有行数 |
||||
|
*/ |
||||
|
private Integer maxHeadRowNum; |
||||
|
|
||||
|
/** |
||||
|
* 文件的表头中应当有哪些列 |
||||
|
*/ |
||||
|
private List<String> headerZhList; |
||||
|
|
||||
|
/** |
||||
|
* 当前表头读到了第几行 |
||||
|
*/ |
||||
|
private Integer currentHeadRowNum = 0; |
||||
|
|
||||
|
/** |
||||
|
* 原始数据列表 |
||||
|
*/ |
||||
|
private List<T> originDatas = new ArrayList<>(); |
||||
|
|
||||
|
/** |
||||
|
* 错误数据列表 |
||||
|
*/ |
||||
|
private List<T> errorDatas = new ArrayList<>(); |
||||
|
|
||||
|
/** |
||||
|
* 正确数据 |
||||
|
*/ |
||||
|
private List<E> correctDatas = new ArrayList<>(); |
||||
|
|
||||
|
private List<LingshanSpecialCrowdPersonEntity> persons = new ArrayList<>(); |
||||
|
private List<LingshanSpecialCrowdPersonTypeEntity> personTypes = new ArrayList<>(); |
||||
|
|
||||
|
protected LingShanSpecialCrowdService lingShanSpecialCrowdService; |
||||
|
|
||||
|
private Class<E> entityClass; |
||||
|
|
||||
|
private CustomerStaffInfoCacheResult currentStaffInfo; |
||||
|
|
||||
|
private LingShanSpecialCrowdTypeEnums specialCrowdType; |
||||
|
|
||||
|
public AbstractLingShanSpecialCrowdExcelImportListener() { |
||||
|
lingShanSpecialCrowdService = SpringContextUtils.getBean(LingShanSpecialCrowdService.class); |
||||
|
distributedLock = SpringContextUtils.getBean(DistributedLock.class); |
||||
|
currentStaffInfo = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); |
||||
|
maxHeadRowNum = setMaxHeadRowNum(); |
||||
|
headerZhList = setHeaderZhList(); |
||||
|
specialCrowdType = getSpecialCrowdType(); |
||||
|
entityClass = getEntityClass(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param headMap: |
||||
|
* @param context: |
||||
|
* @return |
||||
|
* @description: 表头回调函数,此处做统一表头校验,确认文件内容与当前要导入的数据的字段一致,防止导错类型. |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 10:42 AM |
||||
|
*/ |
||||
|
@Override |
||||
|
public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
||||
|
// super.invokeHeadMap(headMap, context);
|
||||
|
|
||||
|
if (maxHeadRowNum == null || CollectionUtils.isEmpty(headerZhList)) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "【灵山街道】社会维稳数据导入-子类未设置header行数以及header字段列表。"); |
||||
|
} |
||||
|
|
||||
|
if ((++currentHeadRowNum).equals(maxHeadRowNum)) { |
||||
|
// 如果是表头最后一行,则校验表头
|
||||
|
|
||||
|
Collection<String> headersFromFile = headMap.values(); |
||||
|
// 2次循环,双向校验
|
||||
|
for (String headerZh : headersFromFile) { |
||||
|
if (StringUtils.isNotBlank(headerZh) && !headerZhList.contains(headerZh)) { |
||||
|
throw new EpmetException("请确认表头内容与模板一致"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
for (String headerZh : headerZhList) { |
||||
|
if (StringUtils.isNotBlank(headerZh) && !headersFromFile.contains(headerZh)) { |
||||
|
throw new EpmetException("请确认表头内容与模板一致"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 行读取回调函数 |
||||
|
* @param row: |
||||
|
* @param context: |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 11:44 PM |
||||
|
*/ |
||||
|
@Override |
||||
|
public void invoke(T row, AnalysisContext context) { |
||||
|
try { |
||||
|
ValidatorUtils.validateEntity(row); |
||||
|
} catch ( |
||||
|
ValidateException e) { |
||||
|
// 加入到错误记录中去
|
||||
|
errorDatas.add(row); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
originDatas.add(row); |
||||
|
|
||||
|
if (originDatas.size() >= MAX_BATCH_SIZE) { |
||||
|
// 满足了一批次的数量,执行保存
|
||||
|
saveBatchWithLock(); |
||||
|
clear(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void doAfterAllAnalysed(AnalysisContext context) { |
||||
|
if (originDatas.size() > 0) { |
||||
|
saveBatchWithLock(); |
||||
|
clear(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @description: 批量保存,带锁的。因为要在Listener中过滤出哪些数据不能导入,返回给前端。 |
||||
|
* 所以需要再lisener中做批量检查,然后批量保存。过程需要一点时间,为了防止并发问题,加分布式锁。以agencyId为粒度。 |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 4:33 PM |
||||
|
*/ |
||||
|
private void saveBatchWithLock() { |
||||
|
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
||||
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, EpmetRequestHolder.getLoginUserId()); |
||||
|
RLock lock = distributedLock.getLock(String.format("{}:{}:{}", "lock:specialcrowd", customerId, staffInfo.getAgencyId())); |
||||
|
try { |
||||
|
this.saveBatch(); |
||||
|
} catch (Exception e) { |
||||
|
throw e; |
||||
|
} finally { |
||||
|
if (lock != null && lock.isHeldByCurrentThread()) { |
||||
|
lock.unlock(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @description: 批量保存 |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 3:42 PM |
||||
|
*/ |
||||
|
protected void saveBatch() { |
||||
|
String orgIdPath = PidUtils.convertPid2OrgIdPath(currentStaffInfo.getFromOrgId(), currentStaffInfo.getAgencyPIds()); |
||||
|
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
||||
|
Date now = new Date(); |
||||
|
Iterator<T> it = getOriginDatas().iterator(); |
||||
|
for (; it.hasNext(); ) { |
||||
|
T row = it.next(); |
||||
|
String errorInfo = lingShanSpecialCrowdService.validate(row); |
||||
|
if (StringUtils.isNotBlank(errorInfo)) { |
||||
|
row.setErrorInfo(errorInfo); |
||||
|
errorDatas.add(row); |
||||
|
it.remove(); |
||||
|
} else { |
||||
|
persons.add(new LingshanSpecialCrowdPersonEntity(IdWorker.getIdStr(), customerId, orgIdPath, row.getName(), row.getIdCard(), |
||||
|
"0", 0, now, currentStaffInfo.getStaffId(), now, currentStaffInfo.getStaffId())); |
||||
|
personTypes.add(new LingshanSpecialCrowdPersonTypeEntity(IdWorker.getIdStr(), customerId, orgIdPath, row.getIdCard(), specialCrowdType.getType(), |
||||
|
"0", 0, now, currentStaffInfo.getStaffId(), now, currentStaffInfo.getStaffId())); |
||||
|
|
||||
|
E e = ConvertUtils.sourceToTarget(row, entityClass); |
||||
|
e.setCustomerId(customerId); |
||||
|
e.setOrgIdPath(orgIdPath); |
||||
|
e.setId(IdWorker.getIdStr()); |
||||
|
e.setRevision(0); |
||||
|
e.setCreatedTime(now); |
||||
|
e.setUpdatedTime(now); |
||||
|
e.setCreatedBy(currentStaffInfo.getStaffId()); |
||||
|
e.setUpdatedBy(currentStaffInfo.getStaffId()); |
||||
|
e.setDelFlag("0"); |
||||
|
correctDatas.add(e); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 执行保存
|
||||
|
if(!CollectionUtils.isEmpty(persons) && !CollectionUtils.isEmpty(personTypes)) { |
||||
|
savePersonAndTypes(persons, personTypes); |
||||
|
} |
||||
|
|
||||
|
// 将错误的数据处理 todo
|
||||
|
|
||||
|
// 保存人群详情数据
|
||||
|
saveBatchCallback(correctDatas); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 保存人员信息,人员类型 |
||||
|
* @param persons: |
||||
|
* @param personTypes: |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/19 11:06 AM |
||||
|
*/ |
||||
|
private void savePersonAndTypes(List<LingshanSpecialCrowdPersonEntity> persons, List<LingshanSpecialCrowdPersonTypeEntity> personTypes) { |
||||
|
lingShanSpecialCrowdService.savePersonAndTypes(persons, personTypes); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @description: 清理数据 |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 4:41 PM |
||||
|
*/ |
||||
|
protected void clear() { |
||||
|
originDatas.clear(); |
||||
|
errorDatas.clear(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 获取读取到的原始数据 |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 11:21 PM |
||||
|
*/ |
||||
|
protected List<T> getOriginDatas() { |
||||
|
return originDatas; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 获取错误数据行 |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 11:22 PM |
||||
|
*/ |
||||
|
protected List<T> getErrorDatas() { |
||||
|
return errorDatas; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description: 获取正确数据行 |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 11:22 PM |
||||
|
*/ |
||||
|
protected List<E> getCorrectDatas() { |
||||
|
return correctDatas; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @description: 批量保存,子类实现 |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 4:32 PM |
||||
|
*/ |
||||
|
abstract void saveBatchCallback(List<E> entities); |
||||
|
|
||||
|
/** |
||||
|
* @description: 设置表头行数 |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 11:22 PM |
||||
|
*/ |
||||
|
abstract Integer setMaxHeadRowNum(); |
||||
|
|
||||
|
/** |
||||
|
* @description: 设置header字段列表。子类应当调用该方法设置该值 |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 11:21 PM |
||||
|
*/ |
||||
|
abstract List<String> setHeaderZhList(); |
||||
|
|
||||
|
/** |
||||
|
* @description: 获取entity的class,用于数据拷贝 |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/19 9:47 AM |
||||
|
*/ |
||||
|
abstract Class<E> getEntityClass(); |
||||
|
|
||||
|
/** |
||||
|
* @description: 指定特殊人群类型 |
||||
|
* @param : |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/19 11:00 AM |
||||
|
*/ |
||||
|
abstract LingShanSpecialCrowdTypeEnums getSpecialCrowdType(); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
package com.epmet.excel.handler; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.context.AnalysisContext; |
||||
|
import com.epmet.commons.tools.exception.ValidateException; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailAzbjEntity; |
||||
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
||||
|
import com.epmet.excel.data.LingShanSpecialCrowdDetailAzbjExcelData; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.apache.poi.ss.formula.functions.T; |
||||
|
|
||||
|
import java.io.File; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.Iterator; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-安置帮教导入 |
||||
|
*/ |
||||
|
public class LingShanSpecialCrowdAzbjExcelImportListener |
||||
|
extends AbstractLingShanSpecialCrowdExcelImportListener<LingShanSpecialCrowdDetailAzbjExcelData, LingshanSpecialCrowdDetailAzbjEntity> { |
||||
|
|
||||
|
@Override |
||||
|
Integer setMaxHeadRowNum() { |
||||
|
return 1; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
List<String> setHeaderZhList() { |
||||
|
return Arrays.asList("*姓名", "*身份证号", "*原罪名", "*释放日期", "原判刑期(单位:月)", "是否累犯", "是否安置", "安置日期", "安置帮教情况", "是否注销", "注销原因"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
Class<LingshanSpecialCrowdDetailAzbjEntity> getEntityClass() { |
||||
|
return LingshanSpecialCrowdDetailAzbjEntity.class; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
void saveBatchCallback(List<LingshanSpecialCrowdDetailAzbjEntity> entities) { |
||||
|
lingShanSpecialCrowdService.saveBatch(entities, new LingshanSpecialCrowdDetailAzbjEntity()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
LingShanSpecialCrowdTypeEnums getSpecialCrowdType() { |
||||
|
return LingShanSpecialCrowdTypeEnums.AZBJ; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.excel.handler; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.context.AnalysisContext; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailAzbjEntity; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailJdryEntity; |
||||
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
||||
|
import com.epmet.excel.data.LingshanSpecialCrowdDetailJdryExcelData; |
||||
|
|
||||
|
import java.io.File; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-戒毒导入 |
||||
|
*/ |
||||
|
public class LingShanSpecialCrowdJieduExcelImportListener |
||||
|
extends AbstractLingShanSpecialCrowdExcelImportListener<LingshanSpecialCrowdDetailJdryExcelData, LingshanSpecialCrowdDetailJdryEntity> { |
||||
|
|
||||
|
@Override |
||||
|
Integer setMaxHeadRowNum() { |
||||
|
return 1; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
List<String> setHeaderZhList() { |
||||
|
return Arrays.asList("*姓名", "*身份证号", "*有无犯罪史", "*有无复吸史", "初次发现日期", "管控人姓名", "管控人联系方式", "帮扶人姓名", "帮扶人联系方式", "是否脱管", "脱管原因"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
Class<LingshanSpecialCrowdDetailJdryEntity> getEntityClass() { |
||||
|
return LingshanSpecialCrowdDetailJdryEntity.class; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
void saveBatchCallback(List<LingshanSpecialCrowdDetailJdryEntity> entities) { |
||||
|
lingShanSpecialCrowdService.saveBatch(entities, new LingshanSpecialCrowdDetailJdryEntity()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
LingShanSpecialCrowdTypeEnums getSpecialCrowdType() { |
||||
|
return LingShanSpecialCrowdTypeEnums.JDRY; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,46 @@ |
|||||
|
package com.epmet.excel.handler; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.context.AnalysisContext; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailJdryEntity; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailJzhzEntity; |
||||
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
||||
|
import com.epmet.excel.data.LingshanSpecialCrowdDetailJzhzExcelData; |
||||
|
|
||||
|
import java.io.File; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-精神障碍患者导入 |
||||
|
*/ |
||||
|
public class LingShanSpecialCrowdJingZhangExcelImportListener |
||||
|
extends AbstractLingShanSpecialCrowdExcelImportListener<LingshanSpecialCrowdDetailJzhzExcelData, LingshanSpecialCrowdDetailJzhzEntity> { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
void saveBatchCallback(List<LingshanSpecialCrowdDetailJzhzEntity> entities) { |
||||
|
lingShanSpecialCrowdService.saveBatch(entities, new LingshanSpecialCrowdDetailJzhzEntity()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
Integer setMaxHeadRowNum() { |
||||
|
return 1; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
List<String> setHeaderZhList() { |
||||
|
return Arrays.asList("*姓名", "*身份证号", "*有无肇事肇祸史", "*肇事肇祸次数", "目前诊断类型", "危险性评估等级", "是否具备外出能力", "是否有暴力倾向", "是否落实监管补助", "是否纳入低保", "监护人姓名", "监护人联系方式"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
Class<LingshanSpecialCrowdDetailJzhzEntity> getEntityClass() { |
||||
|
return LingshanSpecialCrowdDetailJzhzEntity.class; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
LingShanSpecialCrowdTypeEnums getSpecialCrowdType() { |
||||
|
return LingShanSpecialCrowdTypeEnums.JZHZ; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.excel.handler; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.context.AnalysisContext; |
||||
|
import com.epmet.dao.LingshanSpecialCrowdDetailSqjzDao; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailJzhzEntity; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailSqjzEntity; |
||||
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
||||
|
import com.epmet.excel.data.LingshanSpecialCrowdDetailSqjzExcelData; |
||||
|
|
||||
|
import java.io.File; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-矫正人员导入 |
||||
|
*/ |
||||
|
public class LingShanSpecialCrowdSqjzExcelImportListener |
||||
|
extends AbstractLingShanSpecialCrowdExcelImportListener<LingshanSpecialCrowdDetailSqjzExcelData, LingshanSpecialCrowdDetailSqjzEntity> { |
||||
|
|
||||
|
@Override |
||||
|
void saveBatchCallback(List<LingshanSpecialCrowdDetailSqjzEntity> entities) { |
||||
|
lingShanSpecialCrowdService.saveBatch(entities, new LingshanSpecialCrowdDetailSqjzEntity()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
Integer setMaxHeadRowNum() { |
||||
|
return 1; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
List<String> setHeaderZhList() { |
||||
|
return Arrays.asList("*姓名", "*身份证号", "*矫正类型", "矫正开始日期", "矫正结束日期", "原羁押场所", "原罪名", "接受方式", "矫正情况说明", "是否脱管", "脱管原因", "是否注销", "注销原因"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
Class<LingshanSpecialCrowdDetailSqjzEntity> getEntityClass() { |
||||
|
return LingshanSpecialCrowdDetailSqjzEntity.class; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
LingShanSpecialCrowdTypeEnums getSpecialCrowdType() { |
||||
|
return LingShanSpecialCrowdTypeEnums.SQJZ; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,46 @@ |
|||||
|
package com.epmet.excel.handler; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.context.AnalysisContext; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailJzhzEntity; |
||||
|
import com.epmet.entity.LingshanSpecialCrowdDetailXfryEntity; |
||||
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
||||
|
import com.epmet.excel.data.LingshanSpecialCrowdDetailXfryExcelData; |
||||
|
|
||||
|
import java.io.File; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 灵山-信访人员导入 |
||||
|
*/ |
||||
|
public class LingShanSpecialCrowdXinFangExcelImportListener |
||||
|
extends AbstractLingShanSpecialCrowdExcelImportListener<LingshanSpecialCrowdDetailXfryExcelData, LingshanSpecialCrowdDetailXfryEntity> { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
void saveBatchCallback(List<LingshanSpecialCrowdDetailXfryEntity> entities) { |
||||
|
lingShanSpecialCrowdService.saveBatch(entities, new LingshanSpecialCrowdDetailXfryEntity()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
Integer setMaxHeadRowNum() { |
||||
|
return 1; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
List<String> setHeaderZhList() { |
||||
|
return Arrays.asList("*姓名", "*身份证号", "*反映问题", "*稳控措施", "是否多次上访", "是否在当地", "分管领导", "分管领导联系方式", "负责人", "负责人联系方式", "稳控人员名单"); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
Class<LingshanSpecialCrowdDetailXfryEntity> getEntityClass() { |
||||
|
return LingshanSpecialCrowdDetailXfryEntity.class; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
LingShanSpecialCrowdTypeEnums getSpecialCrowdType() { |
||||
|
return LingShanSpecialCrowdTypeEnums.XFRY; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.entity.*; |
||||
|
import com.epmet.excel.data.LingShanSpecialCrowdDetailAzbjExcelData; |
||||
|
import com.epmet.excel.data.LingShanSpecialCrowdDetailBaseExcelData; |
||||
|
import org.apache.poi.ss.formula.functions.T; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 灵山特殊人群service |
||||
|
*/ |
||||
|
public interface LingShanSpecialCrowdService { |
||||
|
|
||||
|
/** |
||||
|
* @description: 导入特殊人群 |
||||
|
* @param crowdCategory: |
||||
|
* @param fileSavePath: |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 5:42 PM |
||||
|
*/ |
||||
|
void importSpecialCrowd(String crowdCategory, String fileSavePath); |
||||
|
|
||||
|
/** |
||||
|
* @description: 数据校验 |
||||
|
* @param row: |
||||
|
* @returns |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 4:49 PM |
||||
|
*/ |
||||
|
String validate(LingShanSpecialCrowdDetailBaseExcelData row); |
||||
|
|
||||
|
void savePersonAndTypes(List<LingshanSpecialCrowdPersonEntity> persons, List<LingshanSpecialCrowdPersonTypeEntity> personTypes); |
||||
|
|
||||
|
/** |
||||
|
* @description: 安置帮教-导入 |
||||
|
* @return |
||||
|
* @author: WangXianZhang |
||||
|
* @date: 2023/4/18 4:11 PM |
||||
|
*/ |
||||
|
void saveBatch(List<LingshanSpecialCrowdDetailAzbjEntity> entities, LingshanSpecialCrowdDetailAzbjEntity e); |
||||
|
void saveBatch(List<LingshanSpecialCrowdDetailJdryEntity> entities, LingshanSpecialCrowdDetailJdryEntity e); |
||||
|
void saveBatch(List<LingshanSpecialCrowdDetailJzhzEntity> entities, LingshanSpecialCrowdDetailJzhzEntity e); |
||||
|
void saveBatch(List<LingshanSpecialCrowdDetailSqjzEntity> entities, LingshanSpecialCrowdDetailSqjzEntity e); |
||||
|
void saveBatch(List<LingshanSpecialCrowdDetailXfryEntity> entities, LingshanSpecialCrowdDetailXfryEntity e); |
||||
|
} |
||||
@ -0,0 +1,163 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.converters.Converter; |
||||
|
import com.alibaba.excel.converters.ReadConverterContext; |
||||
|
import com.alibaba.excel.enums.CellDataTypeEnum; |
||||
|
import com.alibaba.excel.read.metadata.ReadSheet; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
||||
|
import com.epmet.dao.*; |
||||
|
import com.epmet.entity.*; |
||||
|
import com.epmet.enums.LingShanSpecialCrowdTypeEnums; |
||||
|
import com.epmet.excel.data.*; |
||||
|
import com.epmet.excel.handler.*; |
||||
|
import com.epmet.service.LingShanSpecialCrowdService; |
||||
|
import org.apache.commons.collections4.ListUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.io.File; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 灵山特殊人群service |
||||
|
*/ |
||||
|
@Service |
||||
|
public class LingShanSpecialCrowdServiceImpl implements LingShanSpecialCrowdService { |
||||
|
|
||||
|
@Autowired |
||||
|
private LingshanSpecialCrowdPersonDao specialCrowdPersonDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private LingshanSpecialCrowdPersonTypeDao specialCrowdPersonTypeDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private LingshanSpecialCrowdDetailAzbjDao specialCrowdDetailAzbjDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private LingshanSpecialCrowdDetailSqjzDao specialCrowdDetailSqjzDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private LingshanSpecialCrowdDetailJdryDao specialCrowdDetailJdryDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private LingshanSpecialCrowdDetailJzhzDao specialCrowdDetailJzhzDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private LingshanSpecialCrowdDetailXfryDao specialCrowdDetailXfryDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcResiUserDao icResiUserDao; |
||||
|
|
||||
|
@Override |
||||
|
public void importSpecialCrowd(String crowdCategory, String fileSavePath) { |
||||
|
Class<? extends LingShanSpecialCrowdDetailBaseExcelData> excelDataClass; |
||||
|
AbstractLingShanSpecialCrowdExcelImportListener listener; |
||||
|
LingShanSpecialCrowdTypeEnums specialCrowdTypeEnum; |
||||
|
|
||||
|
if (LingShanSpecialCrowdTypeEnums.AZBJ.getType().equals(crowdCategory)) { |
||||
|
listener = new LingShanSpecialCrowdAzbjExcelImportListener(); |
||||
|
excelDataClass = LingShanSpecialCrowdDetailAzbjExcelData.class; |
||||
|
specialCrowdTypeEnum = LingShanSpecialCrowdTypeEnums.AZBJ; |
||||
|
} else if (LingShanSpecialCrowdTypeEnums.SQJZ.getType().equals(crowdCategory)) { |
||||
|
listener = new LingShanSpecialCrowdSqjzExcelImportListener(); |
||||
|
excelDataClass = LingshanSpecialCrowdDetailSqjzExcelData.class; |
||||
|
specialCrowdTypeEnum = LingShanSpecialCrowdTypeEnums.SQJZ; |
||||
|
} else if (LingShanSpecialCrowdTypeEnums.JDRY.getType().equals(crowdCategory)) { |
||||
|
listener = new LingShanSpecialCrowdJieduExcelImportListener(); |
||||
|
excelDataClass = LingshanSpecialCrowdDetailJdryExcelData.class; |
||||
|
specialCrowdTypeEnum = LingShanSpecialCrowdTypeEnums.JDRY; |
||||
|
} else if (LingShanSpecialCrowdTypeEnums.JZHZ.getType().equals(crowdCategory)) { |
||||
|
listener = new LingShanSpecialCrowdJingZhangExcelImportListener(); |
||||
|
excelDataClass = LingshanSpecialCrowdDetailJzhzExcelData.class; |
||||
|
specialCrowdTypeEnum = LingShanSpecialCrowdTypeEnums.JZHZ; |
||||
|
} else if (LingShanSpecialCrowdTypeEnums.XFRY.getType().equals(crowdCategory)) { |
||||
|
listener = new LingShanSpecialCrowdXinFangExcelImportListener(); |
||||
|
excelDataClass = LingshanSpecialCrowdDetailXfryExcelData.class; |
||||
|
specialCrowdTypeEnum = LingShanSpecialCrowdTypeEnums.XFRY; |
||||
|
} else { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "【灵山街道-维稳】导入。不支持的人群类别:" + crowdCategory); |
||||
|
} |
||||
|
|
||||
|
// Execute reading
|
||||
|
// ReadSheet sheet = EasyExcel.readSheet(0).registerReadListener(listener).build();
|
||||
|
// EasyExcel.read(fileSavePath).build().read(sheet);
|
||||
|
|
||||
|
EasyExcel.read(fileSavePath, excelDataClass, listener) |
||||
|
.headRowNumber(specialCrowdTypeEnum.getHeaderRowNumber()) |
||||
|
.sheet(0) |
||||
|
.doRead(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String validate(LingShanSpecialCrowdDetailBaseExcelData row) { |
||||
|
String idCard = row.getIdCard(); |
||||
|
String name = row.getName(); |
||||
|
|
||||
|
IcResiUserEntity resiEntity = icResiUserDao.selectResiUserEntityByIdCard(idCard, EpmetRequestHolder.getLoginUserCustomerId()); |
||||
|
if (resiEntity == null) { |
||||
|
// 居民不存在,报错
|
||||
|
return "居民信息不存在,请先维护居民基础信息。"; |
||||
|
} |
||||
|
if (!resiEntity.getName().equals(name)) { |
||||
|
return String.format("姓名信息与居民基础信息不一致。(在居民哭华总根据身份证号找到的居民姓名为:{})", name); |
||||
|
} |
||||
|
|
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void savePersonAndTypes(List<LingshanSpecialCrowdPersonEntity> persons, List<LingshanSpecialCrowdPersonTypeEntity> personTypes) { |
||||
|
List<List<LingshanSpecialCrowdPersonEntity>> personParts = ListUtils.partition(persons, 50); |
||||
|
List<List<LingshanSpecialCrowdPersonTypeEntity>> personTypeParts = ListUtils.partition(personTypes, 50); |
||||
|
|
||||
|
for (List<LingshanSpecialCrowdPersonEntity> p : personParts) { |
||||
|
specialCrowdPersonDao.saveOrUpdateManually(p); |
||||
|
} |
||||
|
for (List<LingshanSpecialCrowdPersonTypeEntity> p : personTypeParts) { |
||||
|
specialCrowdPersonTypeDao.saveOrUpdateManually(p); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void saveBatch(List<LingshanSpecialCrowdDetailAzbjEntity> entities, LingshanSpecialCrowdDetailAzbjEntity e) { |
||||
|
List<List<LingshanSpecialCrowdDetailAzbjEntity>> partition = ListUtils.partition(entities, 50); |
||||
|
for (List<LingshanSpecialCrowdDetailAzbjEntity> l : partition) { |
||||
|
specialCrowdDetailAzbjDao.saveBatchManually(l); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void saveBatch(List<LingshanSpecialCrowdDetailJdryEntity> entities, LingshanSpecialCrowdDetailJdryEntity e) { |
||||
|
List<List<LingshanSpecialCrowdDetailJdryEntity>> partition = ListUtils.partition(entities, 50); |
||||
|
for (List<LingshanSpecialCrowdDetailJdryEntity> l : partition) { |
||||
|
specialCrowdDetailJdryDao.saveBatchManually(l); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void saveBatch(List<LingshanSpecialCrowdDetailJzhzEntity> entities, LingshanSpecialCrowdDetailJzhzEntity e) { |
||||
|
List<List<LingshanSpecialCrowdDetailJzhzEntity>> partition = ListUtils.partition(entities, 50); |
||||
|
for (List<LingshanSpecialCrowdDetailJzhzEntity> l : partition) { |
||||
|
specialCrowdDetailJzhzDao.saveBatchManually(l); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void saveBatch(List<LingshanSpecialCrowdDetailSqjzEntity> entities, LingshanSpecialCrowdDetailSqjzEntity e) { |
||||
|
List<List<LingshanSpecialCrowdDetailSqjzEntity>> partition = ListUtils.partition(entities, 50); |
||||
|
for (List<LingshanSpecialCrowdDetailSqjzEntity> l : partition) { |
||||
|
specialCrowdDetailSqjzDao.saveBatchManually(l); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void saveBatch(List<LingshanSpecialCrowdDetailXfryEntity> entities, LingshanSpecialCrowdDetailXfryEntity e) { |
||||
|
List<List<LingshanSpecialCrowdDetailXfryEntity>> partition = ListUtils.partition(entities, 50); |
||||
|
for (List<LingshanSpecialCrowdDetailXfryEntity> l : partition) { |
||||
|
specialCrowdDetailXfryDao.saveBatchManually(l); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,57 @@ |
|||||
|
<?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.LingshanSpecialCrowdDetailAzbjDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.LingshanSpecialCrowdDetailAzbjEntity" id="lingshanSpecialCrowdDetailAzbjMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgIdPath" column="ORG_ID_PATH"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="originalCharge" column="ORIGINAL_CHARGE"/> |
||||
|
<result property="releaseDate" column="RELEASE_DATE"/> |
||||
|
<result property="originPrisonTerm" column="ORIGIN_PRISON_TERM"/> |
||||
|
<result property="recidivismFlag" column="RECIDIVISM_FLAG"/> |
||||
|
<result property="emplacementFlag" column="EMPLACEMENT_FLAG"/> |
||||
|
<result property="emplacementDate" column="EMPLACEMENT_DATE"/> |
||||
|
<result property="emplacementInfo" column="EMPLACEMENT_INFO"/> |
||||
|
<result property="canceledFlag" column="CANCELED_FLAG"/> |
||||
|
<result property="canceledReason" column="CANCELED_REASON"/> |
||||
|
<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> |
||||
|
|
||||
|
<update id="saveBatchManually"> |
||||
|
insert into lingshan_special_crowd_detail_azbj ( ID, CUSTOMER_ID, ORG_ID_PATH, ID_CARD, ORIGINAL_CHARGE, RELEASE_DATE |
||||
|
, ORIGIN_PRISON_TERM, RECIDIVISM_FLAG, EMPLACEMENT_FLAG, EMPLACEMENT_DATE |
||||
|
, EMPLACEMENT_INFO, CANCELED_FLAG, CANCELED_REASON, DEL_FLAG, REVISION |
||||
|
, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) |
||||
|
values |
||||
|
<foreach collection="asbjList" item="item" separator=","> |
||||
|
( #{item.id}, #{item.customerId}, #{item.orgIdPath}, #{item.idCard}, #{item.originalCharge}, |
||||
|
#{item.releaseDate},#{item.originPrisonTerm},#{item.recidivismFlag},#{item.emplacementFlag}, |
||||
|
#{item.emplacementDate}, #{item.emplacementInfo}, #{item.canceledFlag}, #{item.canceledReason}, #{item.delFlag}, |
||||
|
#{item.revision}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime} |
||||
|
) |
||||
|
</foreach> |
||||
|
on duplicate key update ORG_ID_PATH = values(ORG_ID_PATH) |
||||
|
, ID_CARD = values(ID_CARD) |
||||
|
, ORIGINAL_CHARGE = values(ORIGINAL_CHARGE) |
||||
|
, RELEASE_DATE = values(RELEASE_DATE) |
||||
|
, ORIGIN_PRISON_TERM = values(ORIGIN_PRISON_TERM) |
||||
|
, RECIDIVISM_FLAG = values(RECIDIVISM_FLAG) |
||||
|
, EMPLACEMENT_FLAG = values(EMPLACEMENT_FLAG) |
||||
|
, EMPLACEMENT_DATE = values(EMPLACEMENT_DATE) |
||||
|
, EMPLACEMENT_INFO = values(EMPLACEMENT_INFO) |
||||
|
, CANCELED_FLAG = values(CANCELED_FLAG) |
||||
|
, CANCELED_REASON = values(CANCELED_REASON) |
||||
|
, UPDATED_BY = values(UPDATED_BY) |
||||
|
, UPDATED_TIME = values(UPDATED_TIME) |
||||
|
</update> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?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.LingshanSpecialCrowdDetailJdryDao"> |
||||
|
<insert id="saveBatchManually"> |
||||
|
insert into lingshan_special_crowd_detail_jdry ( ID, CUSTOMER_ID, ORG_ID_PATH, ID_CARD, CRIMINAL_HISTORY_FLAG |
||||
|
, DRUG_REPETITION_FLAG, FIRST_DISCOVERY_DATE, CONTROLLER_NAME |
||||
|
, CONTROLLER_CONTACT, HELPER_NAME, HELPER_CONTACT, DETACHED_FLAG |
||||
|
, DETACHED_REASON, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME |
||||
|
, UPDATED_BY, UPDATED_TIME) |
||||
|
values |
||||
|
<foreach collection="list" item="item" separator=","> |
||||
|
(#{item.id}, #{item.customerId}, #{item.orgIdPath}, #{item.idCard}, #{item.criminalHistoryFlag}, |
||||
|
#{item.drugRepetitionFlag}, #{item.firstDiscoveryDate}, #{item.controllerName}, #{item.controllerContact}, #{item.helperName}, |
||||
|
#{item.helperContact}, #{item.detachedFlag}, #{item.detachedReason}, #{item.delFlag}, #{item.revision}, |
||||
|
#{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}) |
||||
|
</foreach> |
||||
|
on duplicate key update |
||||
|
ORG_ID_PATH = values(ORG_ID_PATH), |
||||
|
CRIMINAL_HISTORY_FLAG = values(CRIMINAL_HISTORY_FLAG), |
||||
|
DRUG_REPETITION_FLAG = values(DRUG_REPETITION_FLAG), |
||||
|
FIRST_DISCOVERY_DATE = values(FIRST_DISCOVERY_DATE), |
||||
|
CONTROLLER_NAME = values(CONTROLLER_NAME), |
||||
|
CONTROLLER_CONTACT = values(CONTROLLER_CONTACT), |
||||
|
HELPER_NAME = values(HELPER_NAME), |
||||
|
HELPER_CONTACT = values(HELPER_CONTACT), |
||||
|
DETACHED_FLAG = values(DETACHED_FLAG), |
||||
|
DETACHED_REASON = values(DETACHED_REASON), |
||||
|
DEL_FLAG = values(DEL_FLAG), |
||||
|
REVISION = values(REVISION), |
||||
|
UPDATED_BY = values(UPDATED_BY), |
||||
|
UPDATED_TIME = values(UPDATED_TIME) |
||||
|
</insert> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,61 @@ |
|||||
|
<?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.LingshanSpecialCrowdDetailJzhzDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.LingshanSpecialCrowdDetailJzhzEntity" id="lingshanSpecialCrowdDetailJzhzMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgIdPath" column="ORG_ID_PATH"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="causeTroubleHistoryFlag" column="CAUSE_TROUBLE_HISTORY_FLAG"/> |
||||
|
<result property="causeTroubleTimes" column="CAUSE_TROUBLE_TIMES"/> |
||||
|
<result property="currentDiagnosis" column="CURRENT_DIAGNOSIS"/> |
||||
|
<result property="dangerousClass" column="DANGEROUS_CLASS"/> |
||||
|
<result property="canGoOutFlag" column="CAN_GO_OUT_FLAG"/> |
||||
|
<result property="violenceFlag" column="VIOLENCE_FLAG"/> |
||||
|
<result property="allowanceFlag" column="ALLOWANCE_FLAG"/> |
||||
|
<result property="subsistenceFlag" column="SUBSISTENCE_FLAG"/> |
||||
|
<result property="guardianName" column="GUARDIAN_NAME"/> |
||||
|
<result property="guardianContact" column="GUARDIAN_CONTACT"/> |
||||
|
<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> |
||||
|
|
||||
|
<insert id="saveBatchManually"> |
||||
|
insert into lingshan_special_crowd_detail_jzhz ( ID, CUSTOMER_ID, ORG_ID_PATH, ID_CARD, CAUSE_TROUBLE_HISTORY_FLAG |
||||
|
, CAUSE_TROUBLE_TIMES, CURRENT_DIAGNOSIS, DANGEROUS_CLASS |
||||
|
, CAN_GO_OUT_FLAG, VIOLENCE_FLAG, ALLOWANCE_FLAG, SUBSISTENCE_FLAG |
||||
|
, GUARDIAN_NAME, GUARDIAN_CONTACT, DEL_FLAG, REVISION, CREATED_BY |
||||
|
, CREATED_TIME, UPDATED_BY, UPDATED_TIME) |
||||
|
values |
||||
|
<foreach collection="list" item="item" separator=","> |
||||
|
(#{item.id}, #{item.customerId}, #{item.orgIdPath}, #{item.idCard}, #{item.causeTroubleHistoryFlag}, |
||||
|
#{item.causeTroubleTimes}, #{item.currentDiagnosis}, #{item.dangerousClass}, #{item.canGoOutFlag}, #{item.violenceFlag}, |
||||
|
#{item.allowanceFlag}, #{item.subsistenceFlag}, #{item.guardianName}, #{item.guardianContact}, #{item.delFlag}, |
||||
|
#{item.revision}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime} |
||||
|
) |
||||
|
</foreach> |
||||
|
on duplicate key update ORG_ID_PATH = values(ORG_ID_PATH) |
||||
|
, ID_CARD = values(ID_CARD) |
||||
|
, CAUSE_TROUBLE_HISTORY_FLAG = values(CAUSE_TROUBLE_HISTORY_FLAG) |
||||
|
, CAUSE_TROUBLE_TIMES = values(CAUSE_TROUBLE_TIMES) |
||||
|
, CURRENT_DIAGNOSIS = values(CURRENT_DIAGNOSIS) |
||||
|
, DANGEROUS_CLASS = values(DANGEROUS_CLASS) |
||||
|
, CAN_GO_OUT_FLAG = values(CAN_GO_OUT_FLAG) |
||||
|
, VIOLENCE_FLAG = values(VIOLENCE_FLAG) |
||||
|
, ALLOWANCE_FLAG = values(ALLOWANCE_FLAG) |
||||
|
, SUBSISTENCE_FLAG = values(SUBSISTENCE_FLAG) |
||||
|
, GUARDIAN_NAME = values(GUARDIAN_NAME) |
||||
|
, GUARDIAN_CONTACT = values(GUARDIAN_CONTACT) |
||||
|
, UPDATED_BY = values(UPDATED_BY) |
||||
|
, UPDATED_TIME = values(UPDATED_TIME) |
||||
|
|
||||
|
</insert> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,59 @@ |
|||||
|
<?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.LingshanSpecialCrowdDetailSqjzDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.LingshanSpecialCrowdDetailSqjzEntity" id="lingshanSpecialCrowdDetailSqjzMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgIdPath" column="ORG_ID_PATH"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="rectificateType" column="RECTIFICATE_TYPE"/> |
||||
|
<result property="rectificateStartDate" column="RECTIFICATE_START_DATE"/> |
||||
|
<result property="rectificateEndDate" column="RECTIFICATE_END_DATE"/> |
||||
|
<result property="originDetainAddress" column="ORIGIN_DETAIN_ADDRESS"/> |
||||
|
<result property="originalCharge" column="ORIGINAL_CHARGE"/> |
||||
|
<result property="receiveWay" column="RECEIVE_WAY"/> |
||||
|
<result property="rectificateInfo" column="RECTIFICATE_INFO"/> |
||||
|
<result property="detachedFlag" column="DETACHED_FLAG"/> |
||||
|
<result property="detachedReason" column="DETACHED_REASON"/> |
||||
|
<result property="canceledFlag" column="CANCELED_FLAG"/> |
||||
|
<result property="canceledReason" column="CANCELED_REASON"/> |
||||
|
<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> |
||||
|
|
||||
|
<insert id="saveBatchManually"> |
||||
|
insert into lingshan_special_crowd_detail_sqjz ( ID, CUSTOMER_ID, ORG_ID_PATH, ID_CARD, RECTIFICATE_TYPE |
||||
|
, RECTIFICATE_START_DATE, RECTIFICATE_END_DATE, ORIGIN_DETAIN_ADDRESS |
||||
|
, ORIGINAL_CHARGE, RECEIVE_WAY, RECTIFICATE_INFO, DETACHED_FLAG |
||||
|
, DETACHED_REASON, CANCELED_FLAG, CANCELED_REASON, DEL_FLAG, REVISION |
||||
|
, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) |
||||
|
values |
||||
|
<foreach collection="list" item="item" separator=","> |
||||
|
(#{item.id}, #{item.customerId}, #{item.orgIdPath}, #{item.idCard}, #{item.rectificateType}, |
||||
|
#{item.rectificateStartDate}, #{item.rectificateEndDate}, #{item.originDetainAddress}, #{item.originalCharge}, #{item.receiveWay}, |
||||
|
#{item.rectificateInfo}, #{item.detachedFlag}, #{item.detachedReason}, #{item.canceledFlag}, #{item.canceledReason}, |
||||
|
#{item.delFlag}, #{item.revision}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, |
||||
|
#{item.updatedTime}) |
||||
|
</foreach> |
||||
|
on duplicate key update |
||||
|
ORG_ID_PATH = values(ORG_ID_PATH) |
||||
|
, RECTIFICATE_TYPE = values(RECTIFICATE_TYPE) |
||||
|
, RECTIFICATE_START_DATE = values(RECTIFICATE_START_DATE) |
||||
|
, RECTIFICATE_END_DATE = values(RECTIFICATE_END_DATE) |
||||
|
, ORIGIN_DETAIN_ADDRESS = values(ORIGIN_DETAIN_ADDRESS) |
||||
|
, ORIGINAL_CHARGE = values(ORIGINAL_CHARGE), RECEIVE_WAY = values(RECEIVE_WAY) |
||||
|
, RECTIFICATE_INFO = values(RECTIFICATE_INFO), DETACHED_FLAG = values(DETACHED_FLAG) |
||||
|
, DETACHED_REASON = values(DETACHED_REASON), CANCELED_FLAG = values(CANCELED_FLAG) |
||||
|
, CANCELED_REASON = values(CANCELED_REASON) |
||||
|
, UPDATED_BY = values(UPDATED_BY), |
||||
|
, UPDATED_TIME = values(UPDATED_TIME) |
||||
|
</insert> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,61 @@ |
|||||
|
<?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.LingshanSpecialCrowdDetailXfryDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.LingshanSpecialCrowdDetailXfryEntity" id="lingshanSpecialCrowdDetailXfryMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgIdPath" column="ORG_ID_PATH"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="problem" column="PROBLEM"/> |
||||
|
<result property="stableControlMeasurement" column="STABLE_CONTROL_MEASUREMENT"/> |
||||
|
<result property="multipleFlag" column="MULTIPLE_FLAG"/> |
||||
|
<result property="localFlag" column="LOCAL_FLAG"/> |
||||
|
<result property="branchLeader" column="BRANCH_LEADER"/> |
||||
|
<result property="branchLeaderContact" column="BRANCH_LEADER_CONTACT"/> |
||||
|
<result property="principal" column="PRINCIPAL"/> |
||||
|
<result property="principalContact" column="PRINCIPAL_CONTACT"/> |
||||
|
<result property="stableControlerList" column="STABLE_CONTROLER_LIST"/> |
||||
|
<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> |
||||
|
|
||||
|
<insert id="saveBatchManually"> |
||||
|
insert into lingshan_special_crowd_detail_xfry ( ID, CUSTOMER_ID, ORG_ID_PATH, ID_CARD, PROBLEM |
||||
|
, STABLE_CONTROL_MEASUREMENT, MULTIPLE_FLAG, LOCAL_FLAG, BRANCH_LEADER |
||||
|
, BRANCH_LEADER_CONTACT, PRINCIPAL, PRINCIPAL_CONTACT |
||||
|
, STABLE_CONTROLER_LIST, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME |
||||
|
, UPDATED_BY, UPDATED_TIME) |
||||
|
values |
||||
|
<foreach |
||||
|
collection="list" item="item" separator=","> |
||||
|
(#{item.id}, #{item.customerId}, #{item.orgIdPath}, #{item.idCard}, #{item.problem}, |
||||
|
#{item.stableControlMeasurement}, #{item.multipleFlag}, #{item.localFlag}, #{item.branchLeader}, #{item.branchLeaderContact}, |
||||
|
#{item.principal}, #{item.principalContact}, #{item.stableControlerList}, #{item.delFlag}, #{item.revision}, |
||||
|
#{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}) |
||||
|
</foreach> |
||||
|
on duplicate key update |
||||
|
ORG_ID_PATH = values (ORG_ID_PATH) |
||||
|
, PROBLEM = values(PROBLEM) |
||||
|
, STABLE_CONTROL_MEASUREMENT = values(STABLE_CONTROL_MEASUREMENT) |
||||
|
, MULTIPLE_FLAG = values(MULTIPLE_FLAG) |
||||
|
, LOCAL_FLAG = values(LOCAL_FLAG) |
||||
|
, BRANCH_LEADER = values(BRANCH_LEADER) |
||||
|
, BRANCH_LEADER_CONTACT = values(BRANCH_LEADER_CONTACT) |
||||
|
, PRINCIPAL = values(PRINCIPAL) |
||||
|
, PRINCIPAL_CONTACT = values(PRINCIPAL_CONTACT) |
||||
|
, STABLE_CONTROLER_LIST = values(STABLE_CONTROLER_LIST) |
||||
|
, DEL_FLAG = values(DEL_FLAG) |
||||
|
, REVISION = values(REVISION), CREATED_BY = values(CREATED_BY) |
||||
|
, CREATED_TIME = values(CREATED_TIME) |
||||
|
, UPDATED_BY = values(UPDATED_BY) |
||||
|
, UPDATED_TIME = values(UPDATED_TIME) |
||||
|
</insert> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,45 @@ |
|||||
|
<?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.LingshanSpecialCrowdPersonDao"> |
||||
|
|
||||
|
<!--<resultMap type="com.epmet.entity.LingshanSpecialCrowdPersonEntity" id="lingshanSpecialCrowdPersonMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgIdPath" column="ORG_ID_PATH"/> |
||||
|
<result property="name" column="NAME"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<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>--> |
||||
|
|
||||
|
<!--保存或更新--> |
||||
|
<insert id="saveOrUpdateManually" parameterType="map"> |
||||
|
insert into lingshan_special_crowd_person ( ID, CUSTOMER_ID, ORG_ID_PATH, `NAME`, ID_CARD, |
||||
|
DEL_FLAG, REVISION, CREATED_BY , CREATED_TIME, UPDATED_BY, UPDATED_TIME) |
||||
|
values |
||||
|
<foreach collection="list" item="item" separator="," index="idx" open="" close=""> |
||||
|
( #{item.id}, |
||||
|
#{item.customerId}, |
||||
|
#{item.orgIdPath}, |
||||
|
#{item.name}, |
||||
|
#{item.idCard}, |
||||
|
#{item.delFlag}, |
||||
|
#{item.revision}, |
||||
|
#{item.createdBy}, |
||||
|
#{item.createdTime}, |
||||
|
#{item.updatedBy}, |
||||
|
#{item.updatedTime} |
||||
|
) |
||||
|
</foreach> |
||||
|
on duplicate key update NAME=values(name) |
||||
|
, UPDATED_BY=values(UPDATED_BY) |
||||
|
, UPDATED_TIME=values(UPDATED_TIME) |
||||
|
</insert> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?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.LingshanSpecialCrowdPersonTypeDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.LingshanSpecialCrowdPersonTypeEntity" id="lingshanSpecialCrowdPersonTypeMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="orgIdPath" column="ORG_ID_PATH"/> |
||||
|
<result property="idCard" column="ID_CARD"/> |
||||
|
<result property="specialType" column="SPECIAL_TYPE"/> |
||||
|
<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> |
||||
|
|
||||
|
<insert id="saveOrUpdateManually"> |
||||
|
insert into lingshan_special_crowd_person_type ( ID, CUSTOMER_ID, ORG_ID_PATH, ID_CARD, SPECIAL_TYPE, |
||||
|
DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) |
||||
|
values |
||||
|
<foreach collection="types" item="type" separator=","> |
||||
|
(#{type.id}, #{type.customerId}, #{type.orgIdPath}, #{type.idCard}, #{type.specialType}, |
||||
|
#{type.delFlag}, #{type.revision}, #{type.createdBy}, #{type.createdTime}, #{type.updatedBy}, #{type.updatedTime}) |
||||
|
</foreach> |
||||
|
on duplicate key update |
||||
|
ORG_ID_PATH=values(ORG_ID_PATH) |
||||
|
, SPECIAL_TYPE =values(SPECIAL_TYPE) |
||||
|
, UPDATED_BY =values(UPDATED_BY) |
||||
|
, UPDATED_TIME = values(UPDATED_TIME) |
||||
|
</insert> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
Loading…
Reference in new issue