| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- package cn.com.goldenwater.dcproj.model;
- import java.io.Serializable;
- import java.util.*;
- import java.util.concurrent.atomic.AtomicInteger;
- import cn.com.goldenwater.core.model.BaseBean;
- import cn.com.goldenwater.dcproj.annotation.ExcelImport;
- import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
- import io.swagger.annotations.ApiModelProperty;
- import org.apache.commons.collections.CollectionUtils;
- @JsonIgnoreProperties(value = {"handler","hibernateLazyInitializer"})
- public class BisInspPlanMonth extends BaseBean implements Serializable {
- // 序号
- @ExcelImport(titleName = "序号", order = 1, notNull = true, width = 5)
- @ApiModelProperty(value = "序号", name = "ordr")
- private Long ordr;
- // 行政区代码
- //@ExcelImport(titleName = "行政区代码", order = 2, notNull = true, width = 13)
- @ApiModelProperty(value = "行政区代码", name = "adCode")
- private String adCode;
- // 事项内容
- @ExcelImport(titleName = "事项内容", order = 8, width = 40)
- @ApiModelProperty(value = "事项内容", name = "chkTitle")
- private String chkTitle;
- // 年月
- @ExcelImport(titleName = "年月", order = 5, width = 14)
- @ApiModelProperty(value = "年月", name = "chkMonth")
- private Date chkMonth;
- // 检查实施单位
- @ExcelImport(titleName = "检查实施单位", order = 6)
- @ApiModelProperty(value = "检查实施单位", name = "chkDep")
- private String chkDep;
- // 检查组
- @ExcelImport(titleName = "检查组", order = 7, notNull = true)
- @ApiModelProperty(value = "检查组", name = "chkGrp")
- private String chkGrp;
- // 拟检查开始时间(到日)
- @ExcelImport(titleName = "拟检查开始时间(到日)", order = 9, notNull = true, width = 14)
- @ApiModelProperty(value = "拟检查开始时间(到日)", name = "planSttm")
- private Date planSttm;
- // 拟检查结束时间(到日)
- @ExcelImport(titleName = "拟检查结束时间(到日)", order = 10, notNull = true, width = 14)
- @ApiModelProperty(value = "拟检查结束时间(到日)", name = "planEntm")
- private Date planEntm;
- // 是否到市水利局现场
- @ExcelImport(titleName = "是否到市水利(水务)局", order = 11, notNull = true, width = 15)
- @ApiModelProperty(value = "是否到市水利局现场", name = "leadDep")
- private String leadDep;
- // 到市水利局现场名称
- @ExcelImport(titleName = "水利(水务)局名称", order = 12, width = 20)
- @ApiModelProperty(value = "水利(水务)局名称", name = "joinDep")
- private String joinDep;
- // 检查区域市水利(水务)局
- @ApiModelProperty(value = "检查区域市水利(水务)局", name = "chkCity")
- @ExcelImport(titleName = "行政区划(市)", order = 13, width = 40, isImport = false)
- private String chkCity;
- // 检查区区、县(市)
- @ApiModelProperty(value = "检查区区、县(市)", name = "chkCountry")
- @ExcelImport(titleName = "行政区划(区县)", order = 14, width = 40, isImport = false)
- private String chkCountry;
- // 项目数量
- @ExcelImport(titleName = "项目数量", order = 15, notNull = true)
- @ApiModelProperty(value = "项目数量", name = "chkSize")
- private Long chkSize;
- // 开展方式
- @ExcelImport(titleName = "开展方式", order = 16, notNull = true)
- @ApiModelProperty(value = "开展方式", name = "chkType")
- private String chkType;
- // 联络人
- @ExcelImport(titleName = "联络人", order = 17, notNull = true)
- @ApiModelProperty(value = "联络人", name = "chkPers")
- private String chkPers;
- // 联络人联系方式
- @ExcelImport(titleName = "联络人联系方式", order = 18, notNull = true, width = 14)
- @ApiModelProperty(value = "联络人联系方式", name = "chkPersTel")
- private String chkPersTel;
- // 统筹调度意见
- @ExcelImport(titleName = "统筹调度意见", order = 19, width = 25)
- @ApiModelProperty(value = "统筹调度意见", name = "chkNote")
- private String chkNote;
- // 创建人
- @ApiModelProperty(value = "创建人", name = "persId")
- private String persId;
- // 创建时间
- @ApiModelProperty(value = "创建时间", name = "intm")
- private Date intm;
- // 修改时间
- @ApiModelProperty(value = "修改时间", name = "uptm")
- private Date uptm;
- // 数据状态(0:正常;9:删除)
- @ApiModelProperty(value = "数据状态(0:正常;9:删除)", name = "dataStat")
- private String dataStat;
- // ID
- @ApiModelProperty(value = "ID", name = "id")
- private String id;
- @ApiModelProperty(value = "重复表示颜色", name = "color")
- private String color;
- @ExcelImport(titleName = "行政区划(市)", order = 13, width = 40, isExport = false)
- private String chkCityCode;
- @ExcelImport(titleName = "行政区划(区县)", order = 14, width = 40, isExport = false)
- private String chkCountryCode;
- private List<BisInspPlanMonthArea> area;
- private boolean isRepeat;
- private String repeatId;
- // 年度检查计划id
- @ApiModelProperty(value="年度检查计划id",name="yearPlanId")
- private String yearPlanId;
- // 年度检查计划名称
- @ApiModelProperty(value="年度检查计划名称",name="yearChkName")
- @ExcelImport(titleName = "年度检查计划名称", order = 2, width = 35)
- private String yearChkName;
- // 年度检查类别
- @ApiModelProperty(value="年度检查类别",name="yearChkType")
- @ExcelImport(titleName = "年度检查类别", order = 3, width = 35)
- private String yearChkType;
- // 组织检查处室
- @ApiModelProperty(value="组织检查处室",name="organDep")
- private String organDep;
- public String getOrganDep() {
- return organDep;
- }
- public void setOrganDep(String organDep) {
- this.organDep = organDep;
- }
- public BisInspPlanMonth() {
- }
- public Long getOrdr() {
- return ordr;
- }
- public void setOrdr(Long ordr) {
- this.ordr = ordr;
- }
- public String getAdCode() {
- return adCode;
- }
- public void setAdCode(String adCode) {
- this.adCode = adCode;
- }
- public String getChkTitle() {
- return chkTitle;
- }
- public void setChkTitle(String chkTitle) {
- this.chkTitle = chkTitle;
- }
- public Date getChkMonth() {
- return chkMonth;
- }
- public void setChkMonth(Date chkMonth) {
- this.chkMonth = chkMonth;
- }
- public String getChkDep() {
- return chkDep;
- }
- public void setChkDep(String chkDep) {
- this.chkDep = chkDep;
- }
- public String getChkGrp() {
- return chkGrp;
- }
- public void setChkGrp(String chkGrp) {
- this.chkGrp = chkGrp;
- }
- public Date getPlanSttm() {
- return planSttm;
- }
- public void setPlanSttm(Date planSttm) {
- this.planSttm = planSttm;
- }
- public Date getPlanEntm() {
- return planEntm;
- }
- public void setPlanEntm(Date planEntm) {
- this.planEntm = planEntm;
- }
- public String getLeadDep() {
- return leadDep;
- }
- public void setLeadDep(String leadDep) {
- this.leadDep = leadDep;
- }
- public String getJoinDep() {
- return joinDep;
- }
- public void setJoinDep(String joinDep) {
- this.joinDep = joinDep;
- }
- public String getChkCity() {
- return chkCity;
- }
- public void setChkCity(String chkCity) {
- this.chkCity = chkCity;
- }
- public String getChkCountry() {
- return chkCountry;
- }
- public void setChkCountry(String chkCountry) {
- this.chkCountry = chkCountry;
- }
- public Long getChkSize() {
- return chkSize;
- }
- public void setChkSize(Long chkSize) {
- this.chkSize = chkSize;
- }
- public String getChkType() {
- return chkType;
- }
- public void setChkType(String chkType) {
- this.chkType = chkType;
- }
- public String getChkPers() {
- return chkPers;
- }
- public void setChkPers(String chkPers) {
- this.chkPers = chkPers;
- }
- public String getChkPersTel() {
- return chkPersTel;
- }
- public void setChkPersTel(String chkPersTel) {
- this.chkPersTel = chkPersTel;
- }
- public String getChkNote() {
- return chkNote;
- }
- public void setChkNote(String chkNote) {
- this.chkNote = chkNote;
- }
- public String getPersId() {
- return persId;
- }
- public void setPersId(String persId) {
- this.persId = persId;
- }
- public Date getIntm() {
- return intm;
- }
- public void setIntm(Date intm) {
- this.intm = intm;
- }
- public Date getUptm() {
- return uptm;
- }
- public void setUptm(Date uptm) {
- this.uptm = uptm;
- }
- public String getDataStat() {
- return dataStat;
- }
- public void setDataStat(String dataStat) {
- this.dataStat = dataStat;
- }
- public String getId() {
- return id;
- }
- public void setId(String id) {
- this.id = id;
- }
- public List<BisInspPlanMonthArea> getArea() {
- return area;
- }
- public void setArea(List<BisInspPlanMonthArea> area) { this.area = area; }
- public boolean isRepeat() {
- return isRepeat;
- }
- public void setRepeat(boolean repeat) {
- isRepeat = repeat;
- }
- public String getRepeatId() {
- return repeatId;
- }
- public void setRepeatId(String repeatId) {
- this.repeatId = repeatId;
- }
- public String getChkCityCode() {
- return chkCityCode;
- }
- public void setChkCityCode(String chkCityCode) {
- this.chkCityCode = chkCityCode;
- }
- public String getChkCountryCode() {
- return chkCountryCode;
- }
- public void setChkCountryCode(String chkCountryCode) {
- this.chkCountryCode = chkCountryCode;
- }
- public String getColor() {
- return color;
- }
- public void setColor(String color) {
- this.color = color;
- }
- public String getYearPlanId() {
- return yearPlanId;
- }
- public void setYearPlanId(String yearPlanId) {
- this.yearPlanId = yearPlanId;
- }
- public String getYearChkName() {
- return yearChkName;
- }
- public void setYearChkName(String yearChkName) {
- this.yearChkName = yearChkName;
- }
- public String getYearChkType() {
- return yearChkType;
- }
- public void setYearChkType(String yearChkType) {
- this.yearChkType = yearChkType;
- }
- public void verifyRepeat(BisInspPlanMonth obj, Map<String, String> idAndColorMap, AtomicInteger colorCount) {
- List<String> cityCountryCode1 = obj.getChkCountry() == null ? new ArrayList<>() : Arrays.asList(obj.getChkCountryCode().split(","));
- List<String> cityCountryCode2 = this.getChkCountry() == null ? new ArrayList<>() : Arrays.asList(this.getChkCountryCode().split(","));
- Collection union = CollectionUtils.intersection(cityCountryCode1, cityCountryCode2);
- if(union.size() > 0) {
- this.setRepeatId(this.getRepeatId() + "," + obj.getId());
- this.setRepeat(true);
- String color1 = idAndColorMap.get(this.getId());
- String color2 = idAndColorMap.get(obj.getId());
- String newColor = "";
- if (color1 == null && color2 == null) { //生成新颜色
- newColor = colorCount.getAndIncrement() + "";
- } else if (color1 != null && color2 != null && !color1.equals(color2)) { //合并颜色
- newColor = colorCount.getAndIncrement() + "";
- String finalNewColor = newColor;
- idAndColorMap.forEach((k, v) -> {
- if(v.equals(color1) || v.equals(color2)){
- idAndColorMap.put(k, finalNewColor);
- }
- });
- } else {
- if (color1 != null) {newColor = color1;}
- if (color2 != null) {newColor = color2;}
- }
- idAndColorMap.put(this.getId(), newColor);
- idAndColorMap.put(obj.getId(), newColor);
- }
- }
- }
|