diff --git a/epmet-module/gov-org/gov-org-client/pom.xml b/epmet-module/gov-org/gov-org-client/pom.xml
index f97bdc99ad..124e7ca4a5 100644
--- a/epmet-module/gov-org/gov-org-client/pom.xml
+++ b/epmet-module/gov-org/gov-org-client/pom.xml
@@ -32,6 +32,12 @@
2.0.0
compile
+
+ com.epmet
+ gov-voice-client
+ 2.0.0
+ compile
+
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java
index 84e77dc8da..9cba1d736e 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java
@@ -2,14 +2,15 @@ package com.epmet.dto.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
-import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.feign.fallback.GovOrgSelfFeignClientFallBack;
+import com.epmet.dto.form.PublishGridListFormDTO;
import com.epmet.dto.result.ArticleGridResultDTO;
import com.epmet.dto.result.PublishAgencyListResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
/**
* @Description gov-org服务
@@ -36,12 +37,4 @@ public interface GovOrgSelfFeignClient {
@PostMapping(value = "gov/org/customeragency/getpublishagencylist/{staffId}", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result getPublishAgencyList(@PathVariable("staffId") String staffId);
- /**
- * @param staffId
- * @return
- * @Author sun
- * @Description 根据工作人员Id查询对应的组织信息
- **/
- @PostMapping(value = "gov/org/customeragency/getagencybystaffId/{staffId}", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
- Result getAgencyByStaffId(@PathVariable("staffId") String staffId);
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java
index c75f6e9257..b7c8924ea9 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java
@@ -3,8 +3,8 @@ package com.epmet.dto.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
-import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.feign.GovOrgSelfFeignClient;
+import com.epmet.dto.form.PublishGridListFormDTO;
import com.epmet.dto.result.ArticleGridResultDTO;
import com.epmet.dto.result.PublishAgencyListResultDTO;
import org.springframework.stereotype.Component;
@@ -26,8 +26,4 @@ public class GovOrgSelfFeignClientFallBack implements GovOrgSelfFeignClient {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getPublishAgencyList", staffId);
}
- @Override
- public Result getAgencyByStaffId(String staffId) {
- return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyByStaffId", staffId);
- }
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.java
index 2e83e432c3..8ab4f95bec 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.java
@@ -24,7 +24,7 @@ import java.util.List;
/**
- * 党建声音-可选发布范围-接口返参
+ * 党建声音-可选发布范围、可下线网格列表-接口返参
*
* @author sun
*/
@@ -50,8 +50,16 @@ public class ArticleGridResultDTO implements Serializable {
*/
private List subAgencyGridList;
/**
- * 所有上级机关Ids
+ * 上级组织机构ID
+ */
+ private String pid = "";
+ /**
+ * 所有上级组织机构ID(以英文:隔开)
*/
private String pids = "";
+ /**
+ * 所有上级名称,以-连接
+ */
+ private String allParentName = "";
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
index a5d236f972..6177a24ce6 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
@@ -26,10 +26,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.CustomerAgencyDTO;
-import com.epmet.dto.form.AgencyDeptGridFormDTO;
-import com.epmet.dto.form.CanTickStaffListFormDTO;
-import com.epmet.dto.form.StaffOrgFormDTO;
-import com.epmet.dto.form.TransferOptionalStaffListFormDTO;
+import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.excel.CustomerAgencyExcel;
import com.epmet.service.CustomerAgencyService;
@@ -178,22 +175,10 @@ public class CustomerAgencyController {
* @param staffId
* @return
* @Author sun
- * @Description 党建声音-政府端-可选发布范围接口调用-根据人员角色查询对应的不同发布范围
+ * @Description 党建声音-政府端-可选发布单位接口调用-根据人员角色查询对应的不同发布单位
**/
@PostMapping("getpublishagencylist/{staffId}")
public Result getPublishAgencyList(@PathVariable("staffId") String staffId) {
return new Result().ok(customerAgencyService.getPublishAgencyList(staffId));
}
-
- /**
- * @param staffId
- * @return
- * @Author sun
- * @Description 根据工作人员Id查询对应的组织信息
- **/
- @PostMapping("getagencybystaffId/{staffId}")
- public Result getAgencyByStaffId(@PathVariable("staffId") String staffId) {
- return new Result().ok(customerAgencyService.getAgencyByStaffId(staffId));
- }
-
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
index f7aeb9367e..66586aeec4 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
@@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
-import com.epmet.dto.form.AgencyDeptGridFormDTO;
-import com.epmet.dto.form.CanTickStaffListFormDTO;
-import com.epmet.dto.form.StaffOrgFormDTO;
-import com.epmet.dto.form.TransferOptionalStaffListFormDTO;
+import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity;
@@ -172,12 +169,4 @@ public interface CustomerAgencyService extends BaseService
* @Description 党建声音-政府端-可选发布单位接口调用-根据人员角色查询对应的不同发布单位
**/
PublishAgencyListResultDTO getPublishAgencyList(String staffId);
-
- /**
- * @param staffId
- * @return
- * @Author sun
- * @Description 根据工作人员Id查询对应的组织信息
- **/
- CustomerAgencyDTO getAgencyByStaffId(String staffId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
index 7172d74c7d..bebb36025d 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
@@ -806,21 +806,5 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl gridIdList;
- private String customerId;
-
private String staffId;
}
diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java
new file mode 100644
index 0000000000..4d16716083
--- /dev/null
+++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java
@@ -0,0 +1,25 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 党建声音-可下线网格列表-接口入参
+ *
+ * @author sun
+ */
+@Data
+public class PublishGridListFormDTO implements Serializable {
+ private static final long serialVersionUID = -6659391832410565077L;
+
+ public interface AddUserInternalGroup {}
+
+ /**
+ * 文章Id
+ */
+ @NotBlank(message = "文章id不能为空", groups = {PublishGridListFormDTO.AddUserInternalGroup.class})
+ private String articleId;
+}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java
index 4142598634..d2e2edecfb 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java
@@ -36,7 +36,7 @@ public interface ArticleConstant {
*/
String SELECT_AGRNCY_EXCEPTION = "获取用户组织信息失败";
/**
- * 下线文章(用于拼接操作表字段值)
+ * 下线文章操作记录表文案
*/
- String OFF_LINE_ARTICLE = "下线文章";
+ String OFF_LINE_ARTICLE_MSG = "%s-%s下线文章【%s】";
}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
index 60cc6cb411..859c696487 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
@@ -210,7 +210,6 @@ public class ArticleController {
**/
@PostMapping("offlinearticle")
public Result offLineArticle(@LoginUser TokenDto tokenDTO, @RequestBody OffLineArticleFormDTO formDTO) {
- formDTO.setCustomerId(tokenDTO.getCustomerId());
formDTO.setStaffId(tokenDTO.getUserId());
ValidatorUtils.validateEntity(formDTO, OffLineArticleFormDTO.AddUserInternalGroup.class);
articleService.offLineArticle(formDTO);
@@ -327,4 +326,17 @@ public class ArticleController {
ValidatorUtils.validateEntity(articlePageFormDTO,ArticlePageFormDTO.ArticlePageInternalGroup.class);
return new Result>().ok(articleService.getArticleList(articlePageFormDTO));
}
+
+ /**
+ * @param tokenDTO formDTO
+ * @return
+ * @Author sun
+ * @Description 党建声音-政府端-可下线网格列表
+ **/
+ @PostMapping("publishgridlist")
+ public Result publishGridList(@LoginUser TokenDto tokenDTO, @RequestBody PublishGridListFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, PublishGridListFormDTO.AddUserInternalGroup.class);
+ return new Result().ok(articleService.publishGridList(formDTO));
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java
index e925a7607c..3e85e28dba 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java
@@ -218,4 +218,12 @@ public interface ArticleService extends BaseService {
* @date 2020.06.03 14:19
**/
List getArticleList(ArticlePageFormDTO articlePageFormDTO);
+
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 党建声音-政府端-可下线网格列表
+ **/
+ ArticleGridResultDTO publishGridList(PublishGridListFormDTO formDTO);
}
\ No newline at end of file
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
index dcdcf9daa5..254b85d828 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
@@ -536,18 +536,14 @@ public class ArticleServiceImpl extends BaseServiceImpl resultAgency = govOrgSelfFeignClient.getAgencyByStaffId(formDTO.getStaffId());
- if (null == resultAgency.getData()) {
- throw new RenException(ArticleConstant.SELECT_AGRNCY_EXCEPTION);
- }
- CustomerAgencyDTO agencyDTO = resultAgency.getData();
+ //4.2:查询文章表数据
+ ArticleEntity articleEntity = baseDao.selectById(formDTO.getArticleId());
//4.3:新增操作表数据
ArticleOperateRecordEntity recordEntity = new ArticleOperateRecordEntity();
- recordEntity.setCustomerId(formDTO.getCustomerId());
+ recordEntity.setCustomerId(articleEntity.getCustomerId());
recordEntity.setArticleId(formDTO.getArticleId());
- recordEntity.setOpUser(agencyDTO.getOrganizationName() + "-" + staffDTO.getRealName());
- recordEntity.setContent(recordEntity.getOpUser() + ArticleConstant.OFF_LINE_ARTICLE);
+ recordEntity.setOpUser(articleEntity.getPublisherName() + "-" + staffDTO.getRealName());
+ recordEntity.setContent(String.format(ArticleConstant.OFF_LINE_ARTICLE_MSG, articleEntity.getPublisherName(), staffDTO.getRealName(), articleEntity.getTitle()));
recordEntity.setOpType(ArticleConstant.OFFLINE);
recordEntity.setOpTime(date);
articleOperateRecordService.insert(recordEntity);
@@ -641,4 +637,25 @@ public class ArticleServiceImpl extends BaseServiceImpl rangeEntityList = articlePublishRangeDao.selectByArticleId(rangeEntity);
+ if(null==rangeEntityList||rangeEntityList.size() gridIdList = rangeEntityList.stream().map(ArticlePublishRangeEntity::getGridId).collect(Collectors.toList());
+ formDTO.setGridIdList(gridIdList);*/
+
+ return null;
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticlePublishRangeDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticlePublishRangeDao.xml
index ee2fa6bf60..0052c7414a 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticlePublishRangeDao.xml
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticlePublishRangeDao.xml
@@ -10,7 +10,12 @@
article_publish_range
WHERE
del_flag = '0'
- AND article_id = #{articleId}
+
+ AND article_id = #{articleId}
+
+
+ AND publish_status = #{publishStatus}
+
ORDER BY created_time ASC
\ No newline at end of file