通用导出

单号规则导入导出
系统参数添加组
yun-zuoyi
yunhao.wang 6 years ago
parent 7c290b944f
commit f7415fe023

@ -83,4 +83,12 @@ public interface ISysConfigService {
@ApiOperation(value = "根据系统配置代码修改配置项") @ApiOperation(value = "根据系统配置代码修改配置项")
void updateSysConfigByCode(String code,String value); void updateSysConfigByCode(String code,String value);
/**
*
* @param group
* @return
*/
@ApiOperation(value = "根据系统参数组来查找系统参数")
List findSysConfigByGroup(Integer group);
} }

@ -112,4 +112,13 @@ public interface ISysDictionaryService {
*/ */
@ApiOperation(value = "根据父节点 以及当前节点值 获取字典信息") @ApiOperation(value = "根据父节点 以及当前节点值 获取字典信息")
SysDictionary getSysDictionaryByParentCodeAndValue(String parentCode,String value); SysDictionary getSysDictionaryByParentCodeAndValue(String parentCode,String value);
/**
*
* @param parentCode
* @param name
* @return
*/
@ApiOperation(value = "根据父节点 以及当前节点名称 获取字典信息")
SysDictionary getSysDictionaryByParentCodeAndName(String parentCode,String name);
} }

@ -43,6 +43,7 @@ public class SysConfigController extends CoreBaseController {
@Autowired @Autowired
private ISysConfigService sysConfigService; private ISysConfigService sysConfigService;
@Autowired @Autowired
private MailUtil mailUtil; private MailUtil mailUtil;
@ -248,4 +249,18 @@ public class SysConfigController extends CoreBaseController {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e); return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
} }
} }
@GetMapping("/find-group/{group}")
@ApiOperation(value = "根据参数组查询系统参数")
public ResultBean findSysConfigByGroup(@PathVariable("group") Integer group){
try {
ValidatorBean.checkNotNull(group,"参数组不能为空");
List<SysConfig> sysConfigList = sysConfigService.findSysConfigByGroup(group);
return ResultBean.success("查询成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(sysConfigList);
}catch(ImppBusiException busExcep){
return ResultBean.fail(busExcep);
}catch(Exception e){
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
} }

@ -161,4 +161,18 @@ public class SysEnumController extends CoreBaseController{
return new ResultBean(true, "操作成功", return new ResultBean(true, "操作成功",
Arrays.asList(ImppEnumUtil.SYS_VALUE_TYPE.values())); Arrays.asList(ImppEnumUtil.SYS_VALUE_TYPE.values()));
} }
@GetMapping("/sys-math-symbol")
@ApiOperation(value = "数学表达式", notes = "数学表达式")
public ResultBean getSysMathSymbol(){
return new ResultBean(true, "操作成功",
Arrays.asList(CommonEnumUtil.MATH_SYMBOL.values()));
}
@GetMapping("/sys-config-group")
@ApiOperation(value = "系统配置组", notes = "系统配置组")
public ResultBean getSysConfigGroup(){
return new ResultBean(true, "操作成功",
Arrays.asList(ImppEnumUtil.SYS_CONFIG_GROUP.values()));
}
} }

@ -290,15 +290,7 @@ public class SysOrderNoRuleController extends CoreBaseController {
public ResultBean importSysOrderNoRule(@RequestParam("file") MultipartFile file){ public ResultBean importSysOrderNoRule(@RequestParam("file") MultipartFile file){
try { try {
List<SysOrderNoRule> sysOrderNoRuleList = ExcelUtil.importData(file.getOriginalFilename(),file.getInputStream(),SysOrderNoRule.class); List<SysOrderNoRule> sysOrderNoRuleList = ExcelUtil.importData(file.getOriginalFilename(),file.getInputStream(),SysOrderNoRule.class);
for (SysOrderNoRule item : sysOrderNoRuleList) { sysOrderNoRuleService.insertSysOrderNoRuleList(sysOrderNoRuleList);
//校验及初始化数据
validatorSysOrderNoRule(item);
item.setOrderNoRuleStatus(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
item.setSerialNo(CommonEnumUtil.PARENT.DEFAULT.getValue());
sysOrderNoRuleService.insertSysOrderNoRule(item);
}
return ResultBean.success("导出成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); return ResultBean.success("导出成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
}catch(ImppBusiException busExcep){ }catch(ImppBusiException busExcep){
return ResultBean.fail(busExcep); return ResultBean.fail(busExcep);

@ -9,7 +9,7 @@ import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
import cn.estsh.i3plus.pojo.platform.bean.SysMessage; import cn.estsh.i3plus.pojo.platform.bean.SysMessage;
import cn.estsh.i3plus.pojo.platform.bean.SysRefUserMessage; import cn.estsh.i3plus.pojo.platform.bean.SysRefUserMessage;
import cn.estsh.i3plus.pojo.platform.bean.SysUser; import cn.estsh.i3plus.pojo.platform.bean.SysUser;
import com.alibaba.fastjson.JSON; import com.fasterxml.jackson.databind.ObjectMapper;
import com.rabbitmq.client.Channel; import com.rabbitmq.client.Channel;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -58,7 +58,8 @@ public class MessageLetterQueueReceiver {
SysRefUserMessage refUserMessage; SysRefUserMessage refUserMessage;
SysUser sysUser; SysUser sysUser;
List userMessage; List<SysRefUserMessage> userMessage;
ObjectMapper mapper = new ObjectMapper();
for (int i = 0; i < messageReceiver.length; i++) { for (int i = 0; i < messageReceiver.length; i++) {
sysUser = sysUserService.getSysUserById(Long.parseLong(messageReceiver[i])); sysUser = sysUserService.getSysUserById(Long.parseLong(messageReceiver[i]));
@ -80,7 +81,7 @@ public class MessageLetterQueueReceiver {
userMessage = sysMessageService.findSysRefUserMessageByUserIdAndStatus(sysUser.getId(), userMessage = sysMessageService.findSysRefUserMessageByUserIdAndStatus(sysUser.getId(),
ImppEnumUtil.MESSAGE_STATUS.UNREAD.getValue()); ImppEnumUtil.MESSAGE_STATUS.UNREAD.getValue());
MessageWebSocket.sendMessage(sysUser.getUserInfoId(), MessageWebSocket.sendMessage(sysUser.getUserInfoId(),
JSON.toJSONString(userMessage) mapper.writeValueAsString(userMessage)
); );
} }

@ -105,4 +105,10 @@ public class SysConfigService implements ISysConfigService {
SysConfigRDao.updateByProperties("configCode",value,"configValue",value); SysConfigRDao.updateByProperties("configCode",value,"configValue",value);
} }
@Override
@ApiOperation(value = "根据系统参数组来查找系统参数")
public List findSysConfigByGroup(Integer group) {
return SysConfigRDao.findByProperty("configGroup",group);
}
} }

@ -192,4 +192,11 @@ public class SysDictionaryService implements ISysDictionaryService {
return sysDictionaryRDao.getByProperty(new String[]{"parentCodeRdd","dictionaryValue"}, return sysDictionaryRDao.getByProperty(new String[]{"parentCodeRdd","dictionaryValue"},
new Object[]{parentCode,value}); new Object[]{parentCode,value});
} }
@Override
@ApiOperation(value = "根据父节点 以及当前节点名称 获取字典信息")
public SysDictionary getSysDictionaryByParentCodeAndName(String parentCode, String name) {
return sysDictionaryRDao.getByProperty(new String[]{"parentCodeRdd","name"},
new Object[]{parentCode,name});
}
} }

@ -20,10 +20,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -80,7 +77,6 @@ public class ExcelUtil {
this.rabbitTemplate = rabbitTemplate; this.rabbitTemplate = rabbitTemplate;
} }
/** /**
* *
* *
@ -130,13 +126,13 @@ public class ExcelUtil {
HSSFRow hssfRow; HSSFRow hssfRow;
Method method; Method method;
AnnoOutputColumn outputColumn; AnnoOutputColumn outputColumn;
Object CellValue; Object cellValue;
for (int i = 0; i < data.size(); i++) { for (int i = 0; i < data.size(); i++) {
hssfRow = sheet.createRow(i + 1); hssfRow = sheet.createRow(i + 1);
for (int j = 0; j < fields.length; j++) { for (int j = 0; j < fields.length; j++) {
fields[j].setAccessible(true); fields[j].setAccessible(true);
CellValue = fields[j].get(data.get(i)); cellValue = fields[j].get(data.get(i));
// 判断是否存在引用关系 // 判断是否存在引用关系
if (fields[j].isAnnotationPresent(AnnoOutputColumn.class)) { if (fields[j].isAnnotationPresent(AnnoOutputColumn.class)) {
@ -148,19 +144,19 @@ public class ExcelUtil {
outputColumn.refForeignKey() + "Of" + StringTool.toUpperCaseFirstOne(outputColumn.value()), outputColumn.refForeignKey() + "Of" + StringTool.toUpperCaseFirstOne(outputColumn.value()),
outputColumn.refClass().getDeclaredMethod("get" outputColumn.refClass().getDeclaredMethod("get"
+ StringTool.toUpperCaseFirstOne(outputColumn.refForeignKey())).getReturnType()); + StringTool.toUpperCaseFirstOne(outputColumn.refForeignKey())).getReturnType());
CellValue = method.invoke(data.get(i), CellValue); cellValue = method.invoke(data.get(i), cellValue);
}else if(outputColumn.refClass().equals(SysDictionary.class) && CellValue != null){ }else if(outputColumn.refClass().equals(SysDictionary.class) && cellValue != null){
CellValue = sysDictionaryService.getSysDictionaryByParentCodeAndValue(outputColumn.refForeignKey(), String.valueOf(CellValue)).getName(); cellValue = sysDictionaryService.getSysDictionaryByParentCodeAndValue(outputColumn.refForeignKey(), String.valueOf(cellValue)).getName();
} else if(!outputColumn.refClass().equals(Object.class) && !outputColumn.refClass().equals(SysDictionary.class)){ } else if(!outputColumn.refClass().equals(Object.class) && !outputColumn.refClass().equals(SysDictionary.class)){
CellValue = selectByProperty(outputColumn.refClass(), outputColumn.value(), outputColumn.refForeignKey(), CellValue); cellValue = selectByProperty(outputColumn.refClass(), outputColumn.value(), outputColumn.refForeignKey(), cellValue);
} }
} }
// excel 文本框最大长度 // excel 文本框最大长度
if(String.valueOf(CellValue).length() > 30000){ if(String.valueOf(cellValue).length() > 30000){
hssfRow.createCell(j, CellType.STRING).setCellValue(String.valueOf(CellValue).substring(0,30000)); hssfRow.createCell(j, CellType.STRING).setCellValue(String.valueOf(cellValue).substring(0,30000));
}else{ }else{
hssfRow.createCell(j, CellType.STRING).setCellValue(String.valueOf(CellValue)); hssfRow.createCell(j, CellType.STRING).setCellValue(String.valueOf(cellValue));
} }
} }
@ -228,11 +224,12 @@ public class ExcelUtil {
// excel列名与字段名映射 // excel列名与字段名映射
Map<String, Field> colName = new HashMap<>(); Map<String, Field> colName = new HashMap<>();
ApiParam fieldAnno; for (Field field : ReflexTool.getAllField(importClass.getName())) {
for (Field field : importClass.getDeclaredFields()) { if (field.isAnnotationPresent(AnnoOutputColumn.class)
if (field.isAnnotationPresent(ApiParam.class)) { && !StringUtils.isBlank(field.getAnnotation(AnnoOutputColumn.class).name())) {
fieldAnno = field.getAnnotation(ApiParam.class); colName.put(field.getAnnotation(AnnoOutputColumn.class).name(), field);
colName.put(fieldAnno.value(), field); } else if (field.isAnnotationPresent(ApiParam.class)) {
colName.put(field.getAnnotation(ApiParam.class).value(), field);
} }
} }
@ -247,61 +244,42 @@ public class ExcelUtil {
Row row; Row row;
Object obj; Object obj;
Object cellValue = null; Object cellValue = null;
AnnoOutputColumn inputColumn;
Method method;
for (int i = 1; i <= sheet.getLastRowNum(); i++) { for (int i = 1; i <= sheet.getLastRowNum(); i++) {
row = sheet.getRow(i); row = sheet.getRow(i);
obj = importClass.newInstance(); obj = importClass.newInstance();
for (int j = 0; j < fields.length; j++) { for (int j = 0; j < fields.length; j++) {
row.getCell(j).setCellType(CellType.STRING); // 判断是否存在引用关系
if ("".equals(row.getCell(j).getStringCellValue())) { if (fields[j].isAnnotationPresent(AnnoOutputColumn.class)) {
cellValue = null; inputColumn = fields[j].getAnnotation(AnnoOutputColumn.class);
} else if (fields[j].getType() == String.class) {
cellValue = row.getCell(j).getStringCellValue(); cellValue = row.getCell(j).getStringCellValue();
} else if (fields[j].getType() == Integer.class) {
cellValue = Integer.parseInt(row.getCell(j).getStringCellValue()); // 判断是否为枚举字段
} else if (fields[j].getType() == Long.class) { if (inputColumn.refClass().isEnum()) {
cellValue = Long.parseLong(row.getCell(j).getStringCellValue()); method = inputColumn.refClass().getDeclaredMethod(
inputColumn.value() + "Of" + StringTool.toUpperCaseFirstOne(inputColumn.refForeignKey()),
inputColumn.refClass().getDeclaredMethod("get"
+ StringTool.toUpperCaseFirstOne(inputColumn.value())).getReturnType());
cellValue = method.invoke(null,cellValue);
}else if(inputColumn.refClass().equals(SysDictionary.class) && cellValue != null){
cellValue = sysDictionaryService.getSysDictionaryByParentCodeAndName(inputColumn.refForeignKey(), String.valueOf(cellValue)).getName();
} else if(!inputColumn.refClass().equals(Object.class) && !inputColumn.refClass().equals(SysDictionary.class)){
cellValue = selectByProperty(inputColumn.refClass(), inputColumn.refForeignKey(), inputColumn.value(), cellValue);
}
}else{
cellValue = getExcelCell(row.getCell(j),fields[j].getType());
} }
importClass.getDeclaredMethod("set" + StringTool.toUpperCaseFirstOne(fields[j].getName()), fields[j].getType()) fields[j].setAccessible(true);
.invoke(obj, cellValue); fields[j].set(obj,cellValue);
} }
dataList.add(obj); dataList.add(obj);
} }
} catch (IOException e) { } catch (Exception e){
throw ImppExceptionBuilder.newInstance() e.printStackTrace();
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
.setErrorCode(ImppExceptionEnum.IO_EXCEPTION.getCode())
.setErrorDetail("IO输入输出异常")
.build();
} catch (IllegalAccessException e) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
.setErrorCode(ImppExceptionEnum.REFLEX_EXCEPTION.getCode())
.setErrorDetail("无法访问导入类")
.setErrorSolution("请检查导入类访问修饰符")
.build();
} catch (InstantiationException e) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
.setErrorCode(ImppExceptionEnum.REFLEX_EXCEPTION.getCode())
.setErrorDetail("无法实例化导入类")
.setErrorSolution("请检查导入类是拥有无参构造方法")
.build();
} catch (InvocationTargetException e) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
.setErrorCode(ImppExceptionEnum.REFLEX_EXCEPTION.getCode())
.setErrorDetail("属性set方法实现错误")
.setErrorSolution("请检查属性set方法参数类型是否正确")
.build();
} catch (NoSuchMethodException e) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
.setErrorCode(ImppExceptionEnum.REFLEX_EXCEPTION.getCode())
.setErrorDetail("没有找到属性set方法")
.setErrorSolution("请检查属性set方法是否存在")
.build();
} }
return dataList; return dataList;
} }
@ -328,20 +306,28 @@ public class ExcelUtil {
// 创建表头 // 创建表头
HSSFRow tableHeader = sheet.createRow(0); HSSFRow tableHeader = sheet.createRow(0);
HSSFRow tableData = sheet.createRow(1);
// 类数据 // 类数据
Field[] declaredFields = exportClass.getDeclaredFields(); Field[] fields = ReflexTool.getAllField(exportClass.getName());
ApiParam fieldAnno;
int col = 0; int col = 0;
for (int i = 0; i < declaredFields.length; i++) { for (int i = 0; i < fields.length; i++) {
if (declaredFields[i].isAnnotationPresent(ApiParam.class)) { if (fields[i].isAnnotationPresent(AnnoOutputColumn.class)) {
fieldAnno = declaredFields[i].getAnnotation(ApiParam.class); // 是否隐藏列
if (!fieldAnno.hidden()) { if(!fields[i].getAnnotation(AnnoOutputColumn.class).hidden()){
tableHeader.createCell(col, CellType.STRING).setCellValue(fieldAnno.value()); if (fields[i].isAnnotationPresent(AnnoOutputColumn.class)) {
tableHeader.createCell(col, CellType.STRING).setCellValue(fields[i].getAnnotation(AnnoOutputColumn.class).name());
}
tableData.createCell(col, CellType.STRING).setCellValue(fieldAnno.example()); // 优先使用 AnnoOutputColumn.name()
if (fields[i].isAnnotationPresent(ApiParam.class) && StringUtils.isBlank(fields[i].getAnnotation(AnnoOutputColumn.class).name())) {
tableHeader.createCell(col, CellType.STRING).setCellValue(fields[i].getAnnotation(ApiParam.class).value());
}
col++;
}
} else {
if (fields[i].isAnnotationPresent(ApiParam.class)) {
tableHeader.createCell(col, CellType.STRING).setCellValue(fields[i].getAnnotation(ApiParam.class).value());
col++; col++;
} }
} }
@ -368,7 +354,6 @@ public class ExcelUtil {
/** /**
* *
*
* @param pojoClass * @param pojoClass
* @return * @return
*/ */
@ -381,7 +366,6 @@ public class ExcelUtil {
colName.put(fields[i].getName(),fields[i].getAnnotation(ApiParam.class).value()); colName.put(fields[i].getName(),fields[i].getAnnotation(ApiParam.class).value());
} }
if (fields[i].isAnnotationPresent(AnnoOutputColumn.class)) { if (fields[i].isAnnotationPresent(AnnoOutputColumn.class)) {
// 判断是否隐藏 // 判断是否隐藏
if(fields[i].getAnnotation(AnnoOutputColumn.class).hidden()){ if(fields[i].getAnnotation(AnnoOutputColumn.class).hidden()){
@ -397,6 +381,7 @@ public class ExcelUtil {
} }
/** /**
*
* @param persistentClass * @param persistentClass
* @param colName * @param colName
* @param propertyName * @param propertyName
@ -409,7 +394,36 @@ public class ExcelUtil {
return entityManager.createQuery(queryString).setParameter(propertyName, value).getSingleResult(); return entityManager.createQuery(queryString).setParameter(propertyName, value).getSingleResult();
} }
/**
* excel
* @param cell
* @param cellClass
* @return
*/
private static Object getExcelCell(Cell cell, Class cellClass) {
if (cell != null) {
cell.setCellType(CellType.STRING);
if ("".equals(cell.getStringCellValue()) || "null".equals(cell.getStringCellValue())) {
return null;
} else if (cellClass == String.class) {
return cell.getStringCellValue();
} else if (cellClass == Integer.class) {
return Integer.parseInt(cell.getStringCellValue());
} else if (cellClass == Long.class) {
return Long.parseLong(cell.getStringCellValue());
} else if (cellClass == Double.class) {
return Long.parseLong(cell.getStringCellValue());
}
}
return null;
}
/**
*
* @param fileList
* @param userId
*/
public static void sendStationLetter(List<SysFile> fileList, Long userId){ public static void sendStationLetter(List<SysFile> fileList, Long userId){
StringBuffer letter = new StringBuffer(); StringBuffer letter = new StringBuffer();
letter.append("导出文件列表:"); letter.append("导出文件列表:");
@ -433,42 +447,4 @@ public class ExcelUtil {
rabbitTemplate.convertAndSend(PlatformConstWords.IMPP_MESSAGE_LETTER_QUEUE,sysMessage); rabbitTemplate.convertAndSend(PlatformConstWords.IMPP_MESSAGE_LETTER_QUEUE,sysMessage);
} }
public static void main(String[] args) {
// List<SysTool> sysTools = new ArrayList<>();
// SysTool sysTool = new SysTool();
// for (int i = 0; i < 14; i++) {
// sysTool.setName("ddd");
// sysTools.add(sysTool);
// }
// String[] colName = new String[]{"name", "toolTypeNameRdd", "toolStatus", "toolIp", "toolPort", "toolConnType", "toolDataType", "toolOperating", "toolDescription"};
// try {
// FileOutputStream ds = new FileOutputStream("E://testOut.xls");
// ds.write(ExcelUtil.exportData(sysTools, SysTool.class, colName));
// ds.flush();
// ds.close();
//// ExcelUtil.importData("testOut.xls", new FileInputStream("E://testOut.xls"), SysTool.class);
//// ExcelUtil.importTemplate(new FileOutputStream("E://testOut.xls"), SysTool.class, colName);
//
// } catch (IOException e) {
// e.printStackTrace();
// }
SysTool st = new SysTool();
st.setName("测试");
st.setId(1L);
try {
System.out.println(SysTool.class.getField("id").isAccessible());
System.out.println("取值:"+ SysTool.class.getField("id").get(st));
System.out.println(SysTool.class.getDeclaredField("name").isAccessible());
Field field = SysTool.class.getDeclaredField("name");
field.setAccessible(true);
System.out.println("取值:"+ field.get(st));
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
} }

@ -21,7 +21,7 @@ import java.util.concurrent.ConcurrentMap;
* @CreateDate : 2018-11-24 16:57 * @CreateDate : 2018-11-24 16:57
* @Modify: * @Modify:
**/ **/
@ServerEndpoint(value= PlatformConstWords.BASE_URL + "/message-websocket/{userId}") @ServerEndpoint(value= PlatformConstWords.WEBSOCKET_URL + "/message-websocket/{userId}")
@Component @Component
public class MessageWebSocket { public class MessageWebSocket {
@ -84,11 +84,11 @@ public class MessageWebSocket {
public static void sendMessage(Long userId, String message){ public static void sendMessage(Long userId, String message){
try { try {
MessageWebSocket websocket = webSocketSet.get(userId); MessageWebSocket websocket = webSocketSet.get(userId);
if (message.equals("heartBit") && websocket.session != null){ if(websocket != null) {
websocket.session.getBasicRemote().sendText(message + "=" + sendCount); if (message.equals("heartBit")) {
sendCount++; websocket.session.getBasicRemote().sendText(message + "=" + sendCount);
}else{ sendCount++;
if(websocket != null){ } else {
websocket.session.getBasicRemote().sendText(message); websocket.session.getBasicRemote().sendText(message);
} }
} }

@ -1,7 +1,7 @@
#项目端口 #项目端口
server.port=8100 server.port=8100
#本机ip #本机ip
impp.server.ip=192.168.1.40 impp.server.ip=192.168.1.56
#console控制台服务zipkin追踪全路径 #console控制台服务zipkin追踪全路径
impp.console.ip=http://csd.estsh.com impp.console.ip=http://csd.estsh.com

Loading…
Cancel
Save