Browse Source

事件内容 截取1000

master
jianjun 4 years ago
parent
commit
f156a2294b
  1. 10
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseDisputeProcessServiceImpl.java

10
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseDisputeProcessServiceImpl.java

@ -32,6 +32,7 @@ import com.epmet.opendata.service.BaseDisputeProcessService;
import com.epmet.opendata.service.ExDeptService;
import com.epmet.opendata.service.ExUserService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -100,7 +101,12 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr
entity.setEventName(item.getEventName());
entity.setHappenDate(item.getHappenDate());
entity.setHappenPlace(item.getHappenPlace());
entity.setEventDescription(item.getEventDescription());
String eventDescription = item.getEventDescription();
//如果不为空 长度控制1000以内
if (StringUtils.isNotBlank(eventDescription) && eventDescription.length() > NumConstant.ONE_THOUSAND){
eventDescription = eventDescription.substring(NumConstant.ZERO,NumConstant.ONE_THOUSAND);
}
entity.setEventDescription(eventDescription);
entity.setLng(null == item.getLng()?null:item.getLng().toPlainString());
entity.setLat(null == item.getLat()?null:item.getLat().toPlainString());
entity.setCreateBy(null == userMap.get(item.getReporterId())?null:String.valueOf(userMap.get(item.getReporterId())));
@ -124,4 +130,4 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr
baseConflictsResolveService.saveOrUpdateBatch(resolveList, formDTO.getPageSize());
}
}
}
}

Loading…
Cancel
Save