system:发送邮件完善
jindie:insert syspointrouter完善
master
xs 1 month ago
parent 122ca93cd2
commit 3478123c48

@ -37,6 +37,8 @@ public class SysFileController
SysFile sysFile = new SysFile();
sysFile.setName(FileUtils.getName(url));
sysFile.setUrl(url);
log.info("url:"+url);
log.info("name:"+sysFile.getName());
return R.ok(sysFile);
}
catch (Exception e)

@ -1381,8 +1381,9 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
toUpdatePurchaseReceiveBillList.add(mesPurchaseReceiveBill);
} else {
toInsertPurchaseReceiveBillList.add(mesPurchaseReceiveBill);
notifyInfoBuilder.append(materialName).append("|").append(materialSpec).append("|").append(actlandAmount).append("|")
.append(preDeliveryDate).append("|").append(projectName)
notifyInfoBuilder.append("物料名称:").append(materialName).append("|物料规格:").append(materialSpec)
.append("|实到数量:").append(actlandAmount).append("|预计到货日期:")
.append(preDeliveryDate).append("|项目名称:").append(projectName)
.append(";");
}
// System.out.println("l:"+resultArray.get(i).toString().length());

@ -1,6 +1,7 @@
package com.hw.system.common.service.impl;
import java.rmi.ServerException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -132,13 +133,11 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService {
String emailAccountInfo = redisService.getCacheObject(CacheConstants.SYS_EAMIL_ACCOUNT_INFO);
String emailAccount = "";
String emailPassword = "";
if(StringUtils.isNotEmpty(emailAccountInfo)){
int splitIndex = emailAccountInfo.indexOf(",");
emailAccount = emailAccountInfo.substring(0,splitIndex);
emailPassword = emailAccountInfo.substring(splitIndex+1);
if (StringUtils.isNotEmpty(emailAccountInfo)) {
int splitIndex = emailAccountInfo.indexOf(",");
emailAccount = emailAccountInfo.substring(0, splitIndex);
emailPassword = emailAccountInfo.substring(splitIndex + 1);
}
System.out.println(emailAccount+"e:"+emailPassword);
SysPointRouter queryPointRouter = new SysPointRouter();
List<SysPointRouter> sysPointRouterList = sysPointRouterMapper.selectEmailNotifySysPointRouterList(queryPointRouter);
@ -146,12 +145,31 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService {
Map<Long, List<SysPointRouter>> sysPointRouterMap = sysPointRouterList.stream()
.filter(spo -> spo.getProcessActivityId() != null).collect(Collectors.groupingBy(SysPointRouter::getProcessActivityId));
String emailTitle = "";
List<String> emailTitleList = new ArrayList<>();
for (Long processActivityId : sysPointRouterMap.keySet()) {
List<SysPointRouter> sysPointRoutersByActivityList = sysPointRouterMap.get(processActivityId);
List<SysUser> sysUsers = sysUserMapper.selectProcessActivityAuthUserList(processActivityId);
String sendMsg = "";
String colon = "";
for (SysPointRouter sysPointRouter : sysPointRoutersByActivityList) {
sendMsg += sysPointRouter.getRemark() + ";";
String remark = sysPointRouter.getRemark();
int colonIndex = remark.indexOf(colon);
if (colonIndex >= 0) {
emailTitle = remark.substring(0, colonIndex);
remark = remark.replaceFirst(colon, "\n\n");
}else{
emailTitle = remark;
}
emailTitle = emailTitle.length() > 30 ? emailTitle.substring(0, 30) : emailTitle;
if (!emailTitleList.contains(emailTitle)) {
emailTitleList.add(emailTitle);
}
remark = remark.replaceAll(";", "\n\n");
sendMsg += remark + "\n\n";
sysPointRouter.setSentEmailFlag("1");
sysPointRouter.setUpdateTime(new Date());
// sysPointRouter.setUpdateBy(SecurityUtils.getLoginUser().getNickname());
@ -160,7 +178,7 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService {
for (SysUser sysUser : sysUsers) {
if (StringUtils.isNotEmpty(sysUser.getEmail())) {
MailUtils.processSendEmail(emailAccount,emailPassword,sysUser.getEmail(), "通知", sendMsg);
MailUtils.processSendEmail(emailAccount, emailPassword, sysUser.getEmail(), emailTitleList.toString(), sendMsg);
}
}

@ -110,9 +110,9 @@
<el-table-column v-if="temperature!==null" label="触发温度阈值" align="center" prop="temperature" min-width="110"/>
<el-table-column v-if="!humidity!==null" label="触发湿度阈值" align="center" prop="humidity" min-width="110"/>
<el-table-column v-if="noise!==null" label="触发噪声阈值" align="center" prop="noise" min-width="110"/>
<el-table-column label="触发阈值次数" align="center" prop="triggerNumber" min-width="110"/>
<el-table-column label="时间范围(分)" align="center" prop="timeRange" min-width="110"/>
<el-table-column label="设备离线时间(分)" align="center" prop="deviceOfflineTime" min-width="120"/>
<!-- <el-table-column label="触发阈值次数" align="center" prop="triggerNumber" min-width="110"/>-->
<!-- <el-table-column label="时间范围(分)" align="center" prop="timeRange" min-width="110"/>-->
<!-- <el-table-column label="设备离线时间(分)" align="center" prop="deviceOfflineTime" min-width="120"/>-->
<!-- <el-table-column label="通知用户" align="center" prop="notifyUser" />-->
<el-table-column label="备注" align="center" prop="cause" />
@ -200,15 +200,15 @@
<el-form-item label="噪声阈值" prop="noise" v-if="form.energyType==6">
<el-input-number v-model="form.noise" placeholder="请输入触发阈值" />
</el-form-item>
<el-form-item label="触发阈值次数" prop="triggerNumber">
<el-input-number v-model="form.triggerNumber" placeholder="请输入触发阈值次数" />
</el-form-item>
<el-form-item label="时间范围(分)" prop="timeRange">
<el-input-number v-model="form.timeRange" placeholder="请输入时间范围(分)" />
</el-form-item>
<el-form-item label="设备离线时间(分)" prop="deviceOfflineTime">
<el-input-number v-model="form.deviceOfflineTime" placeholder="请输入设备离线时间(分)" />
</el-form-item>
<!-- <el-form-item label="触发阈值次数" prop="triggerNumber">-->
<!-- <el-input-number v-model="form.triggerNumber" placeholder="请输入触发阈值次数" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="时间范围(分)" prop="timeRange">-->
<!-- <el-input-number v-model="form.timeRange" placeholder="请输入时间范围(分)" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="设备离线时间(分)" prop="deviceOfflineTime">-->
<!-- <el-input-number v-model="form.deviceOfflineTime" placeholder="请输入设备离线时间(分)" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="通知用户" prop="notifyUser">-->
<!-- <el-input v-model="form.notifyUser" placeholder="请输入通知用户" />-->
<!-- </el-form-item>-->

@ -238,7 +238,7 @@
</el-card>
<el-dialog
:visible.sync="blueprintModel"
title="上传图纸"
title="选择图纸"
width="30%"
@before-close="blueprintModel = false">
<el-form ref="form">
@ -309,7 +309,7 @@
<el-dialog
:visible.sync="sopViewModel"
title="上传SOP附件"
title="选择SOP"
width="30%"
@before-close="sopViewModel = false">
<el-form ref="form">

Loading…
Cancel
Save