Browse Source

Merge branch 'dev_import' into develop

master
sunyuchao 4 years ago
parent
commit
c903d13873
  1. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java
  2. 38
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java

@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.epmet.commons.tools.utils.ExcelVerifyInfo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;
@ -17,18 +18,23 @@ import java.util.List;
public class ImportCommunitySelfOrganization extends ExcelVerifyInfo {
@Excel(name = "组织名称", needMerge = true)
@NotBlank(message = "不能为空")
private String organizationName;
@Excel(name = "组织人数", needMerge = true)
//@NotNull(message = "不能为空")
private Integer organizationPersonCount;
@Excel(name = "服务事项", needMerge = true)
@NotBlank(message = "不能为空")
private String serviceItem;
@Excel(name = "负责人", needMerge = true)
@NotBlank(message = "不能为空")
private String principalName;
@Excel(name = "联系电话", needMerge = true)
@NotBlank(message = "不能为空")
private String principalPhone;
@Excel(name = "创建时间", needMerge = true)

38
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql

@ -0,0 +1,38 @@
INSERT INTO ic_activity_unit_relation
SELECT
UUID() AS ID,
CUSTOMER_ID,
AGENCY_ID,
PIDS,
ID AS ACTIVITY_ID,
ACT_ID,
UNIT_ID,
1 AS SORT,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
FROM
ic_party_activity;
UPDATE ic_activity_unit_relation SET ID = REPLACE (ID, '-', '');
INSERT INTO ic_activity_service_relation
SELECT
UUID() AS ID,
CUSTOMER_ID,
AGENCY_ID,
PIDS,
ID AS ACTIVITY_ID,
ACT_ID,
SERVICE_MATTER,
1 AS SORT,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
FROM
ic_party_activity;
UPDATE ic_activity_service_relation SET ID = REPLACE (ID, '-', '');
Loading…
Cancel
Save