Browse Source

诉求初验和诉求终验接口

feature/dangjian
zhaoqifeng 3 years ago
parent
commit
74b002a02f
  1. 5
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java
  2. 19
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

5
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/controller/ItemController.java

@ -17,6 +17,7 @@
package com.elink.esua.epdc.modules.item.controller;
import com.alibaba.fastjson.JSONObject;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
@ -40,6 +41,7 @@ import com.elink.esua.epdc.modules.item.excel.StayItemExcel;
import com.elink.esua.epdc.modules.item.redis.ItemAutoProcessRedis;
import com.elink.esua.epdc.modules.item.service.ItemService;
import com.elink.esua.epdc.modules.item.service.ItemTimeoutService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -54,6 +56,7 @@ import java.util.Map;
* @author yujintao yujintao@elink-cn.com
* @since v1.0.0 2019-09-04
*/
@Slf4j
@RestController
@RequestMapping("item")
public class ItemController {
@ -546,6 +549,7 @@ public class ItemController {
*/
@PostMapping("earlyInspection")
public Result earlyInspection(@RequestBody ItemInspectionFormDTO dto) {
log.info("诉求初验入参:" + JSONObject.toJSONString(dto));
ValidatorUtils.validateEntity(dto);
itemService.earlyInspection(dto);
return new Result();
@ -561,6 +565,7 @@ public class ItemController {
*/
@PostMapping("endInspection")
public Result endInspection(@RequestBody ItemInspectionFormDTO dto) {
log.info("诉求终验入参:" + JSONObject.toJSONString(dto));
ValidatorUtils.validateEntity(dto);
itemService.endInspection(dto);
return new Result();

19
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -4375,6 +4375,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
@Transactional(rollbackFor = Exception.class)
public void earlyInspection(ItemInspectionFormDTO formDTO) {
Long deptId = SecurityUser.getDeptId();
if (null == deptId) {
throw new RenException("获取当前部门ID失败");
}
CityCenterFromDTO deptDTO = new CityCenterFromDTO();
deptDTO.setDeptId(deptId);
Result<SysDeptDTO> dept = adminFeignClient.getDept(deptDTO);
@ -4386,8 +4389,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
throw new RenException("当前处理层级不是街道级");
}
ItemHandleProcessEntity handleProcessEntity = new ItemHandleProcessEntity();
handleProcessEntity.setHandlerDeptId(formDTO.getHandlerDeptId());
handleProcessEntity.setHandlerDept(formDTO.getHandlerDept());
handleProcessEntity.setHandlerDeptId(deptId);
handleProcessEntity.setHandlerDept(dept.getData().getName());
handleProcessEntity.setItemId(formDTO.getId());
handleProcessEntity.setHandleAdvice(formDTO.getHandleAdvice());
handleProcessEntity.setOutHandleAdvice(formDTO.getOutHandleAdvice());
@ -4405,6 +4408,11 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
//保存处理节点
handleProcessEntity.setState(ItemHandleCategoryEnum.HANDLE_I_HANDLE_CHECK_APPLY.getValue());
itemHandleProcessService.insert(handleProcessEntity);
//变为不可评价
ItemEntity item = new ItemEntity();
item.setId(formDTO.getId());
item.setEvaluationState(NumConstant.ZERO_STR);
baseDao.updateById(item);
//上报
ItemHandleSubmitFormDTO dto = ConvertUtils.sourceToTarget(formDTO, ItemHandleSubmitFormDTO.class);
dto.setHandlerDeptId(deptId);
@ -4432,6 +4440,9 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
@Transactional(rollbackFor = Exception.class)
public void endInspection(ItemInspectionFormDTO formDTO) {
Long deptId = SecurityUser.getDeptId();
if (null == deptId) {
throw new RenException("获取当前部门ID失败");
}
CityCenterFromDTO deptDTO = new CityCenterFromDTO();
deptDTO.setDeptId(deptId);
Result<SysDeptDTO> dept = adminFeignClient.getDept(deptDTO);
@ -4444,8 +4455,8 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
}
ItemHandleProcessEntity handleProcessEntity = new ItemHandleProcessEntity();
handleProcessEntity.setHandlerDeptId(formDTO.getHandlerDeptId());
handleProcessEntity.setHandlerDept(formDTO.getHandlerDept());
handleProcessEntity.setHandlerDeptId(deptId);
handleProcessEntity.setHandlerDept(dept.getData().getName());
handleProcessEntity.setItemId(formDTO.getId());
handleProcessEntity.setHandleAdvice(formDTO.getHandleAdvice());
handleProcessEntity.setOutHandleAdvice(formDTO.getOutHandleAdvice());

Loading…
Cancel
Save