forked from rongchao/epmet-cloud-rizhao
Browse Source
Conflicts: epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xlsdev
108 changed files with 4193 additions and 178 deletions
@ -0,0 +1,30 @@ |
|||
|
|||
-- 相成的 |
|||
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1587017193115787265', 'dangerAreaLevel', '风险地区级别', '', 0, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:42:39', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:42:39'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1587017335055228929', 1587017193115787265, '低风险', '0', '0', '', 0, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:13', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:13'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1587017381859467265', 1587017193115787265, '中风险', '1', '0', '', 1, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:24', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:24'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1587017428642734082', 1587017193115787265, '高风险', '2', '0', '', 2, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:35', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:35'); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
-- 字典表新增数据【自己的】 |
|||
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000001', 'traffic_type', '交通方式', '交通方式【行程上报】', '36', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000002', 'sojourn_history', '7天内旅居史情况', '7天内旅居史情况【行程上报】', '37', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000004', 'trip_data_type', '行程记录类型', '行程记录类型【行程上报】', '39', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
|
|||
|
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000001', '2100000000000000001', '飞机', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000002', '2100000000000000001', '动车', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000003', '2100000000000000001', '火车', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000004', '2100000000000000001', '自驾', '4', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000005', '2100000000000000001', '其他', '5', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000001', '2100000000000000002', '高风险', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000002', '2100000000000000002', '中风险', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000003', '2100000000000000002', '低风险', '0', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000004', '2100000000000000002', '无风险', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000001', '2100000000000000004', '省内', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000002', '2100000000000000004', '省外', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000003', '2100000000000000004', '市内', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000004', '2100000000000000004', '县内', '4', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); |
|||
@ -0,0 +1,10 @@ |
|||
ALTER TABLE `ic_party_member` |
|||
ADD COLUMN `RDSSZZB` varchar(255) NULL COMMENT '入党时所在党支部' AFTER `IS_DYZXH`, |
|||
ADD COLUMN `ZZGXZRSQSJ` varchar(64) NULL COMMENT '组织关系转入社区时间' AFTER `RDSSZZB`, |
|||
ADD COLUMN `IS_QCJ` char(2) NULL COMMENT '是否请长假' AFTER `ZZGXZRSQSJ`; |
|||
|
|||
|
|||
UPDATE ic_party_member |
|||
SET IS_QCJ = '0' |
|||
WHERE |
|||
IS_QCJ IS NULL; |
|||
@ -0,0 +1 @@ |
|||
alter table ic_party_org MODIFY COLUMN `PARTY_ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称'; |
|||
Binary file not shown.
@ -0,0 +1,96 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
|
|||
/** |
|||
* 疫情风险地区 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-31 |
|||
*/ |
|||
@Data |
|||
public class IcDangerAreaDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 风险等级 |
|||
*/ |
|||
// @NotBlank(message = "dangerLevel不能为空",groups = {AddGroup.class})
|
|||
private String dangerLevel; |
|||
|
|||
/** |
|||
* 省 |
|||
*/ |
|||
// @NotBlank(message = "province不能为空",groups = {AddGroup.class})
|
|||
private String province; |
|||
|
|||
/** |
|||
* 市 |
|||
*/ |
|||
// @NotBlank(message = "city不能为空",groups = {AddGroup.class})
|
|||
private String city; |
|||
|
|||
/** |
|||
* 区 |
|||
*/ |
|||
// @NotBlank(message = "district不能为空",groups = {AddGroup.class})
|
|||
private String district; |
|||
|
|||
/** |
|||
* 省-市-区 |
|||
*/ |
|||
@NotBlank(message = "allName不能为空",groups = {AddGroup.class}) |
|||
private String allName; |
|||
|
|||
private String allNameCode; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,78 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2022/5/10 10:02 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class BirthRecordListFormDTO extends PageFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5077167613040462646L; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 小区ID |
|||
*/ |
|||
private String villageId; |
|||
/** |
|||
* 楼栋ID |
|||
*/ |
|||
private String buildId; |
|||
/** |
|||
* 单元ID |
|||
*/ |
|||
private String unitId; |
|||
/** |
|||
* 房屋ID |
|||
*/ |
|||
private String homeId; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 手机 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
/** |
|||
* 性别 |
|||
*/ |
|||
private String gender; |
|||
/** |
|||
* 出生日开始 |
|||
*/ |
|||
private String startTime; |
|||
/** |
|||
* 出生日期结束 |
|||
*/ |
|||
private String endTime; |
|||
/** |
|||
* 是否福利 |
|||
*/ |
|||
private String isWelfare; |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/10/31 16:59 |
|||
*/ |
|||
@Data |
|||
public class DangerAreaListFormDTO extends PageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8868052895161162655L; |
|||
|
|||
private String name; |
|||
private String dangerLevel; |
|||
private String customerId; |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/11/1 15:58 |
|||
*/ |
|||
@Data |
|||
public class EmphasisTripDetailFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4725053371888196275L; |
|||
|
|||
public interface EmphasisTripDetailForm{} |
|||
|
|||
@NotBlank(message = "id不能为空",groups = {EmphasisTripDetailForm.class}) |
|||
private String id; |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/11/1 15:39 |
|||
*/ |
|||
@Data |
|||
public class EmphasisTripListFormDTO extends PageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 5850717233738956442L; |
|||
|
|||
private String code; |
|||
|
|||
private String dangerLevel; |
|||
|
|||
private String staffId; |
|||
private String customerId; |
|||
|
|||
private String agencyId; |
|||
|
|||
/** |
|||
* ic_trip_report_record.id |
|||
*/ |
|||
private String id; |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/11/1 16:08 |
|||
*/ |
|||
@Data |
|||
public class EmphasisTripPieDetailFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8822391154779579664L; |
|||
|
|||
public interface EmphasisTripPieDetailForm{} |
|||
|
|||
// @NotBlank(message = "code不能为空",groups = {EmphasisTripPieDetailForm.class})
|
|||
private String code; |
|||
|
|||
private String customerId; |
|||
|
|||
private String staffId; |
|||
|
|||
private String agencyId; |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotEmpty; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wgf |
|||
* @dscription |
|||
*/ |
|||
@Data |
|||
public class OnlyIdFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5220529162950147825L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
@NotBlank(message = "主键不能为空") |
|||
private String id; |
|||
|
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/11/1 15:38 |
|||
*/ |
|||
@Data |
|||
public class EmphasisTripListResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1646171374911115465L; |
|||
|
|||
private String id; |
|||
private String agencyId; |
|||
private String name; |
|||
private String mobile; |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 来源地 |
|||
*/ |
|||
private String sourceAddress; |
|||
|
|||
/** |
|||
* 来曹事由 |
|||
*/ |
|||
private String describeContent; |
|||
|
|||
/** |
|||
* 核酸检测结果 |
|||
*/ |
|||
private String natOutcome; |
|||
private String natOutComeName; |
|||
|
|||
/** |
|||
* 7天旅居史 |
|||
*/ |
|||
private String sojournHistory; |
|||
private String sojournHistoryName; |
|||
|
|||
/** |
|||
* 隔离状态 |
|||
*/ |
|||
private String isolateType; |
|||
private String isolateTypeName; |
|||
|
|||
/** |
|||
* 来曹时间 |
|||
*/ |
|||
private String arriveDate; |
|||
|
|||
/** |
|||
* 离开时间 |
|||
*/ |
|||
private String leaveDate; |
|||
|
|||
/** |
|||
* 现居地 |
|||
*/ |
|||
private String presentAddress; |
|||
|
|||
/** |
|||
* 详细地址 |
|||
*/ |
|||
private String detailAddress; |
|||
|
|||
private String remark; |
|||
|
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/11/1 16:06 |
|||
*/ |
|||
@Data |
|||
public class EmphasisTripPieDetailResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -7654816048391073022L; |
|||
|
|||
private String dangerLevelName; |
|||
private String dangerLevel; |
|||
private Integer total = NumConstant.ZERO; |
|||
} |
|||
@ -0,0 +1,222 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.alibaba.excel.EasyExcel; |
|||
import com.alibaba.excel.ExcelWriter; |
|||
import com.alibaba.excel.write.metadata.WriteSheet; |
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.constant.AppClientConstant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.*; |
|||
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; |
|||
import com.epmet.commons.tools.feign.*; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.constants.ImportTaskConstants; |
|||
import com.epmet.dto.IcDangerAreaDTO; |
|||
import com.epmet.dto.form.DangerAreaListFormDTO; |
|||
import com.epmet.dto.form.ImportTaskCommonFormDTO; |
|||
import com.epmet.dto.result.ImportTaskCommonResultDTO; |
|||
import com.epmet.dto.result.NatListCommonExcelResultDTO; |
|||
import com.epmet.dto.result.NatListResultDTO; |
|||
import com.epmet.enums.DangerLevelEnum; |
|||
import com.epmet.excel.IcDangerAreaResultExcel; |
|||
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |
|||
import com.epmet.service.IcDangerAreaService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.io.IOUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.HttpHeaders; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.ServletOutputStream; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.FileOutputStream; |
|||
import java.io.IOException; |
|||
import java.io.InputStream; |
|||
import java.net.URLEncoder; |
|||
import java.nio.file.Path; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.UUID; |
|||
|
|||
|
|||
/** |
|||
* 疫情风险地区 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-31 |
|||
*/ |
|||
@RestController |
|||
@Slf4j |
|||
@RequestMapping("icDangerArea") |
|||
public class IcDangerAreaController implements ResultDataResolver{ |
|||
|
|||
@Autowired |
|||
private IcDangerAreaService icDangerAreaService; |
|||
@Autowired |
|||
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcDangerAreaDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IcDangerAreaDTO> page = icDangerAreaService.page(params); |
|||
return new Result<PageData<IcDangerAreaDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<IcDangerAreaDTO> get(@PathVariable("id") String id){ |
|||
IcDangerAreaDTO data = icDangerAreaService.get(id); |
|||
return new Result<IcDangerAreaDTO>().ok(data); |
|||
} |
|||
|
|||
/** |
|||
* @Description 新增 |
|||
* @param dto |
|||
* @param tokenDto |
|||
* @Author zxc |
|||
* @Date 2022/11/1 09:09 |
|||
*/ |
|||
@NoRepeatSubmit |
|||
@PostMapping("add") |
|||
public Result save(@RequestBody IcDangerAreaDTO dto, @LoginUser TokenDto tokenDto){ |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
dto.setCustomerId(tokenDto.getCustomerId()); |
|||
icDangerAreaService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcDangerAreaDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icDangerAreaService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody List<String> ids,@LoginUser TokenDto tokenDto){ |
|||
icDangerAreaService.delete(ids,tokenDto.getUserId()); |
|||
return new Result(); |
|||
} |
|||
|
|||
@RequestMapping("list") |
|||
public Result<PageData<IcDangerAreaDTO>> list(@RequestBody DangerAreaListFormDTO formDTO,@LoginUser TokenDto tokenDto){ |
|||
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
return new Result<PageData<IcDangerAreaDTO>>().ok(icDangerAreaService.list(formDTO)); |
|||
} |
|||
|
|||
@RequestMapping("export") |
|||
public void export(@LoginUser TokenDto tokenDto,@RequestBody DangerAreaListFormDTO formDTO,HttpServletResponse response){ |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
ExcelWriter excelWriter = null; |
|||
int pageNo = NumConstant.ONE; |
|||
formDTO.setPageSize(NumConstant.ONE_THOUSAND); |
|||
try { |
|||
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("风险地区", response), IcDangerAreaResultExcel.class).build(); |
|||
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); |
|||
Integer size; |
|||
do { |
|||
PageData<IcDangerAreaDTO> list = icDangerAreaService.list(formDTO); |
|||
List<IcDangerAreaDTO> data = list.getList(); |
|||
if (CollectionUtils.isNotEmpty(data)){ |
|||
data.forEach(d -> { |
|||
d.setDangerLevel(DangerLevelEnum.getNameByCode(d.getDangerLevel())); |
|||
}); |
|||
} |
|||
excelWriter.write(ConvertUtils.sourceToTarget(data,IcDangerAreaResultExcel.class), writeSheet); |
|||
formDTO.setPageNo(pageNo++); |
|||
size = data.size(); |
|||
} while (size == NumConstant.ONE_THOUSAND); |
|||
}catch (Exception e){ |
|||
log.error("export exception", e); |
|||
}finally { |
|||
if (excelWriter != null) { |
|||
excelWriter.finish(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @Description 模板下载 |
|||
* @param response |
|||
* @Author zxc |
|||
* @Date 2022/11/1 09:52 |
|||
*/ |
|||
@PostMapping("downloadTemplate") |
|||
public void downloadTemplate(HttpServletResponse response) throws IOException{ |
|||
response.setCharacterEncoding("UTF-8"); |
|||
response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); |
|||
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
|||
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("风险地区导入模板", "UTF-8") + ".xlsx"); |
|||
InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_danger_area_template.xlsx"); |
|||
try { |
|||
ServletOutputStream os = response.getOutputStream(); |
|||
IOUtils.copy(is, os); |
|||
} finally { |
|||
if (is != null) { |
|||
is.close(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@PostMapping("import") |
|||
public Result importExcel(@LoginUser TokenDto tokenDto, @RequestPart("file") MultipartFile file) { |
|||
String userId = EpmetRequestHolder.getHeader(AppClientConstant.USER_ID); |
|||
// 1.暂存文件
|
|||
String originalFilename = file.getOriginalFilename(); |
|||
String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); |
|||
Path fileSavePath; |
|||
try { |
|||
Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_danger_area", "import"); |
|||
fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName)); |
|||
} catch (IOException e) { |
|||
String errorMsg = ExceptionUtils.getErrorStackTrace(e); |
|||
log.error("【风险地区】创建临时存储文件失败:{}", errorMsg); |
|||
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败"); |
|||
} |
|||
|
|||
InputStream is = null; |
|||
FileOutputStream os = null; |
|||
|
|||
try { |
|||
is = file.getInputStream(); |
|||
os = new FileOutputStream(fileSavePath.toString()); |
|||
IOUtils.copy(is, os); |
|||
} catch (Exception e) { |
|||
log.error("method exception", e); |
|||
} finally { |
|||
org.apache.poi.util.IOUtils.closeQuietly(is); |
|||
org.apache.poi.util.IOUtils.closeQuietly(os); |
|||
} |
|||
|
|||
// 2.生成导入任务记录
|
|||
ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO(); |
|||
importTaskForm.setOperatorId(userId); |
|||
importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_IC_DANGER_AREA); |
|||
importTaskForm.setOriginFileName(originalFilename); |
|||
|
|||
ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(commonServiceOpenFeignClient.createImportTask(importTaskForm), |
|||
ServiceConstant.EPMET_COMMON_SERVICE, |
|||
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), |
|||
"excel导入风险地区错误", |
|||
"风险地区导入失败"); |
|||
|
|||
// 3.执行导入
|
|||
icDangerAreaService.execAsyncExcelImport(fileSavePath, rstData.getTaskId(),tokenDto.getCustomerId(),tokenDto.getUserId()); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.IcDangerAreaEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 疫情风险地区 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-31 |
|||
*/ |
|||
@Mapper |
|||
public interface IcDangerAreaDao extends BaseDao<IcDangerAreaEntity> { |
|||
|
|||
Integer delAllDangerArea(@Param("customerId")String customerId); |
|||
|
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
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 2022-10-31 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_danger_area") |
|||
public class IcDangerAreaEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 风险等级 |
|||
*/ |
|||
private String dangerLevel; |
|||
|
|||
/** |
|||
* 省 |
|||
*/ |
|||
private String province; |
|||
|
|||
/** |
|||
* 市 |
|||
*/ |
|||
private String city; |
|||
|
|||
/** |
|||
* 区 |
|||
*/ |
|||
private String district; |
|||
|
|||
/** |
|||
* 省-市-区 |
|||
*/ |
|||
private String allName; |
|||
|
|||
private String allNameCode; |
|||
|
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
package com.epmet.enums; |
|||
|
|||
/** |
|||
* desc:数据同步配置枚举 对应data_sync_config中的DATA_CODE |
|||
* @author Administrator |
|||
*/ |
|||
|
|||
public enum DangerLevelEnum { |
|||
|
|||
LOW("0", "低风险"), |
|||
MIDDLE("1", "中风险"), |
|||
HIGH("2", "高风险"), |
|||
OTHER("3", "无风险"), |
|||
|
|||
; |
|||
|
|||
private final String code; |
|||
private final String name; |
|||
|
|||
|
|||
|
|||
DangerLevelEnum(String code, String name) { |
|||
this.code = code; |
|||
this.name = name; |
|||
} |
|||
|
|||
public static DangerLevelEnum getEnum(String code) { |
|||
DangerLevelEnum[] values = DangerLevelEnum.values(); |
|||
for (DangerLevelEnum value : values) { |
|||
if (value.getCode().equals(code)) { |
|||
return value; |
|||
} |
|||
} |
|||
return DangerLevelEnum.OTHER; |
|||
} |
|||
|
|||
public static String getNameByCode(String code) { |
|||
DangerLevelEnum[] values = DangerLevelEnum.values(); |
|||
for (DangerLevelEnum value : values) { |
|||
if (value.getCode().equals(code)) { |
|||
return value.getName(); |
|||
} |
|||
} |
|||
return DangerLevelEnum.OTHER.getName(); |
|||
} |
|||
|
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/11/1 11:18 |
|||
*/ |
|||
@Data |
|||
public class IcDangerAreaImportExcel { |
|||
|
|||
@NotBlank(message = "风险地区为必填项") |
|||
@ExcelProperty("风险地区") |
|||
private String allName; |
|||
|
|||
@NotBlank(message = "风险等级为必填项") |
|||
@ExcelProperty("风险等级") |
|||
private String dangerLevel; |
|||
|
|||
@Data |
|||
public static class IcDangerAreaError{ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "风险地区") |
|||
private String name; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "风险等级") |
|||
private String dangerLevel; |
|||
|
|||
@ColumnWidth(40) |
|||
@ExcelProperty(value = "错误信息") |
|||
private String errorInfo; |
|||
} |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/11/1 10:26 |
|||
*/ |
|||
@Data |
|||
public class IcDangerAreaResultExcel { |
|||
|
|||
@ColumnWidth(40) |
|||
@ExcelProperty(value = "风险地区") |
|||
private String allName; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "风险等级") |
|||
private String dangerLevel; |
|||
|
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 磐石-行程上报信息 |
|||
* |
|||
*/ |
|||
@Data |
|||
public class IcPsTripReportRecordExcel { |
|||
|
|||
@ExcelProperty("姓名") |
|||
@NotBlank(message = "姓名不能为空") |
|||
private String name; |
|||
|
|||
@ExcelProperty("证件号") |
|||
@NotBlank(message = "证件号不能为空") |
|||
private String idCard; |
|||
|
|||
@ExcelProperty("户籍地(省市县区)") |
|||
@NotBlank(message = "户籍地不能为空") |
|||
private String registeredResidence; |
|||
|
|||
@ExcelProperty("手机号") |
|||
@NotBlank(message = "手机号不能为空") |
|||
private String mobile; |
|||
|
|||
@ExcelProperty("来自地区(格式:省-市-区-街道-社区)") |
|||
@NotBlank(message = "来自地区不能为空") |
|||
private String sourceAddress; |
|||
@ExcelProperty("来自地区详细地址") |
|||
@NotBlank(message = "来自地区详细地址不能为空") |
|||
private String sourceDetailAddress; |
|||
|
|||
@ExcelProperty("来曹事由(100字以内)") |
|||
@NotBlank(message = "来曹事由不能为空") |
|||
@Length(max = 500,message = "来曹事由不能超过100字") |
|||
private String describeContent; |
|||
|
|||
@ExcelProperty("48小时核酸检测") |
|||
@NotBlank(message = "48小时核酸检测不能为空") |
|||
private String natOutcome; |
|||
|
|||
@ExcelProperty("来到本地时间\n" + |
|||
"(2022-01-01)") |
|||
//@NotBlank(message = "来到本地时间不能为空")
|
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@NotNull(message = "来到本地时间为必填项") |
|||
private Date arriveDate; |
|||
|
|||
@ExcelProperty("现居地") |
|||
@NotBlank(message = "现居地不能为空") |
|||
private String presentAddress; |
|||
@ExcelProperty("现居地详细地址") |
|||
@NotBlank(message = "现居地详细地址不能为空") |
|||
private String detailAddress; |
|||
|
|||
@ExcelProperty("返回方式") |
|||
@NotBlank(message = "返回方式不能为空") |
|||
private String trafficType; |
|||
@ExcelProperty("其他返回方式") |
|||
private String trafficTypeExplain; |
|||
|
|||
@ExcelProperty("7天内旅居史情况") |
|||
private String sojournHistory; |
|||
|
|||
@ExcelProperty("隔离状态") |
|||
private String isolateType; |
|||
|
|||
@ExcelProperty("备注(500字以内)") |
|||
@Length(max = 500,message = "备注不能超过500字") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("是否落实“落地检”") |
|||
private String isArriveCheck; |
|||
|
|||
@ExcelProperty("是否达到曹县") |
|||
private String isArrive; |
|||
|
|||
@ExcelProperty("上报时间\n" + |
|||
"(2022-01-01)") |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private Date reportingTime; |
|||
|
|||
@ExcelProperty("管控措施\n" + |
|||
"(500字以内)") |
|||
@Length(max = 500,message = "管控措施不能超过500字") |
|||
private String controlMeasures; |
|||
|
|||
@ExcelProperty("类型\n" + |
|||
"(省内、省外、市内、县内)") |
|||
private String tripDataType; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,150 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
|||
import com.alibaba.excel.enums.poi.FillPatternTypeEnum; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 磐石-行程上报信息-导出 |
|||
* |
|||
*/ |
|||
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) |
|||
@Data |
|||
public class IcPsTripReportRecordExportExcel implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@ColumnWidth(12) |
|||
@ExcelProperty(value = "姓名", order = 1) |
|||
private String name; |
|||
/** |
|||
* 证件号 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "证件号", order = 2) |
|||
private String idCard; |
|||
/** |
|||
* 户籍地 【磐石】 |
|||
*/ |
|||
@ColumnWidth(28) |
|||
@ExcelProperty(value = "户籍地(省市县区)", order = 3) |
|||
private String registeredResidence; |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@ColumnWidth(15) |
|||
@ExcelProperty(value = "手机号", order = 4) |
|||
private String mobile; |
|||
/** |
|||
* 来自地区(格式:省-市-区-街道-社区) |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "来自地区(格式:省-市-区-街道-社区)",order = 5) |
|||
private String sourceAddress; |
|||
/** |
|||
* 来自地区详细地址 source_address字段的说明 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "来自地区详细地址",order = 6) |
|||
private String sourceDetailAddress; |
|||
/** |
|||
* 来曹事由(100字以内)【磐石】 |
|||
*/ |
|||
@ColumnWidth(25) |
|||
@ExcelProperty(value = "来曹事由(100字以内)",order = 7) |
|||
private String describeContent; |
|||
/** |
|||
* 48小时核酸检测 0:阴性 1:阳性 -中国字 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "48小时核酸检测",order = 8) |
|||
private String isNatRecordName; |
|||
/** |
|||
* 来到本地时间(2022-01-01) |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "来到本地时间(2022-01-01)",order = 9) |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private String arriveDate; |
|||
/** |
|||
* 现居地 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "现居地",order = 10) |
|||
private String presentAddress; |
|||
/** |
|||
* 现居地详细地址 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "现居地详细地址",order = 11) |
|||
private String detailAddress; |
|||
/** |
|||
* 交通方式-中国字 |
|||
*/ |
|||
@ColumnWidth(15) |
|||
@ExcelProperty(value = "返回方式",order = 12) |
|||
private String trafficTypeName; |
|||
/** |
|||
* 其他返回方式,交通方式为其他时此列需要有值 |
|||
*/ |
|||
@ColumnWidth(18) |
|||
@ExcelProperty(value = "其他返回方式",order = 13) |
|||
private String trafficTypeExplain; |
|||
/** |
|||
* 7天内旅居史情况,字典表(sojourn_history)【磐石】-中国字 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "7天内旅居史情况",order = 14) |
|||
private String sojournHistoryName; |
|||
/** |
|||
* 隔离状态,字典表(isolate_type)【磐石】-中国字 |
|||
*/ |
|||
@ColumnWidth(15) |
|||
@ExcelProperty(value = "隔离状态",order = 17) |
|||
private String isolateTypeName; |
|||
/** |
|||
* 备注(500字以内) |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "备注(500字以内)",order = 16) |
|||
private String remark; |
|||
/** |
|||
* 是否落实"落地检" 0:否 1:是【磐石】-中国字 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "是否落实“落地检”",order = 17) |
|||
private String isArriveCheckName; |
|||
/** |
|||
* 是否达到曹县 0:否 1:是【磐石】-中国字 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "是否达到曹县",order = 18) |
|||
private String isArriveName; |
|||
/** |
|||
* 上报时间(2022-01-01)【磐石】 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "上报时间(2022-01-01)",order = 19) |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private String reportingTime; |
|||
/** |
|||
* 管控措施(500字以内)【磐石】 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "管控措施(500字以内)",order = 20) |
|||
private String controlMeasures; |
|||
/** |
|||
* 类型(省内、省外、市内、县内),字典表(trip_data_type)【磐石】-中国字 |
|||
*/ |
|||
@ColumnWidth(25) |
|||
@ExcelProperty(value = "类型(省内、省外、市内、县内)",order = 21) |
|||
private String tripDataTypeName; |
|||
} |
|||
@ -0,0 +1,123 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
|||
import com.alibaba.excel.enums.poi.FillPatternTypeEnum; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 行程上报信息 |
|||
* |
|||
*/ |
|||
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) |
|||
@Data |
|||
public class IcTripReportRecordExportExcel implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@ColumnWidth(12) |
|||
@ExcelProperty(value = "姓名", order = 1) |
|||
private String name; |
|||
|
|||
/** |
|||
* 证件号 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "证件号",order = 2) |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@ColumnWidth(15) |
|||
@ExcelProperty(value = "手机号",order = 3) |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "现居地",order = 4) |
|||
private String presentAddress; |
|||
|
|||
/** |
|||
* 详细地址 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "现居地详细地址",order = 5) |
|||
private String detailAddress; |
|||
|
|||
/** |
|||
* 来源地区地址 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "来自地区",order = 6) |
|||
private String sourceAddress; |
|||
|
|||
/** |
|||
* 来自地区详细地址 source_address字段的说明 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "来自地区详细地址",order = 7) |
|||
private String sourceDetailAddress; |
|||
|
|||
/** |
|||
* 到达日期 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "来到本地时间",order = 8) |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private String arriveDate; |
|||
|
|||
/** |
|||
* 交通方式-中国字 |
|||
*/ |
|||
@ColumnWidth(15) |
|||
@ExcelProperty(value = "返回方式",order = 9) |
|||
private String trafficTypeName; |
|||
/** |
|||
* 其他返回方式,交通方式为其他时此列需要有值 |
|||
*/ |
|||
@ColumnWidth(18) |
|||
@ExcelProperty(value = "其他返回方式",order = 10) |
|||
private String trafficTypeExplain; |
|||
|
|||
/** |
|||
* 是否有48小时核算记录 0:否 1:是 【小寨子】-中国字 |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "48小时核酸检测",order = 11) |
|||
private String isNatRecordName; |
|||
|
|||
/** |
|||
* 疫苗接种针次 -中国字(0针 1针 2针 3针) |
|||
*/ |
|||
@ColumnWidth(20) |
|||
@ExcelProperty(value = "疫苗接种针次",order = 12) |
|||
private String vaccineNumName; |
|||
|
|||
/** |
|||
* 离开日期 |
|||
*/ |
|||
@ColumnWidth(15) |
|||
@ExcelProperty(value = "离开本地时间",order = 13) |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
private String leaveDate; |
|||
|
|||
/** |
|||
* 备注信息 |
|||
*/ |
|||
@ColumnWidth(30) |
|||
@ExcelProperty(value = "备注",order = 14) |
|||
private String remark; |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
package com.epmet.excel.error; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 磐石-行程上报信息 |
|||
* |
|||
*/ |
|||
@Data |
|||
public class IcPsTripReportRecordErrorExcel { |
|||
|
|||
@ExcelProperty("姓名") |
|||
@ColumnWidth(20) |
|||
private String name; |
|||
|
|||
@ColumnWidth(20) |
|||
@ExcelProperty("证件号") |
|||
private String idCard; |
|||
|
|||
@ExcelProperty("手机号") |
|||
@ColumnWidth(20) |
|||
private String mobile; |
|||
|
|||
@ColumnWidth(60) |
|||
@ExcelProperty("错误信息") |
|||
private String errorInfo; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,137 @@ |
|||
package com.epmet.excel.handler; |
|||
|
|||
import com.alibaba.excel.context.AnalysisContext; |
|||
import com.alibaba.excel.read.listener.ReadListener; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.exception.ValidateException; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dao.IcDangerAreaDao; |
|||
import com.epmet.entity.IcDangerAreaEntity; |
|||
import com.epmet.excel.IcDangerAreaImportExcel; |
|||
import com.epmet.service.IcDangerAreaService; |
|||
import lombok.Data; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 核酸检测excel导入监听器 |
|||
*/ |
|||
@Data |
|||
@Slf4j |
|||
public class IcDangerAreaExcelImportListener implements ReadListener<IcDangerAreaImportExcel> { |
|||
|
|||
public static final int MAX_THRESHOLD = 200; |
|||
private String customerId = ""; |
|||
private Map<String,String> dangerLevelMap = null; |
|||
private List<IcDangerAreaEntity> datas = new ArrayList<>(); |
|||
private List<IcDangerAreaImportExcel.IcDangerAreaError> errorRows = new ArrayList<>(); |
|||
|
|||
@Autowired |
|||
private IcDangerAreaService icDangerAreaService; |
|||
@Autowired |
|||
private IcDangerAreaDao icDangerAreaDao; |
|||
|
|||
public IcDangerAreaExcelImportListener(Map<String,String> dangerLevelMap, String customerId, IcDangerAreaService icDangerAreaService, IcDangerAreaDao icDangerAreaDao) { |
|||
this.dangerLevelMap = dangerLevelMap; |
|||
this.customerId = customerId; |
|||
this.icDangerAreaService = icDangerAreaService; |
|||
this.icDangerAreaDao = icDangerAreaDao; |
|||
} |
|||
|
|||
@Override |
|||
public void invoke(IcDangerAreaImportExcel data, AnalysisContext context) { |
|||
try { |
|||
/*LambdaQueryWrapper<IcDangerAreaEntity> qw = new LambdaQueryWrapper<>(); |
|||
qw.eq(IcDangerAreaEntity::getAllName,data.getAllName()); |
|||
IcDangerAreaEntity icDangerAreaEntity = icDangerAreaDao.selectOne(qw); |
|||
if (null != icDangerAreaEntity){ |
|||
throw new EpmetException(EpmetErrorCode.DANGER_AREA_ERROR.getCode()); |
|||
}*/ |
|||
ValidatorUtils.validateEntity(data); |
|||
IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(data, IcDangerAreaEntity.class); |
|||
String[] split = data.getAllName().split("-"); |
|||
for (int i = NumConstant.ZERO; i < split.length; i++) { |
|||
switch (i){ |
|||
case NumConstant.ZERO: |
|||
entity.setProvince(split[i]); |
|||
break; |
|||
case NumConstant.ONE: |
|||
entity.setCity(split[i]); |
|||
break; |
|||
case NumConstant.TWO: |
|||
entity.setDistrict(split[i]); |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
} |
|||
if (StringUtils.isBlank(entity.getProvince())){ |
|||
throw new EpmetException("省未填写"); |
|||
} |
|||
if (StringUtils.isBlank(entity.getCity())){ |
|||
throw new EpmetException("市未填写"); |
|||
} |
|||
if (StringUtils.isBlank(entity.getDistrict())){ |
|||
throw new EpmetException("区未填写"); |
|||
} |
|||
entity.setDangerLevel(dangerLevelMap.get(entity.getDangerLevel())); |
|||
entity.setCustomerId(customerId); |
|||
datas.add(entity); |
|||
if (datas.size() == MAX_THRESHOLD) { |
|||
execPersist(); |
|||
} |
|||
} catch (Exception e) { |
|||
String errorMsg = null; |
|||
if (e instanceof ValidateException) { |
|||
errorMsg = ((ValidateException) e).getMsg(); |
|||
} else { |
|||
log.warn("【风险地区信息导入】出错:{}", e.getStackTrace()); |
|||
errorMsg = ((EpmetException)e).getInternalMsg(); |
|||
log.warn("【风险地区信息导入】出错:{}", ExceptionUtils.getErrorStackTrace(e)); |
|||
} |
|||
IcDangerAreaImportExcel.IcDangerAreaError errorRow = new IcDangerAreaImportExcel.IcDangerAreaError(); |
|||
errorRow.setName(data.getAllName()); |
|||
errorRow.setDangerLevel(data.getDangerLevel()); |
|||
errorRow.setErrorInfo(errorMsg); |
|||
errorRows.add(errorRow); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void doAfterAllAnalysed(AnalysisContext context) { |
|||
// 最后几条达不到阈值,这里必须再调用一次
|
|||
execPersist(); |
|||
} |
|||
|
|||
/** |
|||
* 执行持久化 |
|||
*/ |
|||
private void execPersist() { |
|||
try { |
|||
if (CollectionUtils.isNotEmpty(datas)){ |
|||
icDangerAreaService.insertBatch(datas); |
|||
} |
|||
} finally { |
|||
datas.clear(); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 获取错误行 |
|||
* @return |
|||
*/ |
|||
public List<IcDangerAreaImportExcel.IcDangerAreaError> getErrorRows() { |
|||
return errorRows; |
|||
} |
|||
} |
|||
@ -0,0 +1,178 @@ |
|||
package com.epmet.excel.handler; |
|||
|
|||
import com.alibaba.excel.context.AnalysisContext; |
|||
import com.alibaba.excel.read.listener.ReadListener; |
|||
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.exception.ValidateException; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.constant.IcResiUserConstant; |
|||
import com.epmet.entity.IcTripReportRecordEntity; |
|||
import com.epmet.excel.IcPsTripReportRecordExcel; |
|||
import com.epmet.excel.data.IcTripReportExcelData; |
|||
import com.epmet.excel.error.IcPsTripReportRecordErrorExcel; |
|||
import com.epmet.service.impl.IcTripReportRecordServiceImpl; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.concurrent.atomic.AtomicBoolean; |
|||
|
|||
|
|||
/** |
|||
* 磐石-行程上报excel导入监听器 |
|||
*/ |
|||
@Slf4j |
|||
public class IcPsTripReportExcelImportListener implements ReadListener<IcPsTripReportRecordExcel> { |
|||
|
|||
/** |
|||
* 最大条数阈值 |
|||
*/ |
|||
public static final int MAX_THRESHOLD = 200; |
|||
/** |
|||
* 当前操作用户 |
|||
*/ |
|||
private CustomerStaffInfoCacheResult staffInfo; |
|||
private String customerId; |
|||
//字典表数据
|
|||
private Map<String, String> trafficTypeMap; |
|||
private Map<String, String> sojournHistoryMap; |
|||
private Map<String, String> isolateTypeMap; |
|||
private Map<String, String> tripDataTypeMap; |
|||
private Map<String, String> areaMap; |
|||
|
|||
/** |
|||
* 数据 |
|||
*/ |
|||
private List<IcTripReportRecordEntity> datas = new ArrayList<>(); |
|||
|
|||
/** |
|||
* 错误项列表 |
|||
*/ |
|||
private List<IcPsTripReportRecordErrorExcel> errorRows = new ArrayList<>(); |
|||
|
|||
private IcTripReportRecordServiceImpl tripReportRecordService; |
|||
|
|||
public IcPsTripReportExcelImportListener(String customerId, CustomerStaffInfoCacheResult staffInfo, IcTripReportRecordServiceImpl tripReportRecordService, |
|||
Map<String, String> trafficTypeMap, Map<String, String> sojournHistoryMap, Map<String, String> isolateTypeMap, Map<String, String> tripDataTypeMap, Map<String, String> areaMap) { |
|||
this.customerId=customerId; |
|||
this.staffInfo = staffInfo; |
|||
this.tripReportRecordService = tripReportRecordService; |
|||
this.trafficTypeMap = trafficTypeMap; |
|||
this.sojournHistoryMap = sojournHistoryMap; |
|||
this.isolateTypeMap = isolateTypeMap; |
|||
this.tripDataTypeMap = tripDataTypeMap; |
|||
this.areaMap = areaMap; |
|||
} |
|||
|
|||
@Override |
|||
public void invoke(IcPsTripReportRecordExcel data, AnalysisContext context) { |
|||
|
|||
try { |
|||
// 先校验数据
|
|||
ValidatorUtils.validateEntity(data); |
|||
|
|||
AtomicBoolean bl = new AtomicBoolean(false); |
|||
StringBuffer errMsg = new StringBuffer(""); |
|||
IcTripReportRecordEntity e = ConvertUtils.sourceToTarget(data, IcTripReportRecordEntity.class); |
|||
e.setCustomerId(customerId); |
|||
e.setAgencyId(staffInfo.getAgencyId()); |
|||
e.setPids(staffInfo.getAgencyPIds()); |
|||
e.setUserType(IcResiUserConstant.USER_TYPE_IMPORT); |
|||
e.setNatOutcome("阳性".equals(e.getNatOutcome()) ? "1" : "0"); |
|||
if (trafficTypeMap.containsKey(data.getTrafficType())) { |
|||
e.setTrafficType(trafficTypeMap.get(data.getTrafficType())); |
|||
} |
|||
if ("其他".equals(data.getTrafficType()) && StringUtils.isBlank(data.getTrafficTypeExplain())) { |
|||
errMsg.append("返回方式为其他时,请补充“其他返回方式”;"); |
|||
bl.set(true); |
|||
} |
|||
if (StringUtils.isNotBlank(data.getSojournHistory())) { |
|||
e.setSojournHistory(sojournHistoryMap.get(data.getSojournHistory())); |
|||
} else { |
|||
String[] str = e.getSourceAddress().split("-"); |
|||
if (str.length < 3) { |
|||
errMsg.append("数据不完整,‘来源地’信息填写格式错误;"); |
|||
bl.set(true); |
|||
} |
|||
e.setSojournHistory("3");//无风险
|
|||
if (areaMap.containsKey(str[2])) { |
|||
e.setSojournHistory(areaMap.get(str[2])); |
|||
} |
|||
} |
|||
if (StringUtils.isNotBlank(data.getIsolateType())) { |
|||
e.setIsolateType(isolateTypeMap.get(data.getIsolateType())); |
|||
} |
|||
if (StringUtils.isNotBlank(data.getTripDataType())) { |
|||
e.setTripDataType(tripDataTypeMap.get(data.getTripDataType())); |
|||
} |
|||
e.setIsArriveCheck("是".equals(data.getIsArriveCheck()) ? "1" : "0"); |
|||
e.setIsArrive("是".equals(data.getIsArrive()) ? "1" : "0"); |
|||
//必要字段没值的
|
|||
if (StringUtils.isEmpty(e.getSourceAddress()) || StringUtils.isEmpty(e.getPresentAddress()) |
|||
|| StringUtils.isEmpty(e.getTrafficType())) { |
|||
errMsg.append("数据不完整,请检查‘来源地’、‘在曹居住地点’、‘返回方式’信息是否填写完整;"); |
|||
bl.set(true); |
|||
} |
|||
if (bl.get()) { |
|||
IcPsTripReportRecordErrorExcel errorRow = new IcPsTripReportRecordErrorExcel(); |
|||
errorRow.setName(data.getName()); |
|||
errorRow.setMobile(data.getMobile()); |
|||
errorRow.setIdCard(data.getIdCard()); |
|||
errorRow.setErrorInfo(errMsg.toString()); |
|||
errorRows.add(errorRow); |
|||
return; |
|||
} |
|||
datas.add(e); |
|||
|
|||
if (datas.size() == MAX_THRESHOLD) { |
|||
execPersist(); |
|||
} |
|||
} catch (Exception e) { |
|||
String errorMsg = null; |
|||
if (e instanceof ValidateException) { |
|||
errorMsg = ((ValidateException) e).getMsg(); |
|||
} else { |
|||
errorMsg = "未知错误"; |
|||
log.error("【行程上报导入】出错:{}", ExceptionUtils.getErrorStackTrace(e)); |
|||
} |
|||
|
|||
IcPsTripReportRecordErrorExcel errorRow = new IcPsTripReportRecordErrorExcel(); |
|||
errorRow.setName(data.getName()); |
|||
errorRow.setMobile(data.getMobile()); |
|||
errorRow.setIdCard(data.getIdCard()); |
|||
errorRow.setErrorInfo(errorMsg); |
|||
errorRows.add(errorRow); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void doAfterAllAnalysed(AnalysisContext context) { |
|||
// 最后几条达不到阈值,这里必须再调用一次
|
|||
execPersist(); |
|||
} |
|||
|
|||
/** |
|||
* 执行持久化 |
|||
*/ |
|||
private void execPersist() { |
|||
try { |
|||
if (datas != null && datas.size() > 0) { |
|||
tripReportRecordService.batchPersist(datas); |
|||
} |
|||
} finally { |
|||
datas.clear(); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 获取错误行 |
|||
* @return |
|||
*/ |
|||
public List<IcPsTripReportRecordErrorExcel> getErrorRows() { |
|||
return errorRows; |
|||
} |
|||
} |
|||
@ -0,0 +1,84 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.IcDangerAreaDTO; |
|||
import com.epmet.dto.form.DangerAreaListFormDTO; |
|||
import com.epmet.entity.IcDangerAreaEntity; |
|||
|
|||
import java.nio.file.Path; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 疫情风险地区 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-31 |
|||
*/ |
|||
public interface IcDangerAreaService extends BaseService<IcDangerAreaEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcDangerAreaDTO> |
|||
* @author generator |
|||
* @date 2022-10-31 |
|||
*/ |
|||
PageData<IcDangerAreaDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcDangerAreaDTO> |
|||
* @author generator |
|||
* @date 2022-10-31 |
|||
*/ |
|||
List<IcDangerAreaDTO> list(Map<String, Object> params); |
|||
|
|||
PageData<IcDangerAreaDTO> list(DangerAreaListFormDTO formDTO); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcDangerAreaDTO |
|||
* @author generator |
|||
* @date 2022-10-31 |
|||
*/ |
|||
IcDangerAreaDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-31 |
|||
*/ |
|||
void save(IcDangerAreaDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-31 |
|||
*/ |
|||
void update(IcDangerAreaDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-31 |
|||
*/ |
|||
void delete(List<String> ids,String staffId); |
|||
|
|||
void execAsyncExcelImport(Path fileSavePath, String taskId, String customerId, String userId); |
|||
} |
|||
@ -0,0 +1,263 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.alibaba.excel.EasyExcel; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|||
import com.epmet.commons.tools.enums.DictTypeEnum; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.utils.FileUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.constants.ImportTaskConstants; |
|||
import com.epmet.dao.IcDangerAreaDao; |
|||
import com.epmet.dto.IcDangerAreaDTO; |
|||
import com.epmet.dto.SysDictDataDTO; |
|||
import com.epmet.dto.form.DangerAreaListFormDTO; |
|||
import com.epmet.dto.form.ImportTaskCommonFormDTO; |
|||
import com.epmet.dto.result.UploadImgResultDTO; |
|||
import com.epmet.entity.IcDangerAreaEntity; |
|||
import com.epmet.excel.IcDangerAreaImportExcel; |
|||
import com.epmet.excel.handler.IcDangerAreaExcelImportListener; |
|||
import com.epmet.feign.EpmetAdminOpenFeignClient; |
|||
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |
|||
import com.epmet.feign.OssFeignClient; |
|||
import com.epmet.service.IcDangerAreaService; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.fileupload.FileItem; |
|||
import org.apache.commons.fileupload.FileItemFactory; |
|||
import org.apache.commons.fileupload.disk.DiskFileItemFactory; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.apache.http.entity.ContentType; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.scheduling.annotation.Async; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.web.multipart.commons.CommonsMultipartFile; |
|||
|
|||
import java.io.IOException; |
|||
import java.io.OutputStream; |
|||
import java.nio.file.Files; |
|||
import java.nio.file.Path; |
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 疫情风险地区 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-31 |
|||
*/ |
|||
@Service |
|||
@Slf4j |
|||
public class IcDangerAreaServiceImpl extends BaseServiceImpl<IcDangerAreaDao, IcDangerAreaEntity> implements IcDangerAreaService { |
|||
|
|||
@Autowired |
|||
private EpmetAdminOpenFeignClient adminOpenFeignClient; |
|||
@Autowired |
|||
private OssFeignClient ossFeignClient; |
|||
@Autowired |
|||
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; |
|||
|
|||
@Override |
|||
public PageData<IcDangerAreaDTO> page(Map<String, Object> params) { |
|||
IPage<IcDangerAreaEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcDangerAreaDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcDangerAreaDTO> list(Map<String, Object> params) { |
|||
List<IcDangerAreaEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcDangerAreaDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<IcDangerAreaDTO> list(DangerAreaListFormDTO formDTO) { |
|||
PageData<IcDangerAreaDTO> result = new PageData<>(); |
|||
LambdaQueryWrapper<IcDangerAreaEntity> qr = new LambdaQueryWrapper<>(); |
|||
qr.like(StringUtils.isNotBlank(formDTO.getName()),IcDangerAreaEntity::getAllName,formDTO.getName()) |
|||
.eq(StringUtils.isNotBlank(formDTO.getDangerLevel()),IcDangerAreaEntity::getDangerLevel,formDTO.getDangerLevel()) |
|||
.orderByDesc(BaseEpmetEntity::getCreatedTime); |
|||
if (formDTO.getIsPage()){ |
|||
PageInfo<IcDangerAreaEntity> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectList(qr)); |
|||
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); |
|||
result.setList(ConvertUtils.sourceToTarget(pageInfo.getList(),IcDangerAreaDTO.class)); |
|||
}else { |
|||
List<IcDangerAreaEntity> entities = baseDao.selectList(qr); |
|||
result.setTotal(entities.size()); |
|||
result.setList(ConvertUtils.sourceToTarget(entities,IcDangerAreaDTO.class)); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
private QueryWrapper<IcDangerAreaEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcDangerAreaEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcDangerAreaDTO get(String id) { |
|||
IcDangerAreaEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcDangerAreaDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* @Description 新增 |
|||
* @param dto |
|||
* @Author zxc |
|||
* @Date 2022/11/1 09:09 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcDangerAreaDTO dto) { |
|||
LambdaQueryWrapper<IcDangerAreaEntity> qw = new LambdaQueryWrapper<>(); |
|||
qw.eq(IcDangerAreaEntity::getAllName,dto.getAllName()); |
|||
IcDangerAreaEntity icDangerAreaEntity = baseDao.selectOne(qw); |
|||
if (null != icDangerAreaEntity){ |
|||
throw new EpmetException(EpmetErrorCode.DANGER_AREA_ERROR.getCode()); |
|||
} |
|||
IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(dto, IcDangerAreaEntity.class); |
|||
String[] split = dto.getAllName().split("-"); |
|||
for (int i = NumConstant.ZERO; i < split.length; i++) { |
|||
switch (i){ |
|||
case NumConstant.ZERO: |
|||
entity.setProvince(split[i]); |
|||
break; |
|||
case NumConstant.ONE: |
|||
entity.setCity(split[i]); |
|||
break; |
|||
case NumConstant.TWO: |
|||
entity.setDistrict(split[i]); |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
} |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcDangerAreaDTO dto) { |
|||
IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(dto, IcDangerAreaEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(List<String> ids,String staffId) { |
|||
LambdaUpdateWrapper<IcDangerAreaEntity> updateWrapper=new LambdaUpdateWrapper<>(); |
|||
updateWrapper.in(IcDangerAreaEntity::getId,ids) |
|||
.set(IcDangerAreaEntity::getUpdatedBy,staffId) |
|||
.set(IcDangerAreaEntity::getUpdatedTime,new Date()) |
|||
.set(IcDangerAreaEntity::getDelFlag, NumConstant.ONE_STR); |
|||
baseDao.update(null,updateWrapper); |
|||
} |
|||
|
|||
@Override |
|||
@Async |
|||
public void execAsyncExcelImport(Path fileSavePath, String taskId, String customerId, String userId) { |
|||
Integer size; |
|||
do { |
|||
size = baseDao.delAllDangerArea(customerId); |
|||
}while (size == NumConstant.ONE_THOUSAND); |
|||
try { |
|||
//获取当前登录用户所属组织id
|
|||
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); |
|||
if (null == staffInfo){ |
|||
throw new EpmetException("未查询到工作人员信息:"+userId); |
|||
} |
|||
// 字典表
|
|||
Result<List<SysDictDataDTO>> dictMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.DANGER_AREA_LEVEL_TYPE.getCode()); |
|||
Map<String, String> dangerLevelMap = dictMapRes.success() && CollectionUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictLabel, SysDictDataDTO::getDictValue)) : new HashMap<>(); |
|||
|
|||
IcDangerAreaExcelImportListener dangerAreaExcelImportListener = new IcDangerAreaExcelImportListener(dangerLevelMap, customerId,this ,baseDao); |
|||
EasyExcel.read(fileSavePath.toFile(), IcDangerAreaImportExcel.class, dangerAreaExcelImportListener).headRowNumber(1).sheet(0).doRead(); |
|||
|
|||
Path errorDescFile = null; |
|||
String errorDesFileUrl = null; |
|||
List<IcDangerAreaImportExcel.IcDangerAreaError> errorRows = dangerAreaExcelImportListener.getErrorRows(); |
|||
boolean failed = CollectionUtils.isNotEmpty(errorRows); |
|||
if (failed) { |
|||
// 生成并上传错误文件
|
|||
try { |
|||
// 文件生成
|
|||
Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_danger_area", "import", "error_des"); |
|||
String fileName = UUID.randomUUID().toString().concat(".xlsx"); |
|||
errorDescFile = errorDescDir.resolve(fileName); |
|||
|
|||
FileItemFactory factory = new DiskFileItemFactory(16, errorDescDir.toFile()); |
|||
FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, fileName); |
|||
OutputStream os = fileItem.getOutputStream(); |
|||
EasyExcel.write(os, IcDangerAreaImportExcel.IcDangerAreaError.class).sheet("导入失败列表").doWrite(errorRows); |
|||
// 文件上传oss
|
|||
Result<UploadImgResultDTO> errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); |
|||
if (errorDesFileUploadResult.success()) { |
|||
errorDesFileUrl = errorDesFileUploadResult.getData().getUrl(); |
|||
} |
|||
} finally { |
|||
if (Files.exists(errorDescFile)) { |
|||
Files.delete(errorDescFile); |
|||
} |
|||
} |
|||
} |
|||
|
|||
ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); |
|||
importFinishTaskForm.setTaskId(taskId); |
|||
importFinishTaskForm.setProcessStatus(failed ? ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL : ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS); |
|||
importFinishTaskForm.setOperatorId(userId); |
|||
importFinishTaskForm.setResultDesc(""); |
|||
importFinishTaskForm.setResultDescFilePath(errorDesFileUrl); |
|||
|
|||
Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); |
|||
if (!result.success()) { |
|||
log.error("【风险地区导入】finishImportTask失败"); |
|||
} |
|||
} catch (Exception e) { |
|||
String errorMsg = ExceptionUtils.getErrorStackTrace(e); |
|||
log.error("【风险地区导入】出错:{}", errorMsg); |
|||
|
|||
ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); |
|||
importFinishTaskForm.setTaskId(taskId); |
|||
importFinishTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); |
|||
importFinishTaskForm.setOperatorId(userId); |
|||
importFinishTaskForm.setResultDesc("导入失败"); |
|||
|
|||
Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); |
|||
if (!result.success()) { |
|||
log.error("【风险地区导入】导入记录状态修改为'完成'失败"); |
|||
} |
|||
} finally { |
|||
// 删除临时文件
|
|||
if (Files.exists(fileSavePath)) { |
|||
try { |
|||
Files.delete(fileSavePath); |
|||
} catch (IOException e) { |
|||
log.error("method exception", e); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
ALTER TABLE `ic_party_member` |
|||
ADD COLUMN `RDSSZZB` varchar(255) NULL COMMENT '入党时所在党支部' AFTER `IS_DYZXH`, |
|||
ADD COLUMN `ZZGXZRSQSJ` varchar(64) NULL COMMENT '组织关系转入社区时间' AFTER `RDSSZZB`, |
|||
ADD COLUMN `IS_QCJ` char(2) NULL COMMENT '是否请长假' AFTER `ZZGXZRSQSJ`; |
|||
|
|||
alter table ic_user_change_record modify column TYPE varchar(64) NOT NULL COMMENT '操作类型【add:新增 category:类别 transfer:调动;logout注销;recovery_moveout恢复迁出;recovery_death恢复死亡】'; |
|||
alter table ic_user_change_record modify column TYPE_NAME varchar(64) NOT NULL COMMENT '操作类型名称【add:新增 category:类别 transfer:调动;logout注销;recovery_moveout恢复迁出;recovery_death恢复死亡】'; |
|||
alter table ic_resi_user modify column SUB_STATUS varchar(10) DEFAULT '01' COMMENT '用户详细状态:01:新增、02:导入、03:迁入、04:新生、11:迁出、21死亡;51迁出恢复;52死亡恢复'; |
|||
|
|||
UPDATE ic_party_member |
|||
SET IS_QCJ = '0' |
|||
WHERE |
|||
IS_QCJ IS NULL; |
|||
@ -0,0 +1,20 @@ |
|||
-- 禅道需求713 |
|||
alter table ic_epidemic_special_attention MODIFY COLUMN `reason` varchar(500) DEFAULT NULL comment '关注原因;后磐石改名为隔离原因'; |
|||
alter table ic_epidemic_special_attention MODIFY COLUMN `remark` varchar(500) DEFAULT NULL comment '备注'; |
|||
|
|||
alter table ic_epidemic_special_attention ADD column GK_START_TIME varchar(32) DEFAULT '' COMMENT '管控开始时间yyyy-MM-dd,需求来源于磐石' AFTER remark; |
|||
alter table ic_epidemic_special_attention ADD column GK_END_TIME varchar(32) DEFAULT '' COMMENT '管控结束时间yyyy-MM-dd,需求来源于磐石' AFTER GK_START_TIME; |
|||
|
|||
alter table ic_epidemic_special_attention ADD column GB_NAME VARCHAR(32) DEFAULT '' COMMENT '镇(街)干部名称,需求来源于磐石' AFTER GK_END_TIME; |
|||
alter table ic_epidemic_special_attention ADD column GB_MOBILE VARCHAR(32) DEFAULT '' COMMENT '镇(街)干部联系方式,需求来源于磐石' AFTER GB_NAME; |
|||
|
|||
alter table ic_epidemic_special_attention ADD column GRID_MANAGER VARCHAR(32) DEFAULT '' COMMENT '村(社区)网格管理员,需求来源于磐石' AFTER GB_MOBILE; |
|||
alter table ic_epidemic_special_attention ADD column GRID_MANAGER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '村(社区)网格管理员联系方式,需求来源于磐石' AFTER GRID_MANAGER; |
|||
alter table ic_epidemic_special_attention ADD column HEALTH_WORKER VARCHAR(32) DEFAULT '' COMMENT '基层医务工作者,需求来源于磐石' AFTER GRID_MANAGER_MOBILE; |
|||
alter table ic_epidemic_special_attention ADD column HEALTH_WORKER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '基层医务工作者联系方式,需求来源于磐石' AFTER HEALTH_WORKER; |
|||
|
|||
alter table ic_epidemic_special_attention ADD column POLICE_NAME VARCHAR(32) DEFAULT '' COMMENT '民警,需求来源于磐石' AFTER HEALTH_WORKER_MOBILE; |
|||
alter table ic_epidemic_special_attention ADD column POLICE_MOBILE VARCHAR(32) DEFAULT '' COMMENT '民警联系方式,需求来源于磐石' AFTER POLICE_NAME; |
|||
|
|||
alter table ic_epidemic_special_attention ADD column VOLUNTEER_NAME VARCHAR(32) DEFAULT '' COMMENT '志愿者,需求来源于磐石' AFTER POLICE_MOBILE; |
|||
alter table ic_epidemic_special_attention ADD column VOLUNTEER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '志愿者联系方式,需求来源于磐石' AFTER VOLUNTEER_NAME; |
|||
@ -0,0 +1,22 @@ |
|||
ALTER TABLE `ic_trip_report_record` |
|||
ADD COLUMN `traffic_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交通方式,来源字典表(traffic_type)' AFTER `UPDATED_TIME`, |
|||
ADD COLUMN `traffic_type_explain` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他返回方式,交通方式为其他时此列需要有值' AFTER `traffic_type`, |
|||
ADD COLUMN `source_detail_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源地详细信息(source_address字段的说明)' AFTER `traffic_type_explain`, |
|||
ADD COLUMN `vaccine_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '疫苗接种针次 (0针 1针 2针 3针)【小寨子】' AFTER `source_detail_address`, |
|||
ADD COLUMN `is_nat_record` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否有48小时核算记录 0:否 1:是 【小寨子】' AFTER `vaccine_num`, |
|||
ADD COLUMN `registered_residence` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '户籍地 【磐石】' AFTER `is_nat_record`, |
|||
ADD COLUMN `age` int(11) NULL DEFAULT NULL COMMENT '年龄【磐石】' AFTER `registered_residence`, |
|||
ADD COLUMN `describe_content` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来曹事由【磐石】' AFTER `age`, |
|||
ADD COLUMN `nat_outcome` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '48小时核算检查结果(0:阴性 1:阳性)【磐石】' AFTER `describe_content`, |
|||
ADD COLUMN `sojourn_history` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '7天内旅居史情况,字典表(sojourn_history)【磐石】' AFTER `nat_outcome`, |
|||
ADD COLUMN `isolate_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '隔离状态,字典表(isolate_type)【磐石】' AFTER `sojourn_history`, |
|||
ADD COLUMN `is_arrive_check` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否落实\"落地检\" 0:否 1:是【磐石】' AFTER `isolate_type`, |
|||
ADD COLUMN `is_arrive` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否达到曹县 0:否 1:是 【磐石】' AFTER `is_arrive_check`, |
|||
ADD COLUMN `reporting_time` date NULL DEFAULT NULL COMMENT '上报时间【磐石】' AFTER `is_arrive`, |
|||
ADD COLUMN `control_measures` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管控措施【磐石】' AFTER `reporting_time`, |
|||
ADD COLUMN `trip_data_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '行程记录类型,字典表(trip_data_type)【磐石】' AFTER `control_measures`; |
|||
|
|||
|
|||
ALTER TABLE `ic_trip_report_record` |
|||
DROP COLUMN `age`; |
|||
|
|||
@ -0,0 +1,20 @@ |
|||
CREATE TABLE `ic_danger_area` |
|||
( |
|||
`ID` varchar(64) NOT NULL COMMENT 'ID', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`DANGER_LEVEL` varchar(10) NOT NULL COMMENT '风险等级;字典表key【dangerAreaLevel】\n0:低风险;\n1:中风险;\n2:高风险;', |
|||
`PROVINCE` varchar(255) NOT NULL COMMENT '省', |
|||
`CITY` varchar(255) DEFAULT NULL COMMENT '市', |
|||
`DISTRICT` varchar(255) DEFAULT NULL COMMENT '区', |
|||
`ALL_NAME` varchar(255) NOT NULL COMMENT '省-市-区', |
|||
`ALL_NAME_CODE` varchar(255) DEFAULT NULL, |
|||
`DEL_FLAG` int(11) NOT NULL, |
|||
`REVISION` int(11) NOT NULL 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`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='疫情风险地区'; |
|||
|
|||
alter table ic_vaccine_prarmeter MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号'; |
|||
@ -0,0 +1,3 @@ |
|||
alter table ic_volunteer_poly MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号'; |
|||
|
|||
alter table ic_volunteer_poly_category MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号'; |
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue