Browse Source

集成四个公用模块

feature/zhy_category v1.0.0.200507.Standard
管理员 5 years ago
parent
commit
5923bde071
  1. 12
      .gitmodules
  2. 1
      epdc-cloud-client-yushan
  3. 1
      epdc-cloud-commons-yushan
  4. 30
      epdc-cloud-events/pom.xml
  5. 538
      epdc-cloud-events/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  6. 1
      epdc-cloud-gateway-yushan
  7. 1
      epdc-cloud-parent-yushan
  8. 4
      pom.xml

12
.gitmodules

@ -0,0 +1,12 @@
[submodule "epdc-cloud-client-yushan"]
path = epdc-cloud-client-yushan
url = http://121.42.41.42:7070/r/epdc-cloud-client-yushan.git
[submodule "epdc-cloud-commons-yushan"]
path = epdc-cloud-commons-yushan
url = http://121.42.41.42:7070/r/epdc-cloud-commons-yushan.git
[submodule "epdc-cloud-gateway-yushan"]
path = epdc-cloud-gateway-yushan
url = http://121.42.41.42:7070/r/epdc-cloud-gateway-yushan.git
[submodule "epdc-cloud-parent-yushan"]
path = epdc-cloud-parent-yushan
url = http://121.42.41.42:7070/r/epdc-cloud-parent-yushan.git

1
epdc-cloud-client-yushan

@ -0,0 +1 @@
Subproject commit cc0e5d4a31687b9224edc53d7b8d6414e7005d6a

1
epdc-cloud-commons-yushan

@ -0,0 +1 @@
Subproject commit f49128405cd591b9aab7f129df01518c5aea143e

30
epdc-cloud-events/pom.xml

@ -5,10 +5,10 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-cloud-parent-yunshan</artifactId> <artifactId>epdc-cloud-parent-yushan</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../epdc-cloud-parent-yunshan</relativePath> <relativePath>../epdc-cloud-parent-yushan</relativePath>
</parent> </parent>
<artifactId>epdc-cloud-events</artifactId> <artifactId>epdc-cloud-events</artifactId>
@ -51,19 +51,19 @@
<!-- client start --> <!-- client start -->
<dependency> <dependency>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-cloud-kpi-client</artifactId> <artifactId>epdc-cloud-kpi-client</artifactId>
<version>${epdc-cloud-client.version}</version> <version>${epdc-cloud-client.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-cloud-events-client</artifactId> <artifactId>epdc-cloud-events-client</artifactId>
<version>${epdc-cloud-client.version}</version> <version>${epdc-cloud-client.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-cloud-user-client</artifactId> <artifactId>epdc-cloud-user-client</artifactId>
<version>${epdc-cloud-client.version}</version> <version>${epdc-cloud-client.version}</version>
</dependency> </dependency>
@ -71,36 +71,36 @@
<!-- commons start --> <!-- commons start -->
<dependency> <dependency>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-commons-tools</artifactId> <artifactId>epdc-commons-tools</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-commons-mybatis</artifactId> <artifactId>epdc-commons-mybatis</artifactId>
<version>${epdc-cloud-commons.version}</version> <version>${epdc-cloud-commons.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-commons-tools-wx-ma</artifactId> <artifactId>epdc-commons-tools-wx-ma</artifactId>
<version>${epdc-cloud-commons.version}</version> <version>${epdc-cloud-commons.version}</version>
</dependency> </dependency>
<!-- 版本控制 --> <!-- 版本控制 -->
<dependency> <dependency>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-commons-api-version-control</artifactId> <artifactId>epdc-commons-api-version-control</artifactId>
<version>${epdc-cloud-commons.version}</version> <version>${epdc-cloud-commons.version}</version>
</dependency> </dependency>
<!-- 上报网格平台 --> <!-- 上报网格平台 -->
<dependency> <!-- <dependency>-->
<groupId>com.esua.epdc.yunshan</groupId> <!-- <groupId>com.esua.epdc.yushan</groupId>-->
<artifactId>yunshan-gird-sdk</artifactId> <!-- <artifactId>yushan-gird-sdk</artifactId>-->
<version>${epdc-cloud-commons.version}</version> <!-- <version>${epdc-cloud-commons.version}</version>-->
</dependency> <!-- </dependency>-->
<!-- commons end --> <!-- commons end -->
</dependencies> </dependencies>

538
epdc-cloud-events/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -54,16 +54,16 @@ import com.elink.esua.epdc.dto.result.KpiItemTimeLimitByDeptResultDTO;
import com.elink.esua.epdc.enums.ItemGridPlatformHandleStatusEnum; import com.elink.esua.epdc.enums.ItemGridPlatformHandleStatusEnum;
import com.elink.esua.epdc.enums.ItemHandleCategoryEnum; import com.elink.esua.epdc.enums.ItemHandleCategoryEnum;
import com.elink.esua.epdc.enums.KpiMetaDataEnum; import com.elink.esua.epdc.enums.KpiMetaDataEnum;
import com.elink.esua.epdc.gird.shibei.api.ShiBeiCityGridApi; //import com.elink.esua.epdc.gird.shibei.api.ShiBeiCityGridApi;
import com.elink.esua.epdc.gird.shibei.constant.CommonConstants; //import com.elink.esua.epdc.gird.shibei.constant.CommonConstants;
import com.elink.esua.epdc.gird.shibei.contants.ApiConstants; //import com.elink.esua.epdc.gird.shibei.contants.ApiConstants;
import com.elink.esua.epdc.gird.shibei.dto.GridDto; //import com.elink.esua.epdc.gird.shibei.dto.GridDto;
import com.elink.esua.epdc.gird.shibei.dto.SearchCaseProcessByTaskIdDto; //import com.elink.esua.epdc.gird.shibei.dto.SearchCaseProcessByTaskIdDto;
import com.elink.esua.epdc.gird.shibei.dto.SearchCaseProcessByTaskIdItemDto; //import com.elink.esua.epdc.gird.shibei.dto.SearchCaseProcessByTaskIdItemDto;
import com.elink.esua.epdc.gird.shibei.dto.form.ImageFile; //import com.elink.esua.epdc.gird.shibei.dto.form.ImageFile;
import com.elink.esua.epdc.gird.shibei.dto.form.ReportFile; //import com.elink.esua.epdc.gird.shibei.dto.form.ReportFile;
import com.elink.esua.epdc.gird.shibei.dto.form.SendInputInfoFormDto; //import com.elink.esua.epdc.gird.shibei.dto.form.SendInputInfoFormDto;
import com.elink.esua.epdc.gird.shibei.util.XstreamUtil; //import com.elink.esua.epdc.gird.shibei.util.XstreamUtil;
import com.elink.esua.epdc.modules.async.IssueOverseeResultsTask; import com.elink.esua.epdc.modules.async.IssueOverseeResultsTask;
import com.elink.esua.epdc.modules.async.NewsTask; import com.elink.esua.epdc.modules.async.NewsTask;
import com.elink.esua.epdc.modules.events.dao.ImgDao; import com.elink.esua.epdc.modules.events.dao.ImgDao;
@ -137,8 +137,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
@Autowired @Autowired
private ImgDao imgDao; private ImgDao imgDao;
@Autowired // @Autowired
private ShiBeiCityGridApi shiBeiCityGridApi; // private ShiBeiCityGridApi shiBeiCityGridApi;
@Autowired @Autowired
private ItemGridPlatformService itemGridPlatformService; private ItemGridPlatformService itemGridPlatformService;
@ -575,6 +575,16 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
return baseDao.selectListOfItemHandleProgressByMobile(itemId); return baseDao.selectListOfItemHandleProgressByMobile(itemId);
} }
@Override
public Result queryItemHandle() {
return null;
}
@Override
public Result reportCallback(ItemPlatformProcessFormDTO formDto) {
return null;
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result modifyHandleResult(ItemHandleSubmitFormDTO dto) { public Result modifyHandleResult(ItemHandleSubmitFormDTO dto) {
@ -634,20 +644,20 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
} }
handleProcessEntity.setState(dto.getHandleCategory()); handleProcessEntity.setState(dto.getHandleCategory());
informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_REPORT); informationFormDTO.setTitle(EventsNoticeConstant.NOTICE_REPORT);
GridDto gridDto = null; // GridDto gridDto = null;
try { // try {
gridDto = this.reportCase(dto); // gridDto = this.reportCase(dto);
} catch (Exception e) { // } catch (Exception e) {
return new Result().error("上报网格化平台接口失败" + e.getMessage()); // return new Result().error("上报网格化平台接口失败" + e.getMessage());
} // }
if (null == gridDto || !("0").equals(gridDto.getReturnCode())) { // if (null == gridDto || !("0").equals(gridDto.getReturnCode())) {
// 接口没有返回信息,也没有异常信息 // // 接口没有返回信息,也没有异常信息
return new Result().error("上报网格化平台接口失败" + gridDto.getReturnDescription()); // return new Result().error("上报网格化平台接口失败" + gridDto.getReturnDescription());
} // }
// 记录处理记录 // 记录处理记录
itemHandleProcessService.insert(handleProcessEntity); // itemHandleProcessService.insert(handleProcessEntity);
// 记录平台上报信息 // // 记录平台上报信息
this.saveItemGridPlatformInfo(gridDto, handleProcessEntity); // this.saveItemGridPlatformInfo(gridDto, handleProcessEntity);
} else { } else {
handleProcessEntity.setState(dto.getHandleCategory()); handleProcessEntity.setState(dto.getHandleCategory());
// 更新项目状态 // 更新项目状态
@ -961,29 +971,29 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
return list; return list;
} }
/** // /**
* @param dto // * @param dto
* @return void // * @return void
* @Author yinzuomei // * @Author yinzuomei
* @Description 案件信息上报 // * @Description 案件信息上报
* @Date 2019/12/25 13:00 // * @Date 2019/12/25 13:00
**/ // **/
private GridDto reportCase(ItemHandleSubmitFormDTO dto) throws Exception { // private GridDto reportCase(ItemHandleSubmitFormDTO dto) throws Exception {
ItemEntity entity = baseDao.selectById(dto.getId()); // ItemEntity entity = baseDao.selectById(dto.getId());
// 组装上报信息 // // 组装上报信息
SendInputInfoFormDto sendInputInfoFormDto = packageReportEntity(entity); // SendInputInfoFormDto sendInputInfoFormDto = packageReportEntity(entity);
// 接口请求返回实体,getReturnCode 1失败 0成功(非空) // // 接口请求返回实体,getReturnCode 1失败 0成功(非空)
GridDto gridDto = shiBeiCityGridApi.newSendInputInfo(sendInputInfoFormDto); // GridDto gridDto = shiBeiCityGridApi.newSendInputInfo(sendInputInfoFormDto);
// 保存接口调用日志 // // 保存接口调用日志
String successFlag = YesOrNoEnum.NO.value(); // String successFlag = YesOrNoEnum.NO.value();
if (NumConstant.ZERO_STR.equals(gridDto.getReturnCode())) { // if (NumConstant.ZERO_STR.equals(gridDto.getReturnCode())) {
successFlag = YesOrNoEnum.YES.value(); // successFlag = YesOrNoEnum.YES.value();
} // }
this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REPORT_ITEM.getValue(), // this.saveInterfaceLog(dto.getId(), InterfaceLogBusinessTypeEnum.REPORT_ITEM.getValue(),
ApiConstants.newSendInputInfo, successFlag, XstreamUtil.objectToXml(sendInputInfoFormDto), // ApiConstants.newSendInputInfo, successFlag, XstreamUtil.objectToXml(sendInputInfoFormDto),
XstreamUtil.objectToXml(gridDto)); // XstreamUtil.objectToXml(gridDto));
return gridDto; // return gridDto;
} // }
/** /**
* 保存接口调用日志 * 保存接口调用日志
@ -1005,97 +1015,97 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
interfaceLogService.insert(interfaceLogEntity); interfaceLogService.insert(interfaceLogEntity);
} }
/** // /**
* @param itemEntity // * @param itemEntity
* @return com.elink.esua.gird.shibei.dto.form.SendInputInfoFormDto // * @return com.elink.esua.gird.shibei.dto.form.SendInputInfoFormDto
* @Author yinzuomei // * @Author yinzuomei
* @Description 组装案件信息上报接口入参 // * @Description 组装案件信息上报接口入参
* @Date 2019/12/25 13:14 // * @Date 2019/12/25 13:14
**/ // **/
private SendInputInfoFormDto packageReportEntity(ItemEntity itemEntity) throws Exception { // private SendInputInfoFormDto packageReportEntity(ItemEntity itemEntity) throws Exception {
UserDetail user = SecurityUser.getUser(); // UserDetail user = SecurityUser.getUser();
SendInputInfoFormDto formDto = new SendInputInfoFormDto(); // SendInputInfoFormDto formDto = new SendInputInfoFormDto();
// 案件来源 // // 案件来源
formDto.setInfoSourceID(CommonConstants.INFO_SOURCE_ID); // formDto.setInfoSourceID(CommonConstants.INFO_SOURCE_ID);
// 渠道来源 // // 渠道来源
formDto.setReportDept(CommonConstants.REPORT_DEPT); // formDto.setReportDept(CommonConstants.REPORT_DEPT);
// 案件属性 // // 案件属性
formDto.setInfoTypeID(CommonConstants.INFO_TYPE_ID); // formDto.setInfoTypeID(CommonConstants.INFO_TYPE_ID);
// 案件大类 // // 案件大类
formDto.setInfoBC(CommonConstants.INFO_BC); // formDto.setInfoBC(CommonConstants.INFO_BC);
// 案件小类 // // 案件小类
formDto.setInfoSC(CommonConstants.INFO_SC); // formDto.setInfoSC(CommonConstants.INFO_SC);
// 案件子类 // // 案件子类
formDto.setInfoZC(CommonConstants.INFO_ZC); // formDto.setInfoZC(CommonConstants.INFO_ZC);
// 发生地址 // // 发生地址
formDto.setStandardAddress(itemEntity.getIssueAddress()); // formDto.setStandardAddress(itemEntity.getIssueAddress());
// 问题描述 // // 问题描述
formDto.setDescription(itemEntity.getItemContent());// 测试999勿删谢谢 // formDto.setDescription(itemEntity.getItemContent());// 测试999勿删谢谢
// 反映人 // // 反映人
formDto.setReportPerson(itemEntity.getNickName());// itemEntity.getNickName()测试人员 // formDto.setReportPerson(itemEntity.getNickName());// itemEntity.getNickName()测试人员
// 联系方式 // // 联系方式
formDto.setContactMode(itemEntity.getMobile()); // formDto.setContactMode(itemEntity.getMobile());
double[] gps = GPSUtils.gcj02_To_Gps84(itemEntity.getIssueLatitude(), itemEntity.getIssueLongitude()); // double[] gps = GPSUtils.gcj02_To_Gps84(itemEntity.getIssueLatitude(), itemEntity.getIssueLongitude());
// 坐标X // // 坐标X
formDto.setCoordX(new BigDecimal(gps[1]).setScale(15, BigDecimal.ROUND_HALF_UP)); // formDto.setCoordX(new BigDecimal(gps[1]).setScale(15, BigDecimal.ROUND_HALF_UP));
// 坐标Y // // 坐标Y
formDto.setCoordY(new BigDecimal(gps[0]).setScale(15, BigDecimal.ROUND_HALF_UP)); // formDto.setCoordY(new BigDecimal(gps[0]).setScale(15, BigDecimal.ROUND_HALF_UP));
// 监督员编号 // // 监督员编号
formDto.setKeepersn(""); // formDto.setKeepersn("");
// 操作时间 // // 操作时间
formDto.setInsertTime(new Date()); // formDto.setInsertTime(new Date());
// 操作人 // // 操作人
formDto.setInsertUser(user.getRealName());// // formDto.setInsertUser(user.getRealName());//
// 外系统编号 // // 外系统编号
formDto.setHotLinesn(itemEntity.getId()); // formDto.setHotLinesn(itemEntity.getId());
// 先查询网格对应街道id // // 先查询网格对应街道id
Result<CompleteDeptDTO> completeDeptDTOResult = adminFeignClient.getCompleteDept(itemEntity.getGridId()); // Result<CompleteDeptDTO> completeDeptDTOResult = adminFeignClient.getCompleteDept(itemEntity.getGridId());
if (!completeDeptDTOResult.success()) { // if (!completeDeptDTOResult.success()) {
throw new Exception("根据网格ID获取所有上级机构信息失败" + completeDeptDTOResult.getMsg()); // throw new Exception("根据网格ID获取所有上级机构信息失败" + completeDeptDTOResult.getMsg());
} // }
// 根据街道id查询对应平台的deptCode、streetCode // // 根据街道id查询对应平台的deptCode、streetCode
Result<DeptGridPlatformDTO> deptGridPlatformDTOResult = adminFeignClient.getDeptGridPlatformDTO(completeDeptDTOResult.getData().getStreetId().toString()); // Result<DeptGridPlatformDTO> deptGridPlatformDTOResult = adminFeignClient.getDeptGridPlatformDTO(completeDeptDTOResult.getData().getStreetId().toString());
if (!deptGridPlatformDTOResult.success() || null == deptGridPlatformDTOResult.getData()) { // if (!deptGridPlatformDTOResult.success() || null == deptGridPlatformDTOResult.getData()) {
throw new Exception("根据街道查询平台部门信息失败" + deptGridPlatformDTOResult.getMsg()); // throw new Exception("根据街道查询平台部门信息失败" + deptGridPlatformDTOResult.getMsg());
} // }
//外系统编码 必填!!!!!!! // //外系统编码 必填!!!!!!!
formDto.setDeptCode(deptGridPlatformDTOResult.getData().getDeptCode());// 130099 // formDto.setDeptCode(deptGridPlatformDTOResult.getData().getDeptCode());// 130099
// 街道编码!!!!!!!!!!!! // // 街道编码!!!!!!!!!!!!
formDto.setStreetCode(deptGridPlatformDTOResult.getData().getStreetCode()); // formDto.setStreetCode(deptGridPlatformDTOResult.getData().getStreetCode());
// 网格编码 // // 网格编码
formDto.setGridCode(null); // formDto.setGridCode(null);
formDto.setImageFile(getImageFile(itemEntity.getEventId())); // formDto.setImageFile(getImageFile(itemEntity.getEventId()));
return formDto; // return formDto;
} // }
//
// 组装事件图片 // // 组装事件图片
private ImageFile getImageFile(String eventId) { // private ImageFile getImageFile(String eventId) {
ImageFile imageFile = new ImageFile(); // ImageFile imageFile = new ImageFile();
//查询图片列表 // //查询图片列表
QueryWrapper<ImgEntity> wrapper = new QueryWrapper<>(); // QueryWrapper<ImgEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(eventId), "REFERENCE_ID", eventId); // wrapper.eq(StringUtils.isNotBlank(eventId), "REFERENCE_ID", eventId);
List<ImgEntity> imageList = imgDao.selectList(wrapper); // List<ImgEntity> imageList = imgDao.selectList(wrapper);
if (null != imageList && !imageList.isEmpty()) { // if (null != imageList && !imageList.isEmpty()) {
String url = null; // String url = null;
String filename = null; // String filename = null;
ReportFile reportFile = null; // ReportFile reportFile = null;
List<ReportFile> reportFiles = new ArrayList<>(); // List<ReportFile> reportFiles = new ArrayList<>();
List<String> imgUrlList = this.getUploadDTOList(imageList); // List<String> imgUrlList = this.getUploadDTOList(imageList);
for (String imgUrl : imgUrlList) { // for (String imgUrl : imgUrlList) {
url = imgUrl; // url = imgUrl;
if (org.apache.commons.lang.StringUtils.isNotBlank(url)) { // if (org.apache.commons.lang.StringUtils.isNotBlank(url)) {
filename = url.substring(url.lastIndexOf(CommonConstants.CHAR_ASCII_47) + CommonConstants.NUMBER_ONE); // filename = url.substring(url.lastIndexOf(CommonConstants.CHAR_ASCII_47) + CommonConstants.NUMBER_ONE);
reportFile = new ReportFile(); // reportFile = new ReportFile();
reportFile.setName(filename); // reportFile.setName(filename);
reportFile.setUrl(url); // reportFile.setUrl(url);
reportFile.setBase64string(""); // reportFile.setBase64string("");
reportFiles.add(reportFile); // reportFiles.add(reportFile);
} // }
} // }
imageFile.setReportFileList(reportFiles); // imageFile.setReportFileList(reportFiles);
} // }
return imageFile; // return imageFile;
} // }
//压缩图片并上传到服务器,得到新的地址 //压缩图片并上传到服务器,得到新的地址
private List<String> getUploadDTOList(List<ImgEntity> imageList) { private List<String> getUploadDTOList(List<ImgEntity> imageList) {
@ -1125,73 +1135,73 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
return imgUrlList; return imgUrlList;
} }
/** // /**
* @param gridDto // * @param gridDto
* @param handleProcessEntity // * @param handleProcessEntity
* @return void // * @return void
* @Author yinzuomei // * @Author yinzuomei
* @Description // * @Description
* @Date 2019/12/25 15:29 // * @Date 2019/12/25 15:29
**/ // **/
private void saveItemGridPlatformInfo(GridDto gridDto, ItemHandleProcessEntity handleProcessEntity) { // private void saveItemGridPlatformInfo(GridDto gridDto, ItemHandleProcessEntity handleProcessEntity) {
UserDetail user = SecurityUser.getUser(); // UserDetail user = SecurityUser.getUser();
ItemGridPlatformEntity itemGridPlatformEntity = new ItemGridPlatformEntity(); // ItemGridPlatformEntity itemGridPlatformEntity = new ItemGridPlatformEntity();
itemGridPlatformEntity.setReferenceId(handleProcessEntity.getItemId()); // itemGridPlatformEntity.setReferenceId(handleProcessEntity.getItemId());
itemGridPlatformEntity.setTaskid(gridDto.getTaskId()); // itemGridPlatformEntity.setTaskid(gridDto.getTaskId());
itemGridPlatformEntity.setReportPersonDeptId(user.getDeptId()); // itemGridPlatformEntity.setReportPersonDeptId(user.getDeptId());
itemGridPlatformEntity.setStatus(ItemGridPlatformHandleStatusEnum.HANDLE_SB.getValue()); // itemGridPlatformEntity.setStatus(ItemGridPlatformHandleStatusEnum.HANDLE_SB.getValue());
itemGridPlatformService.insert(itemGridPlatformEntity); // itemGridPlatformService.insert(itemGridPlatformEntity);
//
GridPlatformHandleLogEntity logEntity = new GridPlatformHandleLogEntity(); // GridPlatformHandleLogEntity logEntity = new GridPlatformHandleLogEntity();
logEntity.setItemGridPlatformId(itemGridPlatformEntity.getId()); // logEntity.setItemGridPlatformId(itemGridPlatformEntity.getId());
logEntity.setStatus(ItemGridPlatformHandleStatusEnum.HANDLE_SB.getValue()); // logEntity.setStatus(ItemGridPlatformHandleStatusEnum.HANDLE_SB.getValue());
logEntity.setItemHandleProcessId(handleProcessEntity.getItemId()); // logEntity.setItemHandleProcessId(handleProcessEntity.getItemId());
logEntity.setHandler(user.getRealName()); // logEntity.setHandler(user.getRealName());
logEntity.setHandlingOpinions(handleProcessEntity.getHandleAdvice()); // logEntity.setHandlingOpinions(handleProcessEntity.getHandleAdvice());
logEntity.setHandlingDept(handleProcessEntity.getHandlerDept()); // logEntity.setHandlingDept(handleProcessEntity.getHandlerDept());
logEntity.setHandlingTime(handleProcessEntity.getCreatedTime()); // logEntity.setHandlingTime(handleProcessEntity.getCreatedTime());
gridPlatformHandleLogService.insert(logEntity); // gridPlatformHandleLogService.insert(logEntity);
} // }
@Override // @Override
@Transactional(rollbackFor = Exception.class) // @Transactional(rollbackFor = Exception.class)
public Result queryItemHandle() { // public Result queryItemHandle() {
// 获取已上报网格平台未结案的项目 // // 获取已上报网格平台未结案的项目
List<ItemGridPlatformDTO> gridPlatformDTOList = itemGridPlatformService.listOfGridPlatformItemNotEnd(); // List<ItemGridPlatformDTO> gridPlatformDTOList = itemGridPlatformService.listOfGridPlatformItemNotEnd();
// 拉取处理情况 // // 拉取处理情况
for (ItemGridPlatformDTO dto : // for (ItemGridPlatformDTO dto :
gridPlatformDTOList) { // gridPlatformDTOList) {
SearchCaseProcessByTaskIdDto searchResultDot = shiBeiCityGridApi.searchCaseProcessByTaskId(dto.getTaskid()); // SearchCaseProcessByTaskIdDto searchResultDot = shiBeiCityGridApi.searchCaseProcessByTaskId(dto.getTaskid());
String successFlag = YesOrNoEnum.NO.value(); // String successFlag = YesOrNoEnum.NO.value();
String returnMsgBody = ""; // String returnMsgBody = "";
if (null != searchResultDot) { // if (null != searchResultDot) {
successFlag = YesOrNoEnum.YES.value(); // successFlag = YesOrNoEnum.YES.value();
returnMsgBody = XstreamUtil.objectToXml(searchResultDot); // returnMsgBody = XstreamUtil.objectToXml(searchResultDot);
List<SearchCaseProcessByTaskIdItemDto> progressList = searchResultDot.getRequest(); // List<SearchCaseProcessByTaskIdItemDto> progressList = searchResultDot.getRequest();
if (null != progressList && progressList.size() > 0) { // if (null != progressList && progressList.size() > 0) {
// 删除已有处理记录 // // 删除已有处理记录
this.removeOldHandleProcess(dto.getId()); // this.removeOldHandleProcess(dto.getId());
// 保存新的处理记录 // // 保存新的处理记录
this.insertNewHandleProcess(progressList, dto.getReferenceId(), dto.getId()); // this.insertNewHandleProcess(progressList, dto.getReferenceId(), dto.getId());
// 查询最新处理情况 // // 查询最新处理情况
GridPlatformHandleLogDTO lastHandleLog = gridPlatformHandleLogService.getLastHandleProcess(dto.getId()); // GridPlatformHandleLogDTO lastHandleLog = gridPlatformHandleLogService.getLastHandleProcess(dto.getId());
// 更新网格化平台当前处理状态 // // 更新网格化平台当前处理状态
if (null != lastHandleLog && null != lastHandleLog.getStatus()) { // if (null != lastHandleLog && null != lastHandleLog.getStatus()) {
ItemGridPlatformEntity platformEntity = new ItemGridPlatformEntity(); // ItemGridPlatformEntity platformEntity = new ItemGridPlatformEntity();
platformEntity.setId(dto.getId()); // platformEntity.setId(dto.getId());
platformEntity.setStatus(lastHandleLog.getStatus()); // platformEntity.setStatus(lastHandleLog.getStatus());
itemGridPlatformService.updateById(platformEntity); // itemGridPlatformService.updateById(platformEntity);
} // }
} // }
} // }
// 保存接口调用日志 // // 保存接口调用日志
this.saveInterfaceLog(dto.getReferenceId(), InterfaceLogBusinessTypeEnum.PULL_ITEM_HANDLE_PROCESS.getValue(), // this.saveInterfaceLog(dto.getReferenceId(), InterfaceLogBusinessTypeEnum.PULL_ITEM_HANDLE_PROCESS.getValue(),
ApiConstants.SearchCaseProcessByTaskId, successFlag, dto.getTaskid(), returnMsgBody); // ApiConstants.SearchCaseProcessByTaskId, successFlag, dto.getTaskid(), returnMsgBody);
} // }
//
return new Result(); // return new Result();
} // }
/** /**
* 删除历史网格化平台处理记录 * 删除历史网格化平台处理记录
@ -1212,64 +1222,64 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
gridPlatformHandleLogService.removeHandleProcessByItemGridPlatFormId(itemGridPlatformId); gridPlatformHandleLogService.removeHandleProcessByItemGridPlatFormId(itemGridPlatformId);
} }
/** // /**
* 保存新的网格化平台处理记录 // * 保存新的网格化平台处理记录
* // *
* @return void // * @return void
* @params [progressList] // * @params [progressList]
* @author liuchuang // * @author liuchuang
* @since 2019/12/25 19:27 // * @since 2019/12/25 19:27
*/ // */
private void insertNewHandleProcess(List<SearchCaseProcessByTaskIdItemDto> progressList, String itemId, String itemGridPlatformId) { // private void insertNewHandleProcess(List<SearchCaseProcessByTaskIdItemDto> progressList, String itemId, String itemGridPlatformId) {
//
try { // try {
for (SearchCaseProcessByTaskIdItemDto dto : // for (SearchCaseProcessByTaskIdItemDto dto :
progressList) { // progressList) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Date insertTime = sdf.parse(dto.getInserttime()); // Date insertTime = sdf.parse(dto.getInserttime());
String itemHandleProcessId = UUID.randomUUID().toString().replaceAll("-", ""); // String itemHandleProcessId = UUID.randomUUID().toString().replaceAll("-", "");
// 插入项目处理进度表 // // 插入项目处理进度表
ItemHandleProcessDTO itemHandleProcessDto = new ItemHandleProcessDTO(); // ItemHandleProcessDTO itemHandleProcessDto = new ItemHandleProcessDTO();
itemHandleProcessDto.setId(itemHandleProcessId); // itemHandleProcessDto.setId(itemHandleProcessId);
itemHandleProcessDto.setItemId(itemId); // itemHandleProcessDto.setItemId(itemId);
itemHandleProcessDto.setState(ItemGridPlatformHandleStatusEnum.getValueByName(dto.getItemname())); // itemHandleProcessDto.setState(ItemGridPlatformHandleStatusEnum.getValueByName(dto.getItemname()));
itemHandleProcessDto.setHandleAdvice(dto.getNote()); // itemHandleProcessDto.setHandleAdvice(dto.getNote());
itemHandleProcessDto.setOutHandleAdvice(dto.getNote()); // itemHandleProcessDto.setOutHandleAdvice(dto.getNote());
itemHandleProcessDto.setHandlerDept(dto.getDeptname()); // itemHandleProcessDto.setHandlerDept(dto.getDeptname());
itemHandleProcessDto.setCreatedTime(insertTime); // itemHandleProcessDto.setCreatedTime(insertTime);
itemHandleProcessDto.setUpdatedTime(insertTime); // itemHandleProcessDto.setUpdatedTime(insertTime);
itemHandleProcessService.saveItemHandleProcess(itemHandleProcessDto); // itemHandleProcessService.saveItemHandleProcess(itemHandleProcessDto);
//
// 插入网格化平台处理记录表 // // 插入网格化平台处理记录表
GridPlatformHandleLogEntity gridPlatformHandleLogEntity = new GridPlatformHandleLogEntity(); // GridPlatformHandleLogEntity gridPlatformHandleLogEntity = new GridPlatformHandleLogEntity();
gridPlatformHandleLogEntity.setItemGridPlatformId(itemGridPlatformId); // gridPlatformHandleLogEntity.setItemGridPlatformId(itemGridPlatformId);
gridPlatformHandleLogEntity.setItemHandleProcessId(itemHandleProcessId); // gridPlatformHandleLogEntity.setItemHandleProcessId(itemHandleProcessId);
gridPlatformHandleLogEntity.setStatus(ItemGridPlatformHandleStatusEnum.getValueByName(dto.getItemname())); // gridPlatformHandleLogEntity.setStatus(ItemGridPlatformHandleStatusEnum.getValueByName(dto.getItemname()));
gridPlatformHandleLogEntity.setHandler(dto.getUsername()); // gridPlatformHandleLogEntity.setHandler(dto.getUsername());
gridPlatformHandleLogEntity.setHandlingOpinions(dto.getNote()); // gridPlatformHandleLogEntity.setHandlingOpinions(dto.getNote());
gridPlatformHandleLogEntity.setHandlingDept(dto.getDeptname()); // gridPlatformHandleLogEntity.setHandlingDept(dto.getDeptname());
gridPlatformHandleLogEntity.setHandlingTime(insertTime); // gridPlatformHandleLogEntity.setHandlingTime(insertTime);
gridPlatformHandleLogService.insert(gridPlatformHandleLogEntity); // gridPlatformHandleLogService.insert(gridPlatformHandleLogEntity);
} // }
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} // }
} // }
@Override // @Override
public Result reportCallback(ItemPlatformProcessFormDTO formDto) { // public Result reportCallback(ItemPlatformProcessFormDTO formDto) {
// 获取上报项目信息 // // 获取上报项目信息
ItemGridPlatformDTO platformDto = itemGridPlatformService.getInfoByTaskId(formDto.getTaskid()); // ItemGridPlatformDTO platformDto = itemGridPlatformService.getInfoByTaskId(formDto.getTaskid());
if (null == platformDto) { // if (null == platformDto) {
return new Result(); // return new Result();
} // }
//
// 保存网格化平台处理记录 // // 保存网格化平台处理记录
SearchCaseProcessByTaskIdItemDto taskDto = ConvertUtils.sourceToTarget(formDto, SearchCaseProcessByTaskIdItemDto.class); // SearchCaseProcessByTaskIdItemDto taskDto = ConvertUtils.sourceToTarget(formDto, SearchCaseProcessByTaskIdItemDto.class);
this.insertNewHandleProcess(Collections.singletonList(taskDto), platformDto.getReferenceId(), platformDto.getId()); // this.insertNewHandleProcess(Collections.singletonList(taskDto), platformDto.getReferenceId(), platformDto.getId());
//
return new Result(); // return new Result();
} // }
/** /**
* @Description: 工作端 根据项目的不同处理方式进行短信发放 * @Description: 工作端 根据项目的不同处理方式进行短信发放

1
epdc-cloud-gateway-yushan

@ -0,0 +1 @@
Subproject commit 29307425ebc6c065fa5c2559dd4aa1013a8a7a77

1
epdc-cloud-parent-yushan

@ -0,0 +1 @@
Subproject commit 7d5b8709e3fa8224b3463e120f7b79af1feea28c

4
pom.xml

@ -4,8 +4,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.esua.epdc.yunshan</groupId> <groupId>com.esua.epdc.yushan</groupId>
<artifactId>epdc-cloud-events-yunshan</artifactId> <artifactId>epdc-cloud-events-yushan</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>

Loading…
Cancel
Save