|
|
|
@ -111,6 +111,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.joda.time.DateTime; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.core.env.Environment; |
|
|
|
import org.springframework.scheduling.annotation.Async; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
@ -3519,29 +3520,35 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
dto.setHandleCategory(ItemHandleCategoryEnum.HANDLE_CLOSING_CASE_APPLY.getValue()); |
|
|
|
sendItemToDsf(dto, itemHandleProcessEntity); |
|
|
|
} |
|
|
|
//发送到市平台
|
|
|
|
/*try { |
|
|
|
if (NumConstant.ZERO_STR.equals(formDto.getPeopleFlag())) { |
|
|
|
//民生
|
|
|
|
sendCaseLivelihood(entity); |
|
|
|
} else if (NumConstant.ONE_STR.equals(formDto.getPeopleFlag())) { |
|
|
|
//发展
|
|
|
|
sendCaseDevelop(entity); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
StringBuffer str = new StringBuffer(); |
|
|
|
switch (formDto.getPeopleFlag()) { |
|
|
|
case NumConstant.ZERO_STR: |
|
|
|
str.append("民生"); |
|
|
|
break; |
|
|
|
case NumConstant.ONE_STR: |
|
|
|
str.append("发展"); |
|
|
|
break; |
|
|
|
// !!!!!!!只有生产推送市平台
|
|
|
|
Environment environment = SpringContextUtils.getBean(Environment.class); |
|
|
|
String[] activeProfiles = environment.getActiveProfiles(); |
|
|
|
if (activeProfiles.length > 0 && "prod".equals(activeProfiles[0])) { |
|
|
|
log.info("当前运行环境:" + activeProfiles[0]); |
|
|
|
// 发送到市平台
|
|
|
|
try { |
|
|
|
if (NumConstant.ZERO_STR.equals(formDto.getPeopleFlag())) { |
|
|
|
// 民生
|
|
|
|
sendCaseLivelihood(entity); |
|
|
|
} else if (NumConstant.ONE_STR.equals(formDto.getPeopleFlag())) { |
|
|
|
// 发展
|
|
|
|
sendCaseDevelop(entity); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
StringBuffer str = new StringBuffer(); |
|
|
|
switch (formDto.getPeopleFlag()) { |
|
|
|
case NumConstant.ZERO_STR: |
|
|
|
str.append("民生"); |
|
|
|
break; |
|
|
|
case NumConstant.ONE_STR: |
|
|
|
str.append("发展"); |
|
|
|
break; |
|
|
|
} |
|
|
|
str.append("诉求上报,发送事件数据到市中心错误,诉求项目Id->").append(entity.getId()); |
|
|
|
log.error(str.toString()); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
str.append("诉求上报,发送事件数据到市中心错误,诉求项目Id->").append(entity.getId()); |
|
|
|
log.error(str.toString()); |
|
|
|
e.printStackTrace(); |
|
|
|
}*/ |
|
|
|
} |
|
|
|
return entity.getId(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -5565,7 +5572,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
Result<GisGridDTO> gisGridRes = adminFeignClient.getGridByCoordinate(gisFormDTO); |
|
|
|
if (!gisGridRes.success() || null == gisGridRes.getData()) { |
|
|
|
internalRemark = "根据经纬度获取网格信息失败:" + gisGridRes.getMsg(); |
|
|
|
// return;
|
|
|
|
log.error("submitXxxdEventToItem上传到民生诉求异常:"+internalRemark); |
|
|
|
// return;// 测试时候注释掉,让它继续执行
|
|
|
|
}else{ |
|
|
|
gridId = String.valueOf(gisGridRes.getData().getGridId()); |
|
|
|
gridName = gisGridRes.getData().getGridName(); |
|
|
|
@ -5576,11 +5584,22 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem |
|
|
|
submitItemFormDTO.setGridId(gisGridRes.getData().getGridId()); |
|
|
|
submitItemFormDTO.setGrid(gisGridRes.getData().getGridName()); |
|
|
|
} |
|
|
|
submitItemFormDTO.setGridId(1001L); |
|
|
|
submitItemFormDTO.setGrid("test"); |
|
|
|
|
|
|
|
// dev开发环境临时赋值
|
|
|
|
Environment environment = SpringContextUtils.getBean(Environment.class); |
|
|
|
String[] activeProfiles = environment.getActiveProfiles(); |
|
|
|
if (activeProfiles.length > 0 && "dev".equals(activeProfiles[0])) { |
|
|
|
log.info("当前运行环境:" + activeProfiles[0]); |
|
|
|
submitItemFormDTO.setGridId(1001L); |
|
|
|
submitItemFormDTO.setGrid("test"); |
|
|
|
} |
|
|
|
// 复制了一个民生诉求提交方法submitMsFzItemResi =》submitMsFzItemResiForXxxd
|
|
|
|
bssbEventId = this.submitMsFzItemResiForXxxd(submitItemFormDTO); |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(bssbEventId)){ |
|
|
|
//成功返回epdc_item.id,说明提交民生诉求成功,状态改为1
|
|
|
|
internalStatus=NumConstant.ONE_STR; |
|
|
|
log.info("submitXxxdEventToItem上传到民生诉求成功:bssbEventId:"+bssbEventId); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
internalRemark="上传到民生诉求异常"; |
|
|
|
log.error("submitXxxdEventToItem上传到民生诉求异常",e); |
|
|
|
|