|
@@ -28,20 +28,21 @@ public class ViewMoveGgzy {
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
ViewMoveGgzy viewMove = new ViewMoveGgzy();
|
|
|
+ viewMove.DataZhiXunByChannel("121","工作动态","nmgggzy",JsoupUtilsView.filePath);
|
|
|
}
|
|
|
/**
|
|
|
* 资讯视图
|
|
|
- * @param kpChannelId
|
|
|
+ * @param channelName
|
|
|
* @param hyChannelId
|
|
|
*/
|
|
|
- public void DataZhiXunByChannel(String kpChannelId,String hyChannelId,String tableName){
|
|
|
- Log_Exception.Logger_txt("-------Start-------kpChannelId:" + kpChannelId + "--hyChannelId:" + hyChannelId + "---------Start--------");
|
|
|
+ public void DataZhiXunByChannel(String channelName,String hyChannelId,String tableName,String filePath){
|
|
|
+ Log_Exception.Logger_txt("-------Start-------kpChannelId:" + channelName + "--hyChannelId:" + hyChannelId + "---------Start--------");
|
|
|
String sServiceId = "gov_webdocument";
|
|
|
String sMethodName = "saveDocumentInWeb";//自定义视图
|
|
|
ServiceImplGgzy serviceImplKp=new ServiceImplGgzy();
|
|
|
Annex annex = new Annex();
|
|
|
try {
|
|
|
- List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(kpChannelId,tableName);
|
|
|
+ List<Map<String,String>> allDocInfoFromKPDBdMaps = serviceImplKp.getNmgGgzy(channelName,tableName);
|
|
|
if(allDocInfoFromKPDBdMaps!=null){
|
|
|
int count=0;
|
|
|
for (Map<String,String> map : allDocInfoFromKPDBdMaps) {
|
|
@@ -77,7 +78,7 @@ public class ViewMoveGgzy {
|
|
|
//处理附件
|
|
|
try {
|
|
|
if (documentData.getId() != null) {
|
|
|
- Map<String, Object> getRelFileInfoByDocId = annex.getZhiXunFileInfoByDocId(JsoupUtilsView.filePath,documentData.getId());
|
|
|
+ Map<String, Object> getRelFileInfoByDocId = annex.getZhiXunFileInfoByDocId(filePath,documentData.getId());
|
|
|
if( getRelFileInfoByDocId.get("docRelFile") != null){
|
|
|
oPostData.put("docRelFile", getRelFileInfoByDocId.get("docRelFile"));
|
|
|
}
|
|
@@ -95,7 +96,7 @@ public class ViewMoveGgzy {
|
|
|
System.out.println("===================start=======================");
|
|
|
System.out.println(currentFilePathHtmlUrl);
|
|
|
JsoupUtilsView jsoupUtils = new JsoupUtilsView();
|
|
|
- String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl);
|
|
|
+ String html = jsoupUtils.rexStringHtml(currentFilePathHtmlUrl,filePath);
|
|
|
System.out.println("==============================================");
|
|
|
System.out.println(html);
|
|
|
System.out.println("===================end========================");
|
|
@@ -118,7 +119,7 @@ public class ViewMoveGgzy {
|
|
|
}
|
|
|
}
|
|
|
if(content.equals("文件文章")){
|
|
|
- String url = JsoupUtilsView.filePath +""+ documentData.getUrl();
|
|
|
+ String url = filePath+ documentData.getUrl();
|
|
|
String filename = documentData.getUrl();
|
|
|
String docTitle = documentData.getTitle();
|
|
|
if (documentData.getContent() != null && documentData.getContent() != "") {
|
|
@@ -130,15 +131,12 @@ public class ViewMoveGgzy {
|
|
|
+ "\",\"AppendixId\":\"0\", \"SrcFile\":\"" + filename
|
|
|
+ "\",\"OTHEROPERATION\":0 }";
|
|
|
DOCFILE += "]";
|
|
|
-
|
|
|
oPostData.put("DocFileName", docfilename);
|
|
|
oPostData.put("DOCFILE", DOCFILE);
|
|
|
// oPostData.put("DOCPUBURL",oDispatch);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
try {
|
|
|
System.out.println(oPostData);
|
|
|
Dispatch result = WCMServiceCaller.Call(sServiceId, sMethodName, oPostData, true);
|
|
@@ -210,7 +208,6 @@ public class ViewMoveGgzy {
|
|
|
|
|
|
public String getJg(String jgmc)
|
|
|
{
|
|
|
-
|
|
|
String code = null;
|
|
|
List<DemoDataJiGou> list = new ArrayList<>();
|
|
|
EasyExcel.read(ColumnConfig.fileName, DemoDataJiGou.class, new PageReadListener<DemoDataJiGou>(dataList -> {
|