智慧校园话务模块

This commit is contained in:
张博 2024-11-18 13:52:28 +08:00
parent 1787fb6b79
commit 3001e20b0d
12 changed files with 137 additions and 17 deletions

View File

@ -157,17 +157,17 @@
<dependency> <dependency>
<groupId>com.guwan</groupId> <groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId> <artifactId>easyexcel</artifactId>
<version>4.0.3</version> <version>4.0.3</version>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId> <artifactId>easyexcel</artifactId>
<version>1.1.2-beta5</version> <version>1.1.2-beta5</version>
</dependency> </dependency>-->
<dependency> <dependency>

View File

@ -1,8 +1,8 @@
package net.shapelight.common.utils; package net.shapelight.common.utils;
import com.guwan.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.guwan.excel.converters.longconverter.LongStringConverter; import com.alibaba.excel.converters.longconverter.LongStringConverter;
import com.guwan.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -1,13 +1,12 @@
package net.shapelight.modules.excel.model; package net.shapelight.modules.excel.model;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
public class PersonModel extends BaseRowModel implements Serializable { public class PersonModel implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Long id; private Long id;

View File

@ -1,11 +1,11 @@
package net.shapelight.modules.mobile.coverter; package net.shapelight.modules.mobile.coverter;
import com.guwan.excel.converters.Converter; import com.alibaba.excel.converters.Converter;
import com.guwan.excel.enums.CellDataTypeEnum; import com.alibaba.excel.enums.CellDataTypeEnum;
import com.guwan.excel.metadata.GlobalConfiguration; import com.alibaba.excel.metadata.GlobalConfiguration;
import com.guwan.excel.metadata.data.WriteCellData; import com.alibaba.excel.metadata.data.WriteCellData;
import com.guwan.excel.metadata.property.ExcelContentProperty; import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.util.Optional; import java.util.Optional;

View File

@ -0,0 +1,64 @@
package net.shapelight.modules.mobile.entity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
/**
*
* @TableName mobile_contact
*/
@Data
@ApiModel("联系人信息")
@TableName("mobile_contact")
public class MobileContact implements Serializable {
/**
* 联系人ID
*/
@NotNull(message="[联系人ID]不能为空")
@ApiModelProperty("联系人ID")
private Long contactId;
/**
* 联系人姓名
*/
@Size(max= 20,message="编码长度不能超过20")
@ApiModelProperty("联系人姓名")
@Length(max= 20,message="编码长度不能超过20")
private String name;
/**
* 联系人电话
*/
@Size(max= 20,message="编码长度不能超过20")
@ApiModelProperty("联系人电话")
@Length(max= 20,message="编码长度不能超过20")
private String mobile;
/**
* 学生ID
*/
@ApiModelProperty("学生ID")
private Long personId;
/**
* 排序字段
*/
@ApiModelProperty("排序字段")
private Integer order;
/**
* 家长ID
*/
@ApiModelProperty("家长ID")
private Long parentId;
/**
* 绑定状态
*/
@ApiModelProperty("绑定状态")
private Integer bindStatus;
}

View File

@ -0,0 +1,18 @@
package net.shapelight.modules.mobile.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.shapelight.modules.mobile.entity.MobileContact;
/**
* @author zhangbo
* @description 针对表mobile_contact的数据库操作Mapper
* @createDate 2024-11-18 13:29:24
* @Entity net.shapelight.modules.mobile.entity.MobileContact
*/
public interface MobileContactMapper extends BaseMapper<MobileContact> {
}

View File

@ -0,0 +1,13 @@
package net.shapelight.modules.mobile.service;
import com.baomidou.mybatisplus.extension.service.IService;
import net.shapelight.modules.mobile.entity.MobileContact;
/**
* @author zhangbo
* @description 针对表mobile_contact的数据库操作Service
* @createDate 2024-11-18 13:29:24
*/
public interface MobileContactService extends IService<MobileContact> {
}

View File

@ -0,0 +1,22 @@
package net.shapelight.modules.mobile.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.shapelight.modules.mobile.entity.MobileContact;
import net.shapelight.modules.mobile.service.MobileContactService;
import net.shapelight.modules.mobile.mapper.MobileContactMapper;
import org.springframework.stereotype.Service;
/**
* @author zhangbo
* @description 针对表mobile_contact的数据库操作Service实现
* @createDate 2024-11-18 13:29:24
*/
@Service
public class MobileContactServiceImpl extends ServiceImpl<MobileContactMapper, MobileContact>
implements MobileContactService{
}

View File

@ -1,6 +1,6 @@
package net.shapelight.modules.mobile.vo.mobileDeviceGroup; package net.shapelight.modules.mobile.vo.mobileDeviceGroup;
import com.guwan.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data; import lombok.Data;

View File

@ -368,4 +368,7 @@ public class TenPersonEntity extends BaseEntity implements Serializable {
private String pvRight; private String pvRight;
private Integer featureType; private Integer featureType;
@TableField(exist = false)
private TenRelation tenRelation;
} }

View File

@ -2,7 +2,6 @@ package net.shapelight.modules.ten.service.impl;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.excel.EasyExcelFactory; import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.metadata.Sheet;
import com.arcsoft.face.FaceInfo; import com.arcsoft.face.FaceInfo;
import com.arcsoft.face.enums.ExtractType; import com.arcsoft.face.enums.ExtractType;
import com.arcsoft.face.toolkit.ImageFactory; import com.arcsoft.face.toolkit.ImageFactory;
@ -467,6 +466,9 @@ public class TenPersonServiceImpl implements TenPersonService {
appUser.setCurrentScopeId(appScope.getUserScopeId()); appUser.setCurrentScopeId(appScope.getUserScopeId());
appUserService.updateById(appUser); appUserService.updateById(appUser);
} }
if (entity.getPersonType().equals(Constant.PERSON_TYPE_OWNER)) {
}
//发送设备通知 //发送设备通知
List<TenDeviceVo> devList = tenDeviceService.findByCellId(entity.getCellId()); List<TenDeviceVo> devList = tenDeviceService.findByCellId(entity.getCellId());
@ -1994,7 +1996,7 @@ public class TenPersonServiceImpl implements TenPersonService {
PersonExcelListener listener = new PersonExcelListener(imageFiles, this, this.tenCellDeptService,tenantId); PersonExcelListener listener = new PersonExcelListener(imageFiles, this, this.tenCellDeptService,tenantId);
try { try {
excelStream = new BufferedInputStream(new FileInputStream(excelFileStr)); excelStream = new BufferedInputStream(new FileInputStream(excelFileStr));
EasyExcelFactory.readBySax(excelStream, new Sheet(1, 1, PersonModel.class), listener); EasyExcelFactory.read(excelStream,PersonModel.class, listener);
excelStream.close(); excelStream.close();
list.addAll(listener.getList()); list.addAll(listener.getList());
} catch (Exception exp) { } catch (Exception exp) {

View File

@ -1,7 +1,6 @@
package net.shapelight.modules.ten.service.impl; package net.shapelight.modules.ten.service.impl;
import com.alibaba.excel.EasyExcelFactory; import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.metadata.Sheet;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;