diff --git a/shapelight-admin/pom.xml b/shapelight-admin/pom.xml index 13c22d1..1ec36d0 100644 --- a/shapelight-admin/pom.xml +++ b/shapelight-admin/pom.xml @@ -157,17 +157,17 @@ - com.guwan + com.alibaba easyexcel 4.0.3 - + diff --git a/shapelight-admin/src/main/java/net/shapelight/common/utils/ExcelUtils.java b/shapelight-admin/src/main/java/net/shapelight/common/utils/ExcelUtils.java index aaac020..9fd07cf 100644 --- a/shapelight-admin/src/main/java/net/shapelight/common/utils/ExcelUtils.java +++ b/shapelight-admin/src/main/java/net/shapelight/common/utils/ExcelUtils.java @@ -1,8 +1,8 @@ package net.shapelight.common.utils; -import com.guwan.excel.EasyExcel; -import com.guwan.excel.converters.longconverter.LongStringConverter; -import com.guwan.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.converters.longconverter.LongStringConverter; +import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/excel/model/PersonModel.java b/shapelight-admin/src/main/java/net/shapelight/modules/excel/model/PersonModel.java index 4521c6d..d198019 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/excel/model/PersonModel.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/excel/model/PersonModel.java @@ -1,13 +1,12 @@ package net.shapelight.modules.excel.model; import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.metadata.BaseRowModel; import lombok.Data; import java.io.Serializable; @Data -public class PersonModel extends BaseRowModel implements Serializable { +public class PersonModel implements Serializable { private static final long serialVersionUID = 1L; private Long id; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/coverter/StatusConverter.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/coverter/StatusConverter.java index 8f87024..00d27e1 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/coverter/StatusConverter.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/coverter/StatusConverter.java @@ -1,11 +1,11 @@ package net.shapelight.modules.mobile.coverter; -import com.guwan.excel.converters.Converter; -import com.guwan.excel.enums.CellDataTypeEnum; -import com.guwan.excel.metadata.GlobalConfiguration; -import com.guwan.excel.metadata.data.WriteCellData; -import com.guwan.excel.metadata.property.ExcelContentProperty; +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.data.WriteCellData; +import com.alibaba.excel.metadata.property.ExcelContentProperty; import java.util.Optional; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileContact.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileContact.java new file mode 100644 index 0000000..5ec9650 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/entity/MobileContact.java @@ -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; + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapper/MobileContactMapper.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapper/MobileContactMapper.java new file mode 100644 index 0000000..fb83c21 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/mapper/MobileContactMapper.java @@ -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 { + +} + + + + diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/MobileContactService.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/MobileContactService.java new file mode 100644 index 0000000..161b345 --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/MobileContactService.java @@ -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 { + +} diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobileContactServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobileContactServiceImpl.java new file mode 100644 index 0000000..b8736bf --- /dev/null +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/service/impl/MobileContactServiceImpl.java @@ -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 + implements MobileContactService{ + +} + + + + diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/mobileDeviceGroup/MobileDeviceGroupVo.java b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/mobileDeviceGroup/MobileDeviceGroupVo.java index 28ea3be..3ca830e 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/mobileDeviceGroup/MobileDeviceGroupVo.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/mobile/vo/mobileDeviceGroup/MobileDeviceGroupVo.java @@ -1,6 +1,6 @@ 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.ser.std.ToStringSerializer; import lombok.Data; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenPersonEntity.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenPersonEntity.java index 86ce9aa..a95c4da 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenPersonEntity.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/entity/TenPersonEntity.java @@ -368,4 +368,7 @@ public class TenPersonEntity extends BaseEntity implements Serializable { private String pvRight; private Integer featureType; + @TableField(exist = false) + private TenRelation tenRelation; + } diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java index 11ffb36..c54a080 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenPersonServiceImpl.java @@ -2,7 +2,6 @@ package net.shapelight.modules.ten.service.impl; import cn.hutool.core.collection.CollectionUtil; import com.alibaba.excel.EasyExcelFactory; -import com.alibaba.excel.metadata.Sheet; import com.arcsoft.face.FaceInfo; import com.arcsoft.face.enums.ExtractType; import com.arcsoft.face.toolkit.ImageFactory; @@ -467,6 +466,9 @@ public class TenPersonServiceImpl implements TenPersonService { appUser.setCurrentScopeId(appScope.getUserScopeId()); appUserService.updateById(appUser); } + if (entity.getPersonType().equals(Constant.PERSON_TYPE_OWNER)) { + + } //发送设备通知 List devList = tenDeviceService.findByCellId(entity.getCellId()); @@ -1994,7 +1996,7 @@ public class TenPersonServiceImpl implements TenPersonService { PersonExcelListener listener = new PersonExcelListener(imageFiles, this, this.tenCellDeptService,tenantId); try { excelStream = new BufferedInputStream(new FileInputStream(excelFileStr)); - EasyExcelFactory.readBySax(excelStream, new Sheet(1, 1, PersonModel.class), listener); + EasyExcelFactory.read(excelStream,PersonModel.class, listener); excelStream.close(); list.addAll(listener.getList()); } catch (Exception exp) { diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenSyncServiceImpl.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenSyncServiceImpl.java index b3ef4c2..e21a445 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenSyncServiceImpl.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/service/impl/TenSyncServiceImpl.java @@ -1,7 +1,6 @@ package net.shapelight.modules.ten.service.impl; import com.alibaba.excel.EasyExcelFactory; -import com.alibaba.excel.metadata.Sheet; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;