Commit 257f53c0 by 周海峰

日报

parent 2d2d6363
package com.metro.auth.platform.domain.dto;
import lombok.Data;
@Data
public class DailyInfoDTO {
private String content;
private String state;
private String item;
private String title;
}
...@@ -24,13 +24,15 @@ import lombok.Data; ...@@ -24,13 +24,15 @@ import lombok.Data;
*/ */
@Data @Data
public class DailyDTO { public class DailyReqDTO {
private String id;
private String staffCode;
private String content; private String content;
private String state; private String state;
private String pageIndex;
private String pageSize;
} }
package com.metro.auth.platform.domain.dto;
import lombok.Data;
import java.util.List;
@Data
public class DailyRespDTO {
private String id;
private String bigDate;
private String issue;
private String filepath;
private String signTime;
private String state;
//责任编辑
private String zrEdit;
//审核
private String auditMan;
//签发
private String signMan;
private List<DailyInfoDTO> dailyInfoList;
}
package com.metro.auth.platform.metrointerface; package com.metro.auth.platform.metrointerface;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.metro.auth.platform.domain.Pagination;
import com.metro.auth.platform.domain.ResultJson; import com.metro.auth.platform.domain.ResultJson;
import com.metro.auth.platform.domain.dto.DailyDTO; import com.metro.auth.platform.domain.dto.DailyReqDTO;
import com.metro.auth.platform.domain.dto.DailyRespDTO;
import com.metro.auth.platform.http.HttpAPIService; import com.metro.auth.platform.http.HttpAPIService;
import com.metro.auth.platform.outlineapi.PlatformUrlManager; import com.metro.auth.platform.outlineapi.PlatformUrlManager;
import com.metro.auth.platform.utils.SpringUtil; import com.metro.auth.platform.utils.SpringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* .::::. * .::::.
...@@ -33,7 +37,7 @@ import javax.annotation.Resource; ...@@ -33,7 +37,7 @@ import javax.annotation.Resource;
* ```` ':. ':::::::::' ::::.. * ```` ':. ':::::::::' ::::..
* '.:::::' ':'````.. * '.:::::' ':'````..
*/ */
@Slf4j
@RestController @RestController
@RequestMapping("/daily") @RequestMapping("/daily")
public class DailyController { public class DailyController {
...@@ -44,66 +48,57 @@ public class DailyController { ...@@ -44,66 +48,57 @@ public class DailyController {
/** /**
* 功能描述: <br>获取日报信息分页列表 * 功能描述: <br>获取日报信息分页列表
* 〈〉 * 〈〉
*
* @Author: lx * @Author: lx
*/ */
@GetMapping("/new") @GetMapping("/pageList")
public ResultJson queryDailyPageList(DailyDTO dailyDTO){ public ResultJson queryDailyPageList(DailyReqDTO dailyDTO, Integer pageIndex, Integer pageSize) {
String url = SpringUtil.getBean(PlatformUrlManager.class).getPlatformURI(PlatformUrlManager.DAILY_NEW_URL); String url = SpringUtil.getBean(PlatformUrlManager.class).getPlatformURI(PlatformUrlManager.DAILY_NEW_URL);
String finalUrl = url
String result = null; .replace("@{staffCode}", dailyDTO.getStaffCode())
try { .replace("@{state}", dailyDTO.getState())
result = httpAPIService.doGet(url + "?pageIndex=" + dailyDTO.getPageIndex() + "&pageSize=" + dailyDTO.getPageSize() + "&content=" + dailyDTO.getContent() + "&state=" + dailyDTO.getState()); .replace("@{content}", dailyDTO.getContent())
if(!"".equals(result) && result != null){ .replace("@{pageNo}", pageIndex.toString())
return ResultJson.ok(JSONObject.parseObject(result)); .replace("@{pageSize}", pageSize.toString());
String result = httpAPIService.doGet(finalUrl);
if (result != null) {
log.info("日报信息分页列表返回结果:{}", result);
JSONObject jsonObject = JSONObject.parseObject(result);
if (jsonObject.getInteger("code") != 0) {
return ResultJson.ok(jsonObject.getString("msg"));
} }
} catch (Exception e) { JSONObject data = JSONObject.parseObject(jsonObject.get("data").toString());
e.printStackTrace(); String list = data.getString("list");
String total = data.getString("total");
List<DailyRespDTO> dailyRespDTOS = JSONObject.parseArray(list, DailyRespDTO.class);
Pagination pagination = new Pagination(dailyRespDTOS, new Long(total), pageSize, pageIndex);
return ResultJson.ok(pagination);
} }
return ResultJson.ok(result); return ResultJson.ok();
} }
/** /**
* 功能描述: <br>获取日报信息详情 * 功能描述: <br>获取日报信息详情
* 〈〉 * 〈〉
*
* @Author: lx * @Author: lx
*/ */
@GetMapping("/detail/{assembleid}") @GetMapping("/dailyInfo")
public ResultJson getDailyInfoByAssembleid(@PathVariable String assembleid){ public ResultJson getDailyInfoById(DailyReqDTO dailyDTO) {
String url = SpringUtil.getBean(PlatformUrlManager.class).getPlatformURI(PlatformUrlManager.DAILY_DETAIL_URL); String url = SpringUtil.getBean(PlatformUrlManager.class).getPlatformURI(PlatformUrlManager.DAILY_DETAIL_URL);
String finalUrl = url.replace("@{staffCode}", dailyDTO.getStaffCode()).replace("@{id}", dailyDTO.getId());
String result = null; String result = httpAPIService.doGet(finalUrl);
try { if (result != null) {
result = httpAPIService.doGet(url + "/" + assembleid); log.info("日报信息返回结果:{}", result);
if(!"".equals(result) && result != null){ JSONObject jsonObject = JSONObject.parseObject(result);
return ResultJson.ok(JSONObject.parseObject(result)); if (jsonObject.getInteger("code") != 0) {
return ResultJson.ok(jsonObject.getString("message"));
} }
} catch (Exception e) { Object data = jsonObject.get("data");
e.printStackTrace(); DailyRespDTO dailyRespDTO = JSONObject.parseObject(data.toString(), DailyRespDTO.class);
return ResultJson.ok(dailyRespDTO);
} }
return ResultJson.ok(result); return ResultJson.ok();
} }
/**
* 功能描述: <br>获取日报信息实体
* 〈〉
* @Author: lx
*/
@GetMapping("/entity/{id}")
public ResultJson getDailyInfoById(@PathVariable String id){
String url = SpringUtil.getBean(PlatformUrlManager.class).getPlatformURI(PlatformUrlManager.DAILY_ENTITY_URL);
String result = null;
try {
result = httpAPIService.doGet(url + "?id=" + id);
if(!"".equals(result) && result != null){
return ResultJson.ok(JSONObject.parseObject(result));
}
} catch (Exception e) {
e.printStackTrace();
}
return ResultJson.ok(result);
}
} }
...@@ -60,10 +60,6 @@ public class PlatformUrlManager { ...@@ -60,10 +60,6 @@ public class PlatformUrlManager {
*/ */
public static String DAILY_DETAIL_URL; public static String DAILY_DETAIL_URL;
/**
* 获得日报实体接口地址
*/
public static String DAILY_ENTITY_URL;
/** /**
* 获得栏目集合接口地址 * 获得栏目集合接口地址
...@@ -239,11 +235,6 @@ public class PlatformUrlManager { ...@@ -239,11 +235,6 @@ public class PlatformUrlManager {
DAILY_DETAIL_URL = dailyDetailUrl; DAILY_DETAIL_URL = dailyDetailUrl;
} }
@Value("${metro-daily.daily_entity_url}")
public void setDailyEntityUrl(String dailyEntityUrl) {
DAILY_ENTITY_URL = dailyEntityUrl;
}
@Value("${notice-manage.api_column_list_url}") @Value("${notice-manage.api_column_list_url}")
public void setApiColumnListUrl(String apiColumnListUrl) { API_COLUMN_List_URL = apiColumnListUrl; public void setApiColumnListUrl(String apiColumnListUrl) { API_COLUMN_List_URL = apiColumnListUrl;
} }
......
...@@ -111,12 +111,10 @@ metro-meeting: ...@@ -111,12 +111,10 @@ metro-meeting:
#缓存更新---审批 #缓存更新---审批
approval_url: ${IP.url-approve}/weixin/platform/resetPlatform approval_url: ${IP.url-approve}/weixin/platform/resetPlatform
metro-daily: metro-daily:
#日报 #日报分页列表,badge工号
daily_new_url : ${IP.url-daily}/md/MetroDailyAssembleController/metroDailyAssemble/listordersign daily_new_url : http://demo.docmis.cn:23318/admin-api/daily/external/page-visible?badge=@{staffCode}&state=@{state}&content=@{content}&pageNo=@{pageNo}&pageSize=@{pageSize}
#日报详情 #日报详情,badge工号
daily_detail_url : ${IP.url-daily}/md/MetroDailyItemController/metroDailyItem/listbypidassembleid/ daily_detail_url : http://demo.docmis.cn:23318/admin-api/daily/external/detail?badge=@{staffCode}&id=@{id}
#日报实体
daily_entity_url : ${IP.url-daily}/md/MetroDailyAssembleController/metroDailyAssemble
#公告 #公告
notice-manage: notice-manage:
# 公告系统调用设置角色方法时,设置的角色id # 公告系统调用设置角色方法时,设置的角色id
......
...@@ -106,12 +106,10 @@ metro-meeting: ...@@ -106,12 +106,10 @@ metro-meeting:
approval_url: http://10.12.111.48:9102/weixin/platform/resetPlatform approval_url: http://10.12.111.48:9102/weixin/platform/resetPlatform
metro-daily: metro-daily:
#日报 #日报分页列表,badge工号
daily_new_url : http://10.12.111.48:6107/znzl/MetroDailyAssembleController/metroDailyAssemble/listordersign daily_new_url : http://demo.docmis.cn:23318/admin-api/daily/external/page-visible?badge=@{staffCode}&state=@{state}&content=@{content}&pageNo=@{pageNo}&pageSize=@{pageSize}
#日报详情 #日报详情,badge工号
daily_detail_url : http://10.12.111.48:6107/znzl/MetroDailyItemController/metroDailyItem/listbypidassembleid/ daily_detail_url : http://demo.docmis.cn:23318/admin-api/daily/external/detail?badge=@{staffCode}&id=@{id}
#日报实体
daily_entity_url : http://10.12.111.48:6107/znzl/MetroDailyAssembleController/metroDailyAssemble
notice-manage: notice-manage:
# 公告系统调用设置角色方法时,设置的角色id # 公告系统调用设置角色方法时,设置的角色id
...@@ -217,12 +215,11 @@ weixin-params: ...@@ -217,12 +215,11 @@ weixin-params:
upload-params: upload-params:
#测试环境配置 #测试环境配置
# ip.address: http://10.12.111.48:9082/ # ip.address: http://10.12.111.48:9082/
ip.address: http://172.16.100.75:8082/ ip.address: http://demo.docmis.cn:40103/
#前端页面URL推送消息页面跳转使用 #前端页面URL推送消息页面跳转使用
#处理文件上传linux #处理文件上传linux
# upload-path: D:/temp # upload-path: D:/temp
upload-path: /Users/zhouhaifeng/Desktop upload-path: /home/auth/file/
# upload-path: /home/auth/file/
email-params: email-params:
#发送邮箱账户 #发送邮箱账户
email_account: xxx@xxx.com email_account: xxx@xxx.com
......
...@@ -106,12 +106,12 @@ metro-meeting: ...@@ -106,12 +106,12 @@ metro-meeting:
approval_url: http://10.12.111.48:9102/weixin/platform/resetPlatform approval_url: http://10.12.111.48:9102/weixin/platform/resetPlatform
metro-daily: metro-daily:
#日报 #日报分页列表,badge工号
daily_new_url : http://10.12.111.48:6107/znzl/MetroDailyAssembleController/metroDailyAssemble/listordersign daily_new_url : http://demo.docmis.cn:23318/admin-api/daily/external/page-visible?badge=@{staffCode}&state=@{state}&content=@{content}&pageNo=@{pageNo}&pageSize=@{pageSize}
#日报详情 #日报详情,badge工号
daily_detail_url : http://10.12.111.48:6107/znzl/MetroDailyItemController/metroDailyItem/listbypidassembleid/ daily_detail_url : http://demo.docmis.cn:23318/admin-api/daily/external/detail?badge=@{staffCode}&id=@{id}
#日报实体 #日报实体
daily_entity_url : http://10.12.111.48:6107/znzl/MetroDailyAssembleController/metroDailyAssemble # daily_entity_url : http://10.12.111.48:6107/znzl/MetroDailyAssembleController/metroDailyAssemble
notice-manage: notice-manage:
# 公告系统调用设置角色方法时,设置的角色id # 公告系统调用设置角色方法时,设置的角色id
...@@ -218,6 +218,7 @@ upload-params: ...@@ -218,6 +218,7 @@ upload-params:
#测试环境配置 #测试环境配置
# ip.address: http://10.12.111.48:9082/ # ip.address: http://10.12.111.48:9082/
ip.address: http://172.16.100.75:8082/ ip.address: http://172.16.100.75:8082/
# 测试服务器
#前端页面URL推送消息页面跳转使用 #前端页面URL推送消息页面跳转使用
#处理文件上传linux #处理文件上传linux
# upload-path: D:/temp # upload-path: D:/temp
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论