Merge remote-tracking branch 'origin/mdc' into mdc
# Conflicts: # jeecg-module-app/src/main/java/org/jeecg/modules/controller/AlarmController.java
This commit is contained in:
commit
7c3d044d5e
|
@ -48,6 +48,10 @@ public class EmailLogEvent {
|
|||
*/
|
||||
private Date logTime;
|
||||
|
||||
private Long threadId;
|
||||
|
||||
private Integer batchesCounter;
|
||||
|
||||
public EmailLogEvent(){
|
||||
|
||||
}
|
||||
|
@ -60,7 +64,9 @@ public class EmailLogEvent {
|
|||
this.logTime = new Date();
|
||||
}
|
||||
|
||||
public EmailLogEvent(String gsType,String logProcess) {
|
||||
public EmailLogEvent(Integer batchesCounter,Long threadId,String gsType,String logProcess) {
|
||||
this.batchesCounter = batchesCounter;
|
||||
this.threadId = threadId;
|
||||
this.gsType = gsType;
|
||||
this.logProcess = logProcess;
|
||||
this.logTime = new Date();
|
||||
|
@ -73,7 +79,18 @@ public class EmailLogEvent {
|
|||
this.logTime = new Date();
|
||||
}
|
||||
|
||||
public EmailLogEvent(String gsType,String state, String logProcess,String phdMailLoadPath) {
|
||||
public EmailLogEvent(Integer batchesCounter,Long threadId,String gsType,String state, String logProcess) {
|
||||
this.batchesCounter = batchesCounter;
|
||||
this.threadId = threadId;
|
||||
this.gsType = gsType;
|
||||
this.state = state;
|
||||
this.logProcess = logProcess;
|
||||
this.logTime = new Date();
|
||||
}
|
||||
|
||||
public EmailLogEvent(Integer batchesCounter,Long threadId,String gsType,String state, String logProcess,String phdMailLoadPath) {
|
||||
this.batchesCounter = batchesCounter;
|
||||
this.threadId = threadId;
|
||||
this.gsType = gsType;
|
||||
this.state = state;
|
||||
this.logProcess = logProcess;
|
||||
|
@ -81,7 +98,9 @@ public class EmailLogEvent {
|
|||
this.logTime = new Date();
|
||||
}
|
||||
|
||||
public EmailLogEvent(String gsType,String state, String logProcess,String subject,String recieveTime,String emlPath) {
|
||||
public EmailLogEvent(Integer batchesCounter,Long threadId,String gsType,String state, String logProcess,String subject,String recieveTime,String emlPath) {
|
||||
this.batchesCounter = batchesCounter;
|
||||
this.threadId = threadId;
|
||||
this.gsType = gsType;
|
||||
this.state = state;
|
||||
this.logProcess = logProcess;
|
||||
|
@ -91,7 +110,9 @@ public class EmailLogEvent {
|
|||
this.logTime = new Date();
|
||||
}
|
||||
|
||||
public EmailLogEvent(String gsType,String state, String logProcess,String subject,String recieveTime) {
|
||||
public EmailLogEvent(Integer batchesCounter,Long threadId,String gsType,String state, String logProcess,String subject,String recieveTime) {
|
||||
this.batchesCounter = batchesCounter;
|
||||
this.threadId = threadId;
|
||||
this.gsType = gsType;
|
||||
this.state = state;
|
||||
this.logProcess = logProcess;
|
||||
|
|
|
@ -201,6 +201,11 @@ public class EmailLogManager {
|
|||
*/
|
||||
private String getIdHeaderLog(EmailLogEvent event){
|
||||
StringBuilder logContent = new StringBuilder();
|
||||
logContent.append("Batches: ");
|
||||
logContent.append(event.getBatchesCounter());
|
||||
logContent.append(" ThreadId: ");
|
||||
logContent.append(event.getThreadId());
|
||||
logContent.append(StringConstant.SPACE);
|
||||
logContent.append(DateUtils.formatDate(event.getLogTime(),"yyyy-MM-dd HH:mm:ss"));
|
||||
logContent.append(" Get FileNameHeader ");
|
||||
logContent.append(event.getState());
|
||||
|
@ -217,6 +222,11 @@ public class EmailLogManager {
|
|||
*/
|
||||
private String getIdBodyLog(EmailLogEvent event){
|
||||
StringBuilder logContent = new StringBuilder();
|
||||
logContent.append("Batches: ");
|
||||
logContent.append(event.getBatchesCounter());
|
||||
logContent.append(" ThreadId: ");
|
||||
logContent.append(event.getThreadId());
|
||||
logContent.append(StringConstant.SPACE);
|
||||
logContent.append(DateUtils.formatDate(event.getLogTime(),"yyyy-MM-dd HH:mm:ss"));
|
||||
logContent.append(" Get File ");
|
||||
logContent.append(event.getPhdMailLoadPath());
|
||||
|
@ -234,6 +244,11 @@ public class EmailLogManager {
|
|||
*/
|
||||
private String getIdEmlLog(EmailLogEvent event){
|
||||
StringBuilder logContent = new StringBuilder();
|
||||
logContent.append("Batches: ");
|
||||
logContent.append(event.getBatchesCounter());
|
||||
logContent.append(" ThreadId: ");
|
||||
logContent.append(event.getThreadId());
|
||||
logContent.append(StringConstant.SPACE);
|
||||
logContent.append(DateUtils.formatDate(event.getLogTime(),"yyyy-MM-dd HH:mm:ss"));
|
||||
logContent.append(" Get File subject:");
|
||||
logContent.append(event.getSubject());
|
||||
|
@ -255,6 +270,11 @@ public class EmailLogManager {
|
|||
*/
|
||||
private String getDeleteLog(EmailLogEvent event){
|
||||
StringBuilder logContent = new StringBuilder();
|
||||
logContent.append("Batches: ");
|
||||
logContent.append(event.getBatchesCounter());
|
||||
logContent.append(" ThreadId: ");
|
||||
logContent.append(event.getThreadId());
|
||||
logContent.append(StringConstant.SPACE);
|
||||
logContent.append(DateUtils.formatDate(event.getLogTime(),"yyyy-MM-dd HH:mm:ss"));
|
||||
logContent.append(" Delete File subject:");
|
||||
logContent.append(event.getSubject());
|
||||
|
@ -274,6 +294,11 @@ public class EmailLogManager {
|
|||
*/
|
||||
private String getExpungeLog(EmailLogEvent event){
|
||||
StringBuilder logContent = new StringBuilder();
|
||||
logContent.append("Batches: ");
|
||||
logContent.append(event.getBatchesCounter());
|
||||
logContent.append(" ThreadId: ");
|
||||
logContent.append(event.getThreadId());
|
||||
logContent.append(StringConstant.SPACE);
|
||||
logContent.append(DateUtils.formatDate(event.getLogTime(),"yyyy-MM-dd HH:mm:ss"));
|
||||
logContent.append(" Expunge File subject:");
|
||||
logContent.append(event.getSubject());
|
||||
|
@ -293,6 +318,11 @@ public class EmailLogManager {
|
|||
*/
|
||||
private String getDoneLog(EmailLogEvent event){
|
||||
StringBuilder logContent = new StringBuilder();
|
||||
logContent.append("Batches: ");
|
||||
logContent.append(event.getBatchesCounter());
|
||||
logContent.append(" ThreadId: ");
|
||||
logContent.append(event.getThreadId());
|
||||
logContent.append(StringConstant.SPACE);
|
||||
logContent.append(DateUtils.formatDate(event.getLogTime(),"yyyy-MM-dd HH:mm:ss"));
|
||||
logContent.append(" Done");
|
||||
logContent.append(LOG_SUFFIX);
|
||||
|
|
|
@ -436,7 +436,7 @@ public class EmailServiceManager {
|
|||
* @param message
|
||||
* @return
|
||||
*/
|
||||
public String getMailSubject(@NotNull Message message) throws MessagingException {
|
||||
public String getMailSubject(@NotNull Message message,Integer batchesCounter) throws MessagingException {
|
||||
String subject = "";
|
||||
String status = EmailLogManager.STATUS_SUCCESS;
|
||||
try {
|
||||
|
@ -447,7 +447,7 @@ public class EmailServiceManager {
|
|||
status = EmailLogManager.STATUS_ERROR;
|
||||
throw e;
|
||||
}finally {
|
||||
EmailLogEvent event = new EmailLogEvent(EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDHEADER);
|
||||
EmailLogEvent event = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDHEADER);
|
||||
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),event);
|
||||
}
|
||||
return subject;
|
||||
|
@ -518,7 +518,7 @@ public class EmailServiceManager {
|
|||
* 新格式为:发件人_主题_年月日_时分秒毫秒_receive_年月日_时分秒毫秒_计数(0-10000)
|
||||
* 当计数大于10000后从0开始,服务重启后也从0开始
|
||||
*/
|
||||
public File downloadEmailToEmlDir(@NotNull Message message,Integer emailCounter) throws MessagingException {
|
||||
public File downloadEmailToEmlDir(@NotNull Message message,Integer emailCounter,Integer batchesCounter) throws MessagingException {
|
||||
String subject = "";
|
||||
File emlFile = null;
|
||||
String status = EmailLogManager.STATUS_SUCCESS;
|
||||
|
@ -556,7 +556,24 @@ public class EmailServiceManager {
|
|||
final String rootPath = spectrumPathProperties.getRootPath();
|
||||
final String emlPath = spectrumPathProperties.getEmlPath();
|
||||
emlFile = new File(rootPath+emlPath+File.separator+fileName);
|
||||
message.writeTo(new FileOutputStream(emlFile));
|
||||
// message.writeTo(new FileOutputStream(emlFile));
|
||||
|
||||
int bufferSize = 1024 * 1024; // 1M
|
||||
InputStream inputStream = message.getInputStream();
|
||||
BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream, bufferSize);
|
||||
// 或者使用 BufferedOutputStream
|
||||
OutputStream outputStream = new FileOutputStream(emlFile);
|
||||
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream, bufferSize);
|
||||
// 从邮件的输入流读取内容,并写入到本地文件
|
||||
byte[] buffer = new byte[bufferSize];
|
||||
int bytesRead;
|
||||
while ((bytesRead = bufferedInputStream.read(buffer)) != -1) {
|
||||
bufferedOutputStream.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
// 关闭流
|
||||
bufferedInputStream.close();
|
||||
bufferedOutputStream.close();
|
||||
} catch (MessagingException | IOException e) {
|
||||
// 下载邮件失败 抛出自定义邮件下载异常
|
||||
status = EmailLogManager.STATUS_ERROR;
|
||||
|
@ -564,7 +581,7 @@ public class EmailServiceManager {
|
|||
log.error(errorMsg);
|
||||
throw new DownloadEmailException(errorMsg);
|
||||
}finally {
|
||||
EmailLogEvent event = new EmailLogEvent(EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDEML,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"),
|
||||
EmailLogEvent event = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDEML,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"),
|
||||
(Objects.isNull(emlFile)?" ":emlFile.getAbsolutePath()));
|
||||
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),event);
|
||||
}
|
||||
|
@ -576,7 +593,7 @@ public class EmailServiceManager {
|
|||
* @param message
|
||||
* @throws MessagingException
|
||||
*/
|
||||
public void removeMail(@NotNull Message message){
|
||||
public void removeMail(@NotNull Message message,Integer batchesCounter){
|
||||
String status = EmailLogManager.STATUS_SUCCESS;
|
||||
String subject = "";
|
||||
Date receivedDate = null;
|
||||
|
@ -589,10 +606,10 @@ public class EmailServiceManager {
|
|||
log.error("Email deletion failed, the subject of the email is :{}, the reason is :{}.",subject,e.getMessage());
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
EmailLogEvent removeEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET,status,EmailLogManager.DELETEID,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"));
|
||||
EmailLogEvent removeEvent = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.DELETEID,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"));
|
||||
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),removeEvent);
|
||||
//这里删除和彻底删除一起写入日志,java和C++处理有差异,java是在连接关闭时彻底删除的
|
||||
EmailLogEvent expungeEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET,status,EmailLogManager.EXPUNGE,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"));
|
||||
EmailLogEvent expungeEvent = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.EXPUNGE,subject,DateUtils.formatDate(receivedDate,"yyyy-MM-dd HH:mm:ss:SSS"));
|
||||
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),expungeEvent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,12 @@ public class AlarmAnalysisLogController extends JeecgController<AlarmAnalysisLog
|
|||
return service.findPage(analysisLogVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value="报警日志分页查询", notes="报警日志分页查询")
|
||||
@GetMapping(value = "findPageApp")
|
||||
public Result<?> findPageApp(@ModelAttribute("analysisLogVo") AnalysisLogVo analysisLogVo) {
|
||||
return service.findPage(analysisLogVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value="添加报警日志", notes="添加报警日志")
|
||||
@PostMapping(value = "add")
|
||||
public Result<?> add(@RequestBody AlarmAnalysisLog alarmAnalysisLog) {
|
||||
|
|
|
@ -34,6 +34,13 @@ public class AlarmLogController {
|
|||
public Result findPage(@RequestBody AlarmVo alarmVo){
|
||||
return alarmLogService.findPage(alarmVo);
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询报警日志信息")
|
||||
@PostMapping("findPageApp")
|
||||
public Result findPageApp(@RequestBody AlarmVo alarmVo){
|
||||
return alarmLogService.findPage(alarmVo);
|
||||
}
|
||||
|
||||
@ApiOperation("各类型报警量统计-饼图")
|
||||
@PostMapping("typeAlarms")
|
||||
public Result typeAlarms(@RequestBody AlarmVo alarmVo){
|
||||
|
|
|
@ -27,6 +27,12 @@ public class SysDatabaseController {
|
|||
return sysDatabaseService.findPage(query);
|
||||
}
|
||||
|
||||
@GetMapping("findPageApp")
|
||||
@ApiOperation(value = "分页查询数据库配置信息", notes = "分页查询数据库配置信息")
|
||||
public Result<?> findPageApp(@ModelAttribute("query") QueryRequest query){
|
||||
return sysDatabaseService.findPage(query);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
@ApiOperation(value = "查询数据库配置信息详情", notes = "查询数据库配置信息详情")
|
||||
public Result<?> findInfo(String id){
|
||||
|
|
|
@ -27,6 +27,12 @@ public class SysEmailController {
|
|||
return sysEmailService.findPage(query);
|
||||
}
|
||||
|
||||
@GetMapping("findPageApp")
|
||||
@ApiOperation(value = "分页查询邮箱配置信息", notes = "分页查询邮箱配置信息")
|
||||
public Result findPageApp(@ModelAttribute("query") QueryRequest query){
|
||||
return sysEmailService.findPage(query);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
@ApiOperation(value = "查询邮箱配置信息详情", notes = "查询邮箱配置信息详情")
|
||||
public Result findInfo(String id){
|
||||
|
|
|
@ -28,6 +28,12 @@ public class SysServerController {
|
|||
return sysServerService.findPage(query);
|
||||
}
|
||||
|
||||
@GetMapping("findPageApp")
|
||||
@ApiOperation(value = "分页查询服务器数据", notes = "分页查询服务器数据")
|
||||
public Result findPageApp(@ModelAttribute("query") QueryRequest query){
|
||||
return sysServerService.findPage(query);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
@ApiOperation(value = "服务器数据详情信息", notes = "服务器数据详情信息")
|
||||
public Result findInfo(@RequestParam String id){
|
||||
|
|
|
@ -11,8 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping
|
||||
@Api(value = "报警模块相关服务", tags = "报警模块相关服务")
|
||||
@RequestMapping()
|
||||
@Api(value = "报警日志服务", tags = "报警日志服务")
|
||||
public class AlarmController {
|
||||
|
||||
@Autowired
|
||||
|
@ -21,30 +21,35 @@ public class AlarmController {
|
|||
@ApiOperation(value="报警日志分页查询", notes="报警日志分页查询")
|
||||
@GetMapping(value = "/alarmAnalysisLog/findPage")
|
||||
public Result analysisLogFindPage(AnalysisLogVo analysisLogVo) {
|
||||
return alarmClient.analysisLogFindPage(analysisLogVo);
|
||||
Result result = alarmClient.analysisLogFindPage(analysisLogVo);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询报警日志信息")
|
||||
@PostMapping("/alarmLog/findPage")
|
||||
public Result<?> alarmLogFindPage(@RequestBody AlarmVo alarmVo){
|
||||
return alarmClient.alarmLogFindPage(alarmVo);
|
||||
public Result alarmLogFindPage(@RequestBody AlarmVo alarmVo){
|
||||
Result result = alarmClient.alarmLogFindPage(alarmVo);
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("/sysServer/findPage")
|
||||
@ApiOperation(value = "分页查询服务器配置信息", notes = "分页查询服务器配置信息")
|
||||
public Result<?> serverFindPage(QueryRequest query){
|
||||
return alarmClient.serverFindPage(query);
|
||||
public Result serverFindPage(QueryRequest query){
|
||||
Result result = alarmClient.serverFindPage(query);
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("/sysDatabase/findPage")
|
||||
@ApiOperation(value = "分页查询数据库配置信息", notes = "分页查询数据库配置信息")
|
||||
public Result<?> databaseFindPage(QueryRequest query){
|
||||
return alarmClient.databaseFindPage(query);
|
||||
public Result databaseFindPage(QueryRequest query){
|
||||
Result result = alarmClient.databaseFindPage(query);
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("/sysEmail/findPage")
|
||||
@ApiOperation(value = "分页查询邮箱配置信息", notes = "分页查询邮箱配置信息")
|
||||
public Result<?> emailFindPage(QueryRequest query){
|
||||
return alarmClient.emailFindPage(query);
|
||||
public Result emailFindPage(QueryRequest query){
|
||||
Result result = alarmClient.emailFindPage(query);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public class AnalysisController {
|
|||
// /spectrumAnalysis/getDBSpectrumChart
|
||||
@GetMapping("/spectrumAnalysis/getDBSpectrumChart")
|
||||
@ApiOperation(value = "查询折线图相关信息接口", notes = "查询折线图相关信息接口")
|
||||
public Result getDBSpectrumChart(@RequestParam String dbName,@RequestParam Integer sampleId,@RequestParam String analyst, HttpServletRequest request) {
|
||||
public Result getDBSpectrumChart(String dbName,Integer sampleId,String analyst, HttpServletRequest request) {
|
||||
Result result = analysisService.getDBSpectrumChart(dbName, sampleId, analyst, request);
|
||||
return result;
|
||||
}
|
||||
|
@ -25,13 +25,13 @@ public class AnalysisController {
|
|||
// /spectrumAnalysis/deleteSpectrumCacheData
|
||||
@DeleteMapping("/spectrumAnalysis/deleteSpectrumCacheData")
|
||||
@ApiOperation(value = "删除缓存数据",notes = "删除缓存数据")
|
||||
public void deleteSpectrumCacheData(@RequestParam String sampleFileName, HttpServletRequest request) {
|
||||
public void deleteSpectrumCacheData(String sampleFileName, HttpServletRequest request) {
|
||||
analysisService.deleteSpectrumCacheData(sampleFileName, request);
|
||||
}
|
||||
|
||||
// /gamma/gammaByDB
|
||||
@GetMapping("/gamma/gammaByDB")
|
||||
public Result gammaByDB(@RequestParam Integer sampleId,@RequestParam String dbName,@RequestParam String analyst, HttpServletRequest request){
|
||||
public Result gammaByDB(Integer sampleId,String dbName,String analyst, HttpServletRequest request){
|
||||
Result result = analysisService.gammaByDB(sampleId, dbName, analyst, request);
|
||||
return result;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class AnalysisController {
|
|||
// /gamma/peakInformation
|
||||
@GetMapping("/gamma/peakInformation")
|
||||
@ApiOperation(value = "查看Peak Information页面数据", notes = "查看Peak Information页面数据")
|
||||
public Result<?> peakInformation(@RequestParam Integer sampleId,@RequestParam String fileName, HttpServletRequest request){
|
||||
public Result<?> peakInformation(Integer sampleId, String fileName, HttpServletRequest request){
|
||||
Result<?> result = analysisService.peakInformation(sampleId, fileName, request);
|
||||
return result;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class AnalysisController {
|
|||
// /gamma/getGammaSelPosNuclide
|
||||
@GetMapping("/gamma/getGammaSelPosNuclide")
|
||||
@ApiOperation(value = "gamma主页面选择channel加载对应核素信息接口", notes = "gamma主页面选择channel加载对应核素信息接口")
|
||||
public Result getGammaSelPosNuclide(@RequestParam Integer sampleId,@RequestParam String fileName,@RequestParam int channel,@RequestParam double energy, HttpServletRequest request) {
|
||||
public Result getGammaSelPosNuclide(Integer sampleId,String fileName,int channel,double energy, HttpServletRequest request) {
|
||||
Result result = analysisService.getGammaSelPosNuclide(sampleId, fileName, channel, energy, request);
|
||||
return result;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class AnalysisController {
|
|||
// /gamma/radionuclideActivity
|
||||
@GetMapping("/gamma/radionuclideActivity")
|
||||
@ApiOperation(value = "查看Radionuclide Activity页面数据", notes = "查看Radionuclide Activity页面数据")
|
||||
public Result radionuclideActivity(@RequestParam Integer sampleId,@RequestParam String fileName, HttpServletRequest request) {
|
||||
public Result radionuclideActivity(Integer sampleId,String fileName, HttpServletRequest request) {
|
||||
Result result = analysisService.radionuclideActivity(sampleId, fileName, request);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -32,34 +32,39 @@ public class MessageController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/sys/sysAnnouncementSend/getMyAnnouncementSend")
|
||||
public Result<IPage<AnnouncementSendModel>> getMyAnnouncementSend(@RequestParam AnnouncementSendModel announcementSendModel,
|
||||
public Result getMyAnnouncementSend(AnnouncementSendModel announcementSendModel,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
return messageService.getMyAnnouncementSend(announcementSendModel, pageNo, pageSize);
|
||||
Result result = messageService.getMyAnnouncementSend(announcementSendModel, pageNo, pageSize);
|
||||
return result;
|
||||
}
|
||||
|
||||
// /sys/sysAnnouncementSend/editByAnntIdAndUserId
|
||||
@PutMapping(value = "/sys/sysAnnouncementSend/editByAnntIdAndUserId")
|
||||
public Result<SysAnnouncementSend> editById(@RequestBody JSONObject json) {
|
||||
return messageService.editById(json);
|
||||
Result<SysAnnouncementSend> result = messageService.editById(json);
|
||||
return result;
|
||||
}
|
||||
|
||||
// /sys/sysAnnouncementSend/readAll
|
||||
@PutMapping(value = "/sys/sysAnnouncementSend/readAll")
|
||||
public Result<SysAnnouncementSend> readAll() {
|
||||
return messageService.readAll();
|
||||
Result<SysAnnouncementSend> result = messageService.readAll();
|
||||
return result;
|
||||
}
|
||||
|
||||
// /sys/annountCement/syncNotic
|
||||
@RequestMapping(value = "/sys/annountCement/syncNotic", method = RequestMethod.GET)
|
||||
public Result<SysAnnouncement> syncNotic(@RequestParam(name="anntId",required=false) String anntId,@RequestBody HttpServletRequest request) {
|
||||
return messageService.syncNotic(anntId, request);
|
||||
Result<SysAnnouncement> result = messageService.syncNotic(anntId, request);
|
||||
return result;
|
||||
}
|
||||
|
||||
// /sys/annountCement/listByUser
|
||||
@RequestMapping(value = "/sys/annountCement/listByUser", method = RequestMethod.GET)
|
||||
public Result<Map<String, Object>> listByUser(@RequestParam(required = false, defaultValue = "5") Integer pageSize) {
|
||||
return messageService.listByUser(pageSize);
|
||||
Result<Map<String, Object>> result = messageService.listByUser(pageSize);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,11 +30,11 @@ public class StationController {
|
|||
// /armd-station-operation/stationOperation/getDataReceivingStatus
|
||||
@GetMapping("/armd-station-operation/stationOperation/getDataReceivingStatus")
|
||||
@ApiOperation(value = "查询台站监测数据信息", notes = "查询台站监测数据信息")
|
||||
public Result getDataReceivingStatus(@RequestParam(required = false) String userId,@RequestParam(required = false) String oneStationId){
|
||||
public Result getDataReceivingStatus(@RequestParam(required = false) String userId, @RequestParam(required = false) Double cacheTime,@RequestParam(required = false) String oneStationId){
|
||||
if (StringUtils.isBlank(userId) && StringUtils.isBlank(oneStationId)) {
|
||||
return new Result();
|
||||
} else {
|
||||
return stationService.getDataReceivingStatus(userId, oneStationId);
|
||||
return stationService.getDataReceivingStatus(userId, cacheTime, oneStationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,8 @@ public class StationController {
|
|||
@GetMapping("/stationOperation/getDataProvisionEfficiency")
|
||||
@ApiOperation(value = "查询台站数据提供率及有效率", notes = "查询台站数据提供率及有效率")
|
||||
public Result getDataProvisionEfficiency(){
|
||||
return stationService.getDataProvisionEfficiency();
|
||||
Result result = stationService.getDataProvisionEfficiency();
|
||||
return result;
|
||||
}
|
||||
|
||||
// /armd-station-operation/stationOperation/findInfo
|
||||
|
@ -79,7 +80,8 @@ public class StationController {
|
|||
@GetMapping("/armd-station-operation/sysUserFocusStation/findUserFocusByUserId")
|
||||
@ApiOperation(value = "根据用户id查询用户的缓存配置信息及关注台站信息", notes = "根据用户id查询用户的缓存配置信息及关注台站信息")
|
||||
public Result findUserFocusByUserId(@RequestParam String userId){
|
||||
return stationService.findUserFocusByUserId(userId);
|
||||
Result result = stationService.findUserFocusByUserId(userId);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,9 +43,10 @@ public class SystemController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/logout")
|
||||
public Result<Object> logout(@RequestBody HttpServletRequest request) {
|
||||
public Result<Object> logout(HttpServletRequest request) {
|
||||
//用户退出逻辑
|
||||
return systemClient.logout(request);
|
||||
Result<Object> result = systemClient.logout(request);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,6 +56,7 @@ public class SystemController {
|
|||
@ApiOperation("获取验证码")
|
||||
@GetMapping(value = "/randomImage/{key}")
|
||||
public Result<String> randomImage(@PathVariable("key") String key) {
|
||||
return systemClient.randomImage(key);
|
||||
Result<String> result = systemClient.randomImage(key);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ public class WebStatisticsController {
|
|||
@GetMapping("/findStationList")
|
||||
@ApiOperation(value = "根据菜单名称查询对应的台站信息", notes = "根据菜单名称查询对应的台站信息")
|
||||
public Result findStationList(@RequestParam String menuName){
|
||||
return webStatisticsClient.findStationList(menuName);
|
||||
Result result = webStatisticsClient.findStationList(menuName);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,18 +15,18 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||
@FeignClient(value = "armd-abnormal-alarm")
|
||||
public interface AlarmClient {
|
||||
|
||||
@GetMapping(value = "/alarmAnalysisLog/findPage")
|
||||
@GetMapping(value = "/alarmAnalysisLog/findPageApp")
|
||||
Result analysisLogFindPage(@RequestParam("analysisLogVo") AnalysisLogVo analysisLogVo);
|
||||
|
||||
@PostMapping(value = "/alarmLog/findPage")
|
||||
@PostMapping(value = "/alarmLog/findPageApp")
|
||||
Result alarmLogFindPage(@RequestBody AlarmVo alarmVo);
|
||||
|
||||
@GetMapping(value = "/sysEmail/findPage")
|
||||
@GetMapping(value = "/sysEmail/findPageApp")
|
||||
Result emailFindPage(@RequestParam("query") QueryRequest query);
|
||||
|
||||
@GetMapping(value = "/sysServer/findPage")
|
||||
@GetMapping(value = "/sysServer/findPageApp")
|
||||
Result serverFindPage(@RequestParam("query") QueryRequest query);
|
||||
|
||||
@GetMapping(value = "/sysDatabase/findPage")
|
||||
@GetMapping(value = "/sysDatabase/findPageApp")
|
||||
Result databaseFindPage(@RequestParam("query") QueryRequest query);
|
||||
}
|
||||
|
|
|
@ -13,25 +13,32 @@ import javax.servlet.http.HttpServletRequest;
|
|||
@FeignClient(value = "armd-spectrum-analysis")
|
||||
public interface AnalysisService {
|
||||
|
||||
@GetMapping("/spectrumAnalysis/getDBSpectrumChart")
|
||||
Result getDBSpectrumChart(@RequestParam("dbName") String dbName, @RequestParam("sampleId") Integer sampleId, @RequestParam("analyst") String analyst,@RequestParam("request") HttpServletRequest request);
|
||||
@GetMapping("/spectrumAnalysis/getDBSpectrumChartApp")
|
||||
Result getDBSpectrumChart(@RequestParam("dbName") String dbName, @RequestParam("sampleId") Integer sampleId,
|
||||
@RequestParam("analyst") String analyst,@RequestParam("request") HttpServletRequest request);
|
||||
|
||||
@DeleteMapping("/spectrumAnalysis/deleteSpectrumCacheData")
|
||||
void deleteSpectrumCacheData(@RequestParam("sampleFileName") String sampleFileName,@RequestParam("request") HttpServletRequest request);
|
||||
@DeleteMapping("/spectrumAnalysis/deleteSpectrumCacheDataApp")
|
||||
void deleteSpectrumCacheData(@RequestParam("sampleFileName") String sampleFileName,
|
||||
@RequestParam("request") HttpServletRequest request);
|
||||
|
||||
@GetMapping("/gamma/gammaByDB")
|
||||
Result gammaByDB(@RequestParam("sampleId") Integer sampleId,@RequestParam("dbName") String dbName,@RequestParam("analyst") String analyst,@RequestParam("request") HttpServletRequest request);
|
||||
@GetMapping("/gamma/gammaByDBApp")
|
||||
Result gammaByDB(@RequestParam("sampleId") Integer sampleId,@RequestParam("dbName") String dbName,
|
||||
@RequestParam("analyst") String analyst,@RequestParam("request") HttpServletRequest request);
|
||||
|
||||
@DeleteMapping("/gamma/delPHDCache")
|
||||
@DeleteMapping("/gamma/delPHDCacheApp")
|
||||
void delPHDCache(@RequestParam("fileName") String fileName);
|
||||
|
||||
@GetMapping("/gamma/peakInformation")
|
||||
Result<?> peakInformation(@RequestParam("sampleId") Integer sampleId,@RequestParam("fileName") String fileName,@RequestParam("request") HttpServletRequest request);
|
||||
@GetMapping("/gamma/peakInformationApp")
|
||||
Result<?> peakInformation(@RequestParam("sampleId") Integer sampleId,
|
||||
@RequestParam("fileName") String fileName,@RequestParam("request") HttpServletRequest request);
|
||||
|
||||
@GetMapping("/gamma/getGammaSelPosNuclide")
|
||||
Result getGammaSelPosNuclide(@RequestParam("sampleId") Integer sampleId,@RequestParam("fileName") String fileName,@RequestParam("channel") int channel,@RequestParam("energy") double energy,@RequestParam("request") HttpServletRequest request);
|
||||
@GetMapping("/gamma/getGammaSelPosNuclideApp")
|
||||
Result getGammaSelPosNuclide(@RequestParam("sampleId") Integer sampleId,
|
||||
@RequestParam("fileName") String fileName,@RequestParam("channel") int channel,
|
||||
@RequestParam("energy") double energy,@RequestParam("request") HttpServletRequest request);
|
||||
|
||||
@GetMapping("/gamma/radionuclideActivity")
|
||||
Result radionuclideActivity(@RequestParam("sampleId") Integer sampleId,@RequestParam("fileName") String fileName,@RequestParam("request") HttpServletRequest request);
|
||||
@GetMapping("/gamma/radionuclideActivityApp")
|
||||
Result radionuclideActivity(@RequestParam("sampleId") Integer sampleId,
|
||||
@RequestParam("fileName") String fileName,@RequestParam("request") HttpServletRequest request);
|
||||
|
||||
}
|
||||
|
|
|
@ -19,20 +19,20 @@ public interface MessageService {
|
|||
|
||||
|
||||
@GetMapping(value = "/sys/sysAnnouncementSend/getMyAnnouncementSendApp")
|
||||
Result<IPage<AnnouncementSendModel>> getMyAnnouncementSend(@RequestParam AnnouncementSendModel announcementSendModel,
|
||||
Result getMyAnnouncementSend(@RequestParam("announcementSendModel") AnnouncementSendModel announcementSendModel,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize);
|
||||
|
||||
@PutMapping(value = "/sys/sysAnnouncementSend/editByAnntIdAndUserId")
|
||||
Result<SysAnnouncementSend> editById(@RequestBody JSONObject json);
|
||||
Result editById(@RequestBody JSONObject json);
|
||||
|
||||
@PutMapping(value = "/sys/sysAnnouncementSend/readAll")
|
||||
Result<SysAnnouncementSend> readAll();
|
||||
Result readAll();
|
||||
|
||||
@RequestMapping(value = "/sys/annountCement/syncNotic", method = RequestMethod.GET)
|
||||
Result<SysAnnouncement> syncNotic(@RequestParam(name="anntId",required=false) String anntId, HttpServletRequest request);
|
||||
Result syncNotic(@RequestParam(name="anntId",required=false) String anntId, HttpServletRequest request);
|
||||
|
||||
@RequestMapping(value = "/sys/annountCement/listByUser", method = RequestMethod.GET)
|
||||
Result<Map<String, Object>> listByUser(@RequestParam(required = false, defaultValue = "5") Integer pageSize);
|
||||
Result listByUser(@RequestParam(required = false, defaultValue = "5") Integer pageSize);
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public interface RadionuclideClient {
|
|||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/findReviewedPageApp")
|
||||
@GetMapping("/findAutoPageApp")
|
||||
Result findAutoPage(@RequestParam("queryRequest") QueryRequest queryRequest,
|
||||
@RequestParam("stationIds") Integer[] stationIds,
|
||||
@RequestParam("qualifie") String qualifie,@RequestParam("sampleType") String sampleType,
|
||||
|
|
|
@ -17,22 +17,22 @@ public interface StationService {
|
|||
@GetMapping("/stationOperation/findStationType")
|
||||
List<String> findStationType();
|
||||
|
||||
@GetMapping("/stationOperation/getDataReceivingStatus")
|
||||
Result getDataReceivingStatus(@RequestParam String userId, @RequestParam String oneStationId);
|
||||
@GetMapping("/stationOperation/getDataReceivingStatusApp")
|
||||
Result getDataReceivingStatus(@RequestParam String userId,@RequestParam Double cacheTime, @RequestParam String oneStationId);
|
||||
|
||||
@GetMapping("/stationOperation/findList")
|
||||
@GetMapping("/stationOperation/findListApp")
|
||||
List<StationOperation> findStationOperationList(@RequestParam String status, @RequestParam String stationType);
|
||||
|
||||
@GetMapping("/stationOperation/getDataProvisionEfficiency")
|
||||
Result getDataProvisionEfficiency();
|
||||
|
||||
@GetMapping("/stationOperation/findInfo")
|
||||
@GetMapping("/stationOperation/findInfoApp")
|
||||
Result findInfo(@RequestParam String stationId,@RequestParam String type);
|
||||
|
||||
@GetMapping("/sysUserFocusStation/findList")
|
||||
List<SysUserFocusStationStation> findUserFocusStationList();
|
||||
|
||||
@GetMapping("/sysUserFocusStation/findUserFocusByUserId")
|
||||
@GetMapping("/sysUserFocusStation/findUserFocusByUserIdApp")
|
||||
Result findUserFocusByUserId(@RequestParam String userId);
|
||||
|
||||
}
|
||||
|
|
|
@ -34,18 +34,12 @@ public interface SystemClient {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping("/mlogout")
|
||||
Result<Object> logout(@RequestBody HttpServletRequest request);
|
||||
Result<Object> logout(@RequestParam("request") HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 图形验证码
|
||||
*/
|
||||
@GetMapping("/mRandomImage/{key}")
|
||||
@GetMapping("/randomImage/{key}")
|
||||
Result<String> randomImage(@PathVariable("key") String key);
|
||||
|
||||
/**
|
||||
* 图形验证码
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/mCheckCaptcha")
|
||||
Result<?> checkCaptcha();
|
||||
}
|
||||
|
|
|
@ -86,14 +86,18 @@ public class EmailParsingActuator extends Thread{
|
|||
}
|
||||
}
|
||||
log.info("EmailParsingActuator本次真实执行邮件数量为:{}",messages.length);
|
||||
CountDownLatch taskLatch = new CountDownLatch(messages.length);
|
||||
for(Message message : messages){
|
||||
SpectrumParsingActuator spectrumParsingActuator = new SpectrumParsingActuator();
|
||||
spectrumParsingActuator.init(message,emailProperties,emailServiceManager,
|
||||
taskLatch,spectrumServiceQuotes,emailCounter);
|
||||
poolExecutor.execute(spectrumParsingActuator);
|
||||
if(messages.length > 0){
|
||||
//本批次邮件号
|
||||
final Integer batchesCounter = spectrumServiceQuotes.getBatchesCounter().getCurrValue();
|
||||
CountDownLatch taskLatch = new CountDownLatch(messages.length);
|
||||
for(Message message : messages){
|
||||
SpectrumParsingActuator spectrumParsingActuator = new SpectrumParsingActuator();
|
||||
spectrumParsingActuator.init(message,emailProperties,emailServiceManager,
|
||||
taskLatch,spectrumServiceQuotes,emailCounter,batchesCounter);
|
||||
poolExecutor.execute(spectrumParsingActuator);
|
||||
}
|
||||
taskLatch.await();
|
||||
}
|
||||
taskLatch.await();
|
||||
}
|
||||
}catch (InterruptedException | MessagingException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.jeecg.modules.spectrum;
|
|||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
@ -80,15 +81,19 @@ public abstract class AbstractSpectrumHandler extends AbstractChain {
|
|||
*/
|
||||
protected List<String> spectrumFileLabels = Lists.newArrayList();
|
||||
|
||||
protected Integer batchesCounter;
|
||||
|
||||
/**
|
||||
* 初始化参数
|
||||
*/
|
||||
public void init(String mailContent,String emlFileName,SpectrumServiceQuotes spectrumServiceQuotes,StringBuilder returnFileName,Integer spectrumSource) throws Exception{
|
||||
public void init(String mailContent, String emlFileName, SpectrumServiceQuotes spectrumServiceQuotes,
|
||||
StringBuilder returnFileName, Integer spectrumSource, Integer batchesCounter) throws Exception{
|
||||
this.mailContent = mailContent;
|
||||
this.spectrumServiceQuotes = spectrumServiceQuotes;
|
||||
this.returnFileName = returnFileName;
|
||||
this.spectrumSource = spectrumSource;
|
||||
this.emlFileName = emlFileName;
|
||||
this.batchesCounter = batchesCounter;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,7 +114,9 @@ public abstract class AbstractSpectrumHandler extends AbstractChain {
|
|||
*/
|
||||
protected void initNext(SpectrumServiceQuotes spectrumServiceQuotes,File spectrumFile,
|
||||
String sourceFilePath,DataType currDataType,
|
||||
String mailContent,String emlFileName,Integer spectrumSource,StringBuilder returnFileName){
|
||||
String mailContent,String emlFileName,
|
||||
Integer spectrumSource,StringBuilder returnFileName,
|
||||
Integer batchesCounter){
|
||||
this.spectrumServiceQuotes = spectrumServiceQuotes;
|
||||
this.spectrumFile = spectrumFile;
|
||||
this.sourceFilePath = sourceFilePath;
|
||||
|
@ -118,6 +125,7 @@ public abstract class AbstractSpectrumHandler extends AbstractChain {
|
|||
this.emlFileName = emlFileName;
|
||||
this.spectrumSource = spectrumSource;
|
||||
this.returnFileName = returnFileName;
|
||||
this.batchesCounter = batchesCounter;
|
||||
this.setChina();
|
||||
}
|
||||
|
||||
|
@ -242,7 +250,7 @@ public abstract class AbstractSpectrumHandler extends AbstractChain {
|
|||
e.printStackTrace();
|
||||
}finally {
|
||||
if(SpectrumSource.FORM_EMAIL_SERVICE.getSourceType().equals(spectrumSource)){
|
||||
EmailLogEvent event = new EmailLogEvent(EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDBODY,
|
||||
EmailLogEvent event = new EmailLogEvent(batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,status,EmailLogManager.GETIDBODY,
|
||||
Objects.isNull(this.spectrumFile)?" ":this.spectrumFile.getAbsolutePath());
|
||||
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),event);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class AlertSpectrum extends AbstractSpectrumHandler{
|
|||
AbstractSpectrumHandler spectrumHandler = new HealthStatusSpectrum();
|
||||
spectrumHandler.initNext(super.spectrumServiceQuotes,super.spectrumFile,super.sourceFilePath,
|
||||
super.currDataType,super.mailContent,super.emlFileName,
|
||||
super.spectrumSource,super.returnFileName);
|
||||
super.spectrumSource,super.returnFileName,super.batchesCounter);
|
||||
spectrumHandler.setPrevious(this);
|
||||
super.setNext(spectrumHandler);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package org.jeecg.modules.spectrum;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* 批次计数器
|
||||
*/
|
||||
@Component
|
||||
public class BatchesCounter {
|
||||
|
||||
private Object lock = new Object();
|
||||
|
||||
private AtomicInteger batchesCounter = new AtomicInteger();
|
||||
|
||||
public int getCurrValue(){
|
||||
synchronized (lock){
|
||||
return batchesCounter.getAndIncrement();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@ public class DetbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
AbstractSpectrumHandler spectrumHandler = new QcphdSpectrum();
|
||||
spectrumHandler.initNext(super.spectrumServiceQuotes,super.spectrumFile,super.sourceFilePath,
|
||||
super.currDataType,super.mailContent,super.emlFileName,
|
||||
super.spectrumSource,super.returnFileName);
|
||||
super.spectrumSource,super.returnFileName,super.batchesCounter);
|
||||
spectrumHandler.setPrevious(this);
|
||||
super.setNext(spectrumHandler);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class GasbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
AbstractSpectrumHandler spectrumHandler = new MetSpectrum();
|
||||
spectrumHandler.initNext(super.spectrumServiceQuotes,super.spectrumFile,super.sourceFilePath,
|
||||
super.currDataType,super.mailContent,super.emlFileName,
|
||||
super.spectrumSource,super.returnFileName);
|
||||
super.spectrumSource,super.returnFileName,super.batchesCounter);
|
||||
spectrumHandler.setPrevious(this);
|
||||
super.setNext(spectrumHandler);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class MetSpectrum extends AbstractSpectrumHandler{
|
|||
AbstractSpectrumHandler spectrumHandler = new AlertSpectrum();
|
||||
spectrumHandler.initNext(super.spectrumServiceQuotes,super.spectrumFile,super.sourceFilePath,
|
||||
super.currDataType,super.mailContent,super.emlFileName,
|
||||
super.spectrumSource,super.returnFileName);
|
||||
super.spectrumSource,super.returnFileName,super.batchesCounter);
|
||||
spectrumHandler.setPrevious(this);
|
||||
super.setNext(spectrumHandler);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public class QcphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
AbstractSpectrumHandler spectrumHandler = new GasbkphdSpectrum();
|
||||
spectrumHandler.initNext(super.spectrumServiceQuotes,super.spectrumFile,super.sourceFilePath,
|
||||
super.currDataType,super.mailContent,super.emlFileName,
|
||||
super.spectrumSource,super.returnFileName);
|
||||
super.spectrumSource,super.returnFileName,super.batchesCounter);
|
||||
spectrumHandler.setPrevious(this);
|
||||
super.setNext(spectrumHandler);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
AbstractSpectrumHandler spectrumHandler = new DetbkphdSpectrum();
|
||||
spectrumHandler.initNext(super.spectrumServiceQuotes,super.spectrumFile,super.sourceFilePath,
|
||||
super.currDataType,super.mailContent,super.emlFileName,
|
||||
super.spectrumSource,super.returnFileName);
|
||||
super.spectrumSource,super.returnFileName,super.batchesCounter);
|
||||
spectrumHandler.setPrevious(this);
|
||||
super.setNext(spectrumHandler);
|
||||
}
|
||||
|
|
|
@ -58,6 +58,8 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
* 邮件计数器
|
||||
*/
|
||||
private EmailCounter emailCounter;
|
||||
|
||||
private Integer batchesCounter;
|
||||
/**
|
||||
* 一天秒数
|
||||
*/
|
||||
|
@ -65,13 +67,14 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
|
||||
public void init(Message message, EmailProperties emailProperties,EmailServiceManager emailServiceManager,
|
||||
CountDownLatch taskLatch, SpectrumServiceQuotes spectrumServiceQuotes,
|
||||
EmailCounter emailCounter){
|
||||
EmailCounter emailCounter,Integer batchesCounter){
|
||||
this.message = message;
|
||||
this.emailProperties = emailProperties;
|
||||
this.emailServiceManager = emailServiceManager;
|
||||
this.taskLatch = taskLatch;
|
||||
this.spectrumServiceQuotes = spectrumServiceQuotes;
|
||||
this.emailCounter = emailCounter;
|
||||
this.batchesCounter = batchesCounter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +82,7 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
String subject = null;
|
||||
try {
|
||||
//获取邮件主题
|
||||
subject = emailServiceManager.getMailSubject(message);
|
||||
subject = emailServiceManager.getMailSubject(message,this.batchesCounter);
|
||||
|
||||
//解析之前先把邮件唯一信息存储到redis
|
||||
String messageId = ((MimeMessage) message).getMessageID();
|
||||
|
@ -90,7 +93,7 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
SpectrumLogManager.mailSpectrumLogManager.offer(Thread.currentThread().getId(),null);
|
||||
|
||||
//所有邮件都需以.eml格式存储到eml文件夹中
|
||||
final File emlFile = emailServiceManager.downloadEmailToEmlDir(message, emailCounter.getCurrValue());
|
||||
final File emlFile = emailServiceManager.downloadEmailToEmlDir(message, emailCounter.getCurrValue(),this.batchesCounter);
|
||||
//保存邮件日志到PG数据库
|
||||
this.spectrumServiceQuotes.getMailLogService().create(message,emailProperties);
|
||||
|
||||
|
@ -104,7 +107,7 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
// 如果邮件内容校验成功 将文件保存到eml目录 并删除邮件对象
|
||||
if(checkMailContent(mailContent,subject)){
|
||||
AbstractSpectrumHandler spectrumHandler = new SamplephdSpectrum();
|
||||
spectrumHandler.init(mailContent.toString(),emlFile.getName(),spectrumServiceQuotes,new StringBuilder(),SpectrumSource.FORM_EMAIL_SERVICE.getSourceType());
|
||||
spectrumHandler.init(mailContent.toString(),emlFile.getName(),spectrumServiceQuotes,new StringBuilder(),SpectrumSource.FORM_EMAIL_SERVICE.getSourceType(),batchesCounter);
|
||||
final boolean matchResult = spectrumHandler.saveEmailToLocal();
|
||||
if(matchResult){
|
||||
//开始解析
|
||||
|
@ -112,7 +115,7 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
}else{
|
||||
log.warn("This email {} parsing failed and is not listed in the Met, Alert, SOH, Sample, Detbkphd, QC, Gasbkphd spectra.",subject);
|
||||
}
|
||||
emailServiceManager.removeMail(message);
|
||||
emailServiceManager.removeMail(message,batchesCounter);
|
||||
}else {
|
||||
// 如果邮件内容校验失败(邮件内容不完整) 将错误邮件从eml移动到emlError
|
||||
if (Objects.nonNull(emlFile) && emlFile.exists()){
|
||||
|
@ -125,12 +128,12 @@ public class SpectrumParsingActuator implements Runnable{
|
|||
} catch (Exception e) {
|
||||
// 如果不是下载导致的失败,则删除下载的邮件对象
|
||||
if(!(e instanceof DownloadEmailException)){
|
||||
emailServiceManager.removeMail(message);
|
||||
emailServiceManager.removeMail(message,batchesCounter);
|
||||
}
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
try {
|
||||
EmailLogEvent expungeEvent = new EmailLogEvent(EmailLogManager.GS_TYPE_GET,EmailLogManager.DONE);
|
||||
EmailLogEvent expungeEvent = new EmailLogEvent(this.batchesCounter,Thread.currentThread().getId(),EmailLogManager.GS_TYPE_GET,EmailLogManager.DONE);
|
||||
EmailLogManager.getInstance().offer(Thread.currentThread().getId(),expungeEvent);
|
||||
|
||||
EmailLogManager.getInstance().writeLog(Thread.currentThread().getId());
|
||||
|
|
|
@ -90,4 +90,6 @@ public class SpectrumServiceQuotes {
|
|||
*/
|
||||
private final Object originalLibraryLock = new Object();
|
||||
|
||||
private final BatchesCounter batchesCounter;
|
||||
|
||||
}
|
||||
|
|
|
@ -40,10 +40,18 @@ public class GammaController {
|
|||
}
|
||||
|
||||
@GetMapping("gammaByDB")
|
||||
@ApiOperation(value = "gamma页面loadFromDB加载数据", notes = "gamma页面loadFromDB加载数据")
|
||||
public Result gammaByDB(Integer sampleId, String dbName, String analyst, HttpServletRequest request){
|
||||
return gammaService.gammaByDB(dbName, sampleId, analyst, request);
|
||||
}
|
||||
|
||||
@GetMapping("gammaByDBApp")
|
||||
@ApiOperation(value = "gamma页面loadFromDB加载数据", notes = "gamma页面loadFromDB加载数据")
|
||||
public Result gammaByDBApp(@RequestParam("sampleId") Integer sampleId,@RequestParam("dbName") String dbName,
|
||||
@RequestParam("analyst") String analyst, HttpServletRequest request){
|
||||
return gammaService.gammaByDB(dbName, sampleId, analyst, request);
|
||||
}
|
||||
|
||||
@GetMapping("gammaByFile")
|
||||
@ApiOperation(value = "gamma页面loadFromFile加载数据", notes = "gamma页面loadFromFile加载数据")
|
||||
public Result gammaByFile(String fileName, HttpServletRequest request) {
|
||||
|
@ -56,6 +64,12 @@ public class GammaController {
|
|||
gammaService.delPHDCache(fileName);
|
||||
}
|
||||
|
||||
@DeleteMapping("delPHDCacheApp")
|
||||
@ApiOperation(value = "删除PHD文件缓存", notes = "删除PHD文件缓存")
|
||||
public void delPHDCacheApp(@RequestParam String fileName) {
|
||||
gammaService.delPHDCache(fileName);
|
||||
}
|
||||
|
||||
@GetMapping("loadSampleData")
|
||||
public Result loadSampleData(QueryRequest queryRequest, GardsSampleDataSpectrum gardsSampleData, String[] menuTypes, boolean AllUsers, boolean CollectStopB, boolean AcqStartB,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date startDate, @DateTimeFormat(pattern = "yyyy-MM-dd") Date endDate, HttpServletRequest request) {
|
||||
|
@ -135,6 +149,14 @@ public class GammaController {
|
|||
return gammaService.getGammaSelPosNuclide(sampleId, fileName, channel, energy, request);
|
||||
}
|
||||
|
||||
@GetMapping("getGammaSelPosNuclideApp")
|
||||
@ApiOperation(value = "gamma主页面选择channel加载对应核素信息接口", notes = "gamma主页面选择channel加载对应核素信息接口")
|
||||
public Result getGammaSelPosNuclideApp(@RequestParam("sampleId") Integer sampleId,@RequestParam("fileName") String fileName,
|
||||
@RequestParam("channel") int channel,@RequestParam("energy") double energy,
|
||||
HttpServletRequest request) {
|
||||
return gammaService.getGammaSelPosNuclide(sampleId, fileName, channel, energy, request);
|
||||
}
|
||||
|
||||
@GetMapping("getSelPosNuclide")
|
||||
@ApiOperation(value = "InteractiveTool页面选择channel加载对应核素信息接口", notes = "InteractiveTool页面选择channel加载对应核素信息接口")
|
||||
public Result getSelPosNuclide(Integer sampleId, String fileName, int channel, HttpServletRequest request) {
|
||||
|
@ -401,6 +423,13 @@ public class GammaController {
|
|||
return gammaService.peakInformation(sampleId, fileName, request);
|
||||
}
|
||||
|
||||
@GetMapping("peakInformationApp")
|
||||
@ApiOperation(value = "查看Peak Information页面数据", notes = "查看Peak Information页面数据")
|
||||
public Result<?> peakInformationApp(@RequestParam("sampleId") Integer sampleId,@RequestParam("fileName") String fileName,
|
||||
HttpServletRequest request){
|
||||
return gammaService.peakInformation(sampleId, fileName, request);
|
||||
}
|
||||
|
||||
@GetMapping("exportPeakInformation")
|
||||
public void exportPeakInformation(Integer sampleId, String fileName, HttpServletRequest request, HttpServletResponse response){
|
||||
gammaService.exportPeakInformation(sampleId, fileName, request, response);
|
||||
|
@ -434,6 +463,14 @@ public class GammaController {
|
|||
return gammaService.radionuclideActivity(sampleId, fileName, request);
|
||||
}
|
||||
|
||||
@GetMapping("radionuclideActivityApp")
|
||||
@ApiOperation(value = "查看Radionuclide Activity页面数据", notes = "查看Radionuclide Activity页面数据")
|
||||
public Result radionuclideActivityApp(@RequestParam("sampleId") Integer sampleId,
|
||||
@RequestParam("fileName") String fileName,
|
||||
HttpServletRequest request) {
|
||||
return gammaService.radionuclideActivity(sampleId, fileName, request);
|
||||
}
|
||||
|
||||
@GetMapping("exportRadionuclideActivity")
|
||||
public void exportRadionuclideActivity(Integer sampleId, String fileName,
|
||||
String arTime, String crTime,
|
||||
|
|
|
@ -55,6 +55,13 @@ public class SpectrumAnalysesController {
|
|||
return spectrumAnalysisService.getDBSpectrumChart(dbName, sampleId, analyst, request);
|
||||
}
|
||||
|
||||
@GetMapping("getDBSpectrumChartApp")
|
||||
@ApiOperation(value = "查询折线图相关信息接口", notes = "查询折线图相关信息接口")
|
||||
public Result getDBSpectrumChartApp(@RequestParam("dbName") String dbName,@RequestParam("sampleId") Integer sampleId,
|
||||
@RequestParam("analyst") String analyst, HttpServletRequest request) {
|
||||
return spectrumAnalysisService.getDBSpectrumChart(dbName, sampleId, analyst, request);
|
||||
}
|
||||
|
||||
@GetMapping("getFileSpectrumChart")
|
||||
@ApiOperation(value = "查询文件折线图相关信息接口", notes = "查询文件折线图相关信息接口")
|
||||
public Result getFileSpectrumChart(String sampleFileName, String gasFileName, String detFileName, String qcFileName, HttpServletRequest request) {
|
||||
|
@ -67,6 +74,12 @@ public class SpectrumAnalysesController {
|
|||
spectrumAnalysisService.deleteSpectrumCacheData(sampleFileName, request);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteSpectrumCacheDataApp")
|
||||
@ApiOperation(value = "删除缓存数据",notes = "删除缓存数据")
|
||||
public void deleteSpectrumCacheDataApp(@RequestParam("sampleFileName") String sampleFileName, HttpServletRequest request) {
|
||||
spectrumAnalysisService.deleteSpectrumCacheData(sampleFileName, request);
|
||||
}
|
||||
|
||||
@GetMapping("viewComment")
|
||||
@ApiOperation(value = "查看comment数据", notes = "查看comment数据")
|
||||
public Result viewComment(Integer sampleId, String sampleFileName, HttpServletRequest request) {
|
||||
|
|
|
@ -37,6 +37,13 @@ public class StationOperationController {
|
|||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("findListApp")
|
||||
@ApiOperation(value = "查询台站/核设施信息", notes = "查询台站/核设施信息")
|
||||
public List<StationOperation> findListApp(@RequestParam String status,@RequestParam String stationType){
|
||||
List<StationOperation> result = stationOperationService.findList(status, stationType);
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
@ApiOperation(value = "查询台站/核设施详情信息", notes = "查询台站/核设施详情信息")
|
||||
public Result findInfo(String stationId, String type){
|
||||
|
@ -44,6 +51,13 @@ public class StationOperationController {
|
|||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("findInfoApp")
|
||||
@ApiOperation(value = "查询台站/核设施详情信息", notes = "查询台站/核设施详情信息")
|
||||
public Result findInfoApp(@RequestParam String stationId,@RequestParam String type){
|
||||
Result result = stationOperationService.findInfo(stationId, type);
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("findTree")
|
||||
@ApiOperation(value = "查询台站树形结构", notes = "查询台站树形结构")
|
||||
public Result findTree(){
|
||||
|
@ -64,6 +78,11 @@ public class StationOperationController {
|
|||
return stationOperationService.getDataReceivingStatus(userId, cacheTime, oneStationId);
|
||||
}
|
||||
|
||||
@GetMapping("getDataReceivingStatusApp")
|
||||
@ApiOperation(value = "查询台站监测数据信息", notes = "查询台站监测数据信息")
|
||||
public Result getDataReceivingStatusApp(@RequestParam String userId,@RequestParam Double cacheTime,@RequestParam String oneStationId){
|
||||
return stationOperationService.getDataReceivingStatus(userId, cacheTime, oneStationId);
|
||||
}
|
||||
|
||||
@GetMapping("getDataProvisionEfficiency")
|
||||
@ApiOperation(value = "查询台站数据提供率及有效率", notes = "查询台站数据提供率及有效率")
|
||||
|
|
|
@ -50,6 +50,11 @@ public class SysUserFocusStationController {
|
|||
return sysUserFocusStationService.findUserFocusByUserId(userId);
|
||||
}
|
||||
|
||||
@GetMapping("findUserFocusByUserIdApp")
|
||||
@ApiOperation(value = "根据用户id查询用户的缓存配置信息及关注台站信息", notes = "根据用户id查询用户的缓存配置信息及关注台站信息")
|
||||
public Result findUserFocusByUserIdApp(@RequestParam String userId){
|
||||
return sysUserFocusStationService.findUserFocusByUserId(userId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -241,16 +241,19 @@ public class SysUserFocusStationServiceImpl extends ServiceImpl<SysUserFocusStat
|
|||
if (Objects.nonNull(stationInfoMap.get(item.getStationId()))){
|
||||
//获取台站信息
|
||||
GardsStations stations = (GardsStations) stationInfoMap.get(item.getStationId());
|
||||
//获取台站类型
|
||||
String stationType = stationTypeUtil.getStationType(stations.getStationId());
|
||||
item.setStationType(stationType);
|
||||
item.setStationCode(stations.getStationCode());
|
||||
item.setLon(stations.getLon());
|
||||
item.setLat(stations.getLat());
|
||||
item.setStatus(stations.getStatus());
|
||||
item.setAltitude(Objects.isNull(stations.getElevation())?"--":stations.getElevation()+"m");
|
||||
item.setScheduling(false);
|
||||
resultList.add(item);
|
||||
//如果排班任务台站id数组中 不包含当前关注台站id 则关注台站正常存储
|
||||
if (!taskStation.contains(stations.getStationId().toString())) {
|
||||
//获取台站类型
|
||||
String stationType = stationTypeUtil.getStationType(stations.getStationId());
|
||||
item.setStationType(stationType);
|
||||
item.setStationCode(stations.getStationCode());
|
||||
item.setLon(stations.getLon());
|
||||
item.setLat(stations.getLat());
|
||||
item.setStatus(stations.getStatus());
|
||||
item.setAltitude(Objects.isNull(stations.getElevation())?"--":stations.getElevation()+"m");
|
||||
item.setScheduling(false);
|
||||
resultList.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -282,27 +285,6 @@ public class SysUserFocusStationServiceImpl extends ServiceImpl<SysUserFocusStat
|
|||
}
|
||||
}
|
||||
}
|
||||
List<Integer> removeIndex = new LinkedList<>();
|
||||
for (int i=0; i<resultList.size(); i++) {
|
||||
SysUserFocusStationStation nowStation = resultList.get(i);
|
||||
for (int j=i+1; j<resultList.size(); j++) {
|
||||
SysUserFocusStationStation compareStation = resultList.get(j);
|
||||
//如果当前台站与对比台站的台站编码一致
|
||||
if (nowStation.getStationCode().equals(compareStation.getStationCode())) {
|
||||
//如果当前台站不是排班任务的台站 对比的台站是排班任务台站 将当前台站的下标记录用于移除处理
|
||||
if (!nowStation.isScheduling() && compareStation.isScheduling()) {
|
||||
removeIndex.add(i);
|
||||
} else {//否则移除对比台站 将对比台站下标记录用于移除处理
|
||||
removeIndex.add(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(removeIndex)) {
|
||||
for (int index:removeIndex) {
|
||||
resultList.remove(index);
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(resultList)) {
|
||||
resultList = resultList.stream().distinct().sorted(Comparator.comparing(SysUserFocusStationStation::getStationCode)).collect(Collectors.toList());
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ public class LoginController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/mlogout")
|
||||
public Result<Object> mlogout(@RequestBody HttpServletRequest request) {
|
||||
public Result<Object> mlogout(HttpServletRequest request) {
|
||||
//用户退出逻辑
|
||||
String token = request.getHeader(CommonConstant.X_ACCESS_TOKEN);
|
||||
if(oConvertUtils.isEmpty(token)) {
|
||||
|
@ -536,12 +536,11 @@ public class LoginController {
|
|||
|
||||
/**
|
||||
* 后台生成图形验证码 :有效
|
||||
* @param response
|
||||
* @param key
|
||||
*/
|
||||
@ApiOperation("获取验证码")
|
||||
@GetMapping(value = "/randomImage/{key}")
|
||||
public Result<String> randomImage(HttpServletResponse response,@PathVariable("key") String key){
|
||||
public Result<String> randomImage(@PathVariable("key") String key){
|
||||
Result<String> res = new Result<String>();
|
||||
try {
|
||||
//生成验证码
|
||||
|
@ -569,40 +568,6 @@ public class LoginController {
|
|||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* app端后台生成图形验证码 :有效
|
||||
* @param key
|
||||
*/
|
||||
@ApiOperation("获取验证码")
|
||||
@GetMapping(value = "/mRandomImage/{key}")
|
||||
public Result<String> mRandomImage(@PathVariable("key") String key){
|
||||
Result<String> res = new Result<String>();
|
||||
try {
|
||||
//生成验证码
|
||||
String code = RandomUtil.randomString(BASE_CHECK_CODES,4);
|
||||
//存到redis中
|
||||
String lowerCaseCode = code.toLowerCase();
|
||||
|
||||
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
// 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
|
||||
String origin = lowerCaseCode+key+jeecgBaseConfig.getSignatureSecret();
|
||||
String realKey = Md5Util.md5Encode(origin, "utf-8");
|
||||
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
|
||||
redisUtil.set(realKey, lowerCaseCode, 60);
|
||||
log.info("获取验证码,Redis key = {},checkCode = {}", realKey, code);
|
||||
//返回前端
|
||||
String base64 = RandImageUtil.generate(code);
|
||||
res.setSuccess(true);
|
||||
res.setResult(base64);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
res.error500("获取验证码失败,请检查redis配置!");
|
||||
return res;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换菜单表为vue3的表
|
||||
*/
|
||||
|
@ -746,27 +711,6 @@ public class LoginController {
|
|||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* app端图形验证码
|
||||
* @param sysLoginModel
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/mCheckCaptcha", method = RequestMethod.POST)
|
||||
public Result<?> mCheckCaptcha(@RequestBody SysLoginModel sysLoginModel){
|
||||
String captcha = sysLoginModel.getCaptcha();
|
||||
String checkKey = sysLoginModel.getCheckKey();
|
||||
if(captcha==null){
|
||||
return Result.error("验证码无效");
|
||||
}
|
||||
String lowerCaseCaptcha = captcha.toLowerCase();
|
||||
String realKey = Md5Util.md5Encode(lowerCaseCaptcha+checkKey, "utf-8");
|
||||
Object checkCode = redisUtil.get(realKey);
|
||||
if(checkCode==null || !checkCode.equals(lowerCaseCaptcha)) {
|
||||
return Result.error("验证码错误");
|
||||
}
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录二维码
|
||||
*/
|
||||
|
|
|
@ -332,8 +332,8 @@ public class SysAnnouncementController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/listByUser", method = RequestMethod.GET)
|
||||
public Result<Map<String, Object>> listByUser(@RequestParam(required = false, defaultValue = "5") Integer pageSize) {
|
||||
Result<Map<String,Object>> result = new Result<Map<String,Object>>();
|
||||
public Result listByUser(@RequestParam(required = false, defaultValue = "5") Integer pageSize) {
|
||||
Result result = new Result();
|
||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||
String userId = sysUser.getId();
|
||||
// 1.将系统消息补充到用户通告阅读标记表中
|
||||
|
@ -456,8 +456,8 @@ public class SysAnnouncementController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/syncNotic", method = RequestMethod.GET)
|
||||
public Result<SysAnnouncement> syncNotic(@RequestParam(name="anntId",required=false) String anntId, HttpServletRequest request) {
|
||||
Result<SysAnnouncement> result = new Result<SysAnnouncement>();
|
||||
public Result syncNotic(@RequestParam(name="anntId",required=false) String anntId, HttpServletRequest request) {
|
||||
Result result = new Result();
|
||||
JSONObject obj = new JSONObject();
|
||||
if(StringUtils.isNotBlank(anntId)){
|
||||
SysAnnouncement sysAnnouncement = sysAnnouncementService.getById(anntId);
|
||||
|
|
|
@ -185,8 +185,8 @@ public class SysAnnouncementSendController {
|
|||
* @return
|
||||
*/
|
||||
@PutMapping(value = "/editByAnntIdAndUserId")
|
||||
public Result<SysAnnouncementSend> editById(@RequestBody JSONObject json) {
|
||||
Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>();
|
||||
public Result editById(@RequestBody JSONObject json) {
|
||||
Result result = new Result();
|
||||
String anntId = json.getString("anntId");
|
||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||
String userId = sysUser.getId();
|
||||
|
@ -226,10 +226,10 @@ public class SysAnnouncementSendController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getMyAnnouncementSendApp")
|
||||
public Result<IPage<AnnouncementSendModel>> getMyAnnouncementSendApp(@RequestParam AnnouncementSendModel announcementSendModel,
|
||||
public Result getMyAnnouncementSendApp(@ModelAttribute("announcementSendModel") AnnouncementSendModel announcementSendModel,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
Result<IPage<AnnouncementSendModel>> result = new Result<IPage<AnnouncementSendModel>>();
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
Result result = new Result();
|
||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||
String userId = sysUser.getId();
|
||||
announcementSendModel.setUserId(userId);
|
||||
|
@ -247,8 +247,8 @@ public class SysAnnouncementSendController {
|
|||
* @return
|
||||
*/
|
||||
@PutMapping(value = "/readAll")
|
||||
public Result<SysAnnouncementSend> readAll() {
|
||||
Result<SysAnnouncementSend> result = new Result<SysAnnouncementSend>();
|
||||
public Result readAll() {
|
||||
Result result = new Result();
|
||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||
String userId = sysUser.getId();
|
||||
LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new UpdateWrapper().lambda();
|
||||
|
|
|
@ -147,8 +147,6 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
|||
if (StringUtils.isNotBlank(filePath)) {
|
||||
file = ftpUtil.downloadFile(ftpUtil.getFtpRootPath() + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH + filePath, "betaGamma");
|
||||
if (Objects.nonNull(file)) {
|
||||
// System.load("/usr/local/jdk/lib/libReadPHDFile.so");
|
||||
System.loadLibrary("ReadPHDFile");
|
||||
EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(file.getAbsolutePath());
|
||||
//查询info
|
||||
this.findInfo(sampleId, report);
|
||||
|
|
|
@ -41,6 +41,8 @@ public class JeecgWebStatisticsApplication extends SpringBootServletInitializer
|
|||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
|
||||
//windows环境调用dll
|
||||
System.loadLibrary("ReadPHDFile");
|
||||
//System.load("/usr/local/jdk/lib/libReadPHDFile.so");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user