diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e079618..a4ae88f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,105 +2,111 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + - - - - - + + + + - + + + - - + - + - - - - - - + - - - + - - - - - + + + - - - - - + + + + - - + - - - - + @@ -196,11 +202,11 @@ + - @@ -890,13 +896,59 @@ - - - 1664517688369 - 1665485232564 @@ -1234,7 +1286,14 @@ - @@ -1265,7 +1324,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1420,6 +1427,11 @@ 103 diff --git a/src/main/java/com/subsidy/controller/CompanyMemberMappingController.java b/src/main/java/com/subsidy/controller/CompanyMemberMappingController.java index c716f65..1343b29 100644 --- a/src/main/java/com/subsidy/controller/CompanyMemberMappingController.java +++ b/src/main/java/com/subsidy/controller/CompanyMemberMappingController.java @@ -3,6 +3,8 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.company.GetCompanyMembersDTO; import com.subsidy.dto.company.InviteMemberDTO; import com.subsidy.dto.member.CancerMemberDTO; import com.subsidy.service.CompanyMemberMappingService; diff --git a/src/main/java/com/subsidy/controller/MemberController.java b/src/main/java/com/subsidy/controller/MemberController.java index 88d34ca..438b6d8 100644 --- a/src/main/java/com/subsidy/controller/MemberController.java +++ b/src/main/java/com/subsidy/controller/MemberController.java @@ -33,7 +33,6 @@ public class MemberController { @Autowired private MemberService memberService; - @PostMapping("departMembers") @ApiOperation("某公司的离职记录 pageSize pageNum companyId userName 姓名/手机号/身份证号") public ResponseVO departMembers(@RequestBody DepartMembersDTO departMembersDTO){ diff --git a/src/main/java/com/subsidy/controller/ProductDictController.java b/src/main/java/com/subsidy/controller/ProductDictController.java index 6707232..9ceb733 100644 --- a/src/main/java/com/subsidy/controller/ProductDictController.java +++ b/src/main/java/com/subsidy/controller/ProductDictController.java @@ -4,6 +4,7 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.dto.product.AllProductsDTO; +import com.subsidy.dto.product.ChangeOrderDTO; import com.subsidy.model.ProductDictDO; import com.subsidy.service.ProductDictService; import io.swagger.annotations.ApiOperation; @@ -32,7 +33,7 @@ public class ProductDictController { private ProductDictService productDictService; @PostMapping("allProducts") - @ApiOperation("查看所有产品 productName groundingStatus pageSize pageNum") + @ApiOperation("查看所有产品 productName groundingStatus pageSize pageNum productType 0:企业产品 1:院校产品") public ResponseVO allProducts(@RequestBody AllProductsDTO allProductsDTO){ return ResponseData.generateCreatedResponse(0,productDictService.allProducts(allProductsDTO)); } @@ -55,4 +56,9 @@ public class ProductDictController { return ResponseData.generateCreatedResponse(0,productDictService.updateProduct(productDictDO)); } + @PostMapping("changeOrder") + @ApiOperation("排序 productDictDOS [id orderNo]") + public ResponseVO changeOrder(@RequestBody ChangeOrderDTO changeOrderDTO){ + return ResponseData.generateCreatedResponse(0,productDictService.changeOrder(changeOrderDTO)); + } } diff --git a/src/main/java/com/subsidy/controller/ServiceCompanyFilesController.java b/src/main/java/com/subsidy/controller/ServiceCompanyFilesController.java index 6cf340b..4c33b32 100644 --- a/src/main/java/com/subsidy/controller/ServiceCompanyFilesController.java +++ b/src/main/java/com/subsidy/controller/ServiceCompanyFilesController.java @@ -33,7 +33,7 @@ public class ServiceCompanyFilesController { private ServiceCompanyFilesService serviceCompanyFilesService; @PostMapping("companyFiles") - @ApiOperation("查看业务合同/业务材料 serviceId companyId fileType 0:业务合同 1:业务材料 ") + @ApiOperation("##2024.4##查看业务合同/业务材料 pageSize pageNum fileName serviceCompanyId treeId ") public ResponseVO companyFiles(@RequestBody CompanyFilesDTO companyFilesDTO){ return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.companyFiles(companyFilesDTO)); } @@ -45,9 +45,9 @@ public class ServiceCompanyFilesController { } @PostMapping("uploadFile") - @ApiOperation("上传新文件 serviceId companyId fileType 0:业务合同 1:业务材料 fileName fileAddress ") - public ResponseVO uploadFile(@RequestBody UploadFileDTO uploadFileDTO){ - return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.uploadFile(uploadFileDTO)); + @ApiOperation("上传新文件 treeId fileName fileAddress") + public ResponseVO uploadFile(@RequestBody ServiceCompanyFilesDO serviceCompanyFilesDO){ + return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.uploadFile(serviceCompanyFilesDO)); } } diff --git a/src/main/java/com/subsidy/controller/ServiceFileTreeController.java b/src/main/java/com/subsidy/controller/ServiceFileTreeController.java new file mode 100644 index 0000000..cfd40a2 --- /dev/null +++ b/src/main/java/com/subsidy/controller/ServiceFileTreeController.java @@ -0,0 +1,57 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.model.ServiceFileTreeDO; +import com.subsidy.service.ServiceFileTreeService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *

+ * 文件目录树 前端控制器 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +@RestController +@Api(tags = "文件目录树") +@RequestMapping("/serviceFileTree") +public class ServiceFileTreeController { + + @Autowired + private ServiceFileTreeService serviceFileTreeService; + + @PostMapping("trees") + @ApiOperation("查看某公司的目录树 companyId serviceId") + public ResponseVO trees(@RequestBody ServiceFileTreeDO serviceFileTreeDO){ + return ResponseData.generateCreatedResponse(0,serviceFileTreeService.trees(serviceFileTreeDO)); + } + + @PostMapping("addTree") + @ApiOperation("添加树节点 companyId serviceId parentId treeName") + public ResponseVO addTree(@RequestBody ServiceFileTreeDO serviceFileTreeDO){ + return ResponseData.generateCreatedResponse(0,serviceFileTreeService.addTree(serviceFileTreeDO)); + } + + @PostMapping("updateTree") + @ApiOperation("修改树节点 id treeName") + public ResponseVO updateTree(@RequestBody ServiceFileTreeDO serviceFileTreeDO){ + return ResponseData.generateCreatedResponse(0,serviceFileTreeService.updateTree(serviceFileTreeDO)); + } + + @PostMapping("deleteTree") + @ApiOperation("删除树节点 id ") + public ResponseVO deleteTree(@RequestBody ServiceFileTreeDO serviceFileTreeDO){ + return ResponseData.generateCreatedResponse(0,serviceFileTreeService.deleteTree(serviceFileTreeDO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/ServiceMemberMappingController.java b/src/main/java/com/subsidy/controller/ServiceMemberMappingController.java new file mode 100644 index 0000000..3334272 --- /dev/null +++ b/src/main/java/com/subsidy/controller/ServiceMemberMappingController.java @@ -0,0 +1,64 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.dto.member.DownloadFailClassMembers; +import com.subsidy.dto.member.RemoveMembersDTO; +import com.subsidy.dto.member.SelectImportDTO; +import com.subsidy.dto.member.SelectMembersDTO; +import com.subsidy.service.ServiceMemberMappingService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import io.swagger.annotations.Api; +import org.springframework.web.multipart.MultipartFile; + +/** + *

+ * 服务映射表 前端控制器 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +@RestController +@Api(tags = "服务映射表") +@RequestMapping("/serviceMemberMapping") +public class ServiceMemberMappingController { + + @Autowired + private ServiceMemberMappingService serviceMemberMappingService; + + @PostMapping("selectImport") + @ApiOperation("选择导入 memberIds[] companyId ") + public ResponseVO selectImport(@RequestBody SelectImportDTO selectImportDTO){ + return ResponseData.generateCreatedResponse(0,serviceMemberMappingService.selectImport(selectImportDTO)); + } + + @PostMapping("selectMembers") + @ApiOperation("该公司服务下已有的学员 companyId pageNum pageSize") + public ResponseVO selectMembers(@RequestBody SelectMembersDTO selectMembersDTO){ + return ResponseData.generateCreatedResponse(0,serviceMemberMappingService.selectMembers(selectMembersDTO)); + } + + @PostMapping("removeMembers") + @ApiOperation("移除学员 memberMappingIds") + public ResponseVO removeMembers(@RequestBody RemoveMembersDTO removeMembersDTO){ + return ResponseData.generateCreatedResponse(0,serviceMemberMappingService.removeMembers(removeMembersDTO)); + } + + @PostMapping("importClassMembers") + @ApiOperation("班级导入学员 file companyId") + public ResponseVO importClassMembers(@RequestParam("file") MultipartFile file, Long companyId){ + return ResponseData.generateCreatedResponse(0,serviceMemberMappingService.importClassMembers(file,companyId)); + } + + @PostMapping("downloadFailClassMembers") + @ApiOperation("下载导入失败的班级学员 downloadFailClassMembersDTOS[] 失败返回的那些字段") + public void downloadFailClassMembers(@RequestBody DownloadFailClassMembers downloadFailClassMembers){ + serviceMemberMappingService.downloadFailClassMembers(downloadFailClassMembers); + } + +} diff --git a/src/main/java/com/subsidy/dto/company/CompanyFilesDTO.java b/src/main/java/com/subsidy/dto/company/CompanyFilesDTO.java index ac2bac2..6a85354 100644 --- a/src/main/java/com/subsidy/dto/company/CompanyFilesDTO.java +++ b/src/main/java/com/subsidy/dto/company/CompanyFilesDTO.java @@ -4,20 +4,14 @@ import lombok.Data; @Data public class CompanyFilesDTO { - + private Integer pageSize; private Integer pageNum; private String fileName; - private Long serviceCompanyId; - - private Long serviceId; - - private Long companyId; - - private Integer fileType; + private Long treeId; } diff --git a/src/main/java/com/subsidy/dto/member/DownloadFailClassMembers.java b/src/main/java/com/subsidy/dto/member/DownloadFailClassMembers.java new file mode 100644 index 0000000..b83bc2e --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/DownloadFailClassMembers.java @@ -0,0 +1,12 @@ +package com.subsidy.dto.member; + +import lombok.Data; + +import java.util.List; + +@Data +public class DownloadFailClassMembers { + + private List downloadFailClassMembersDTOS; + +} diff --git a/src/main/java/com/subsidy/dto/member/DownloadFailClassMembersDTO.java b/src/main/java/com/subsidy/dto/member/DownloadFailClassMembersDTO.java new file mode 100644 index 0000000..450a7a0 --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/DownloadFailClassMembersDTO.java @@ -0,0 +1,21 @@ +package com.subsidy.dto.member; + +import com.subsidy.util.excel.ExcelColumn; +import lombok.Data; + +@Data +public class DownloadFailClassMembersDTO { + + @ExcelColumn(value = "姓名", col = 1) + private String userName; + + @ExcelColumn(value = "身份证", col = 2) + private String idCard; + + @ExcelColumn(value = "手机号", col = 3) + private String telephone; + + @ExcelColumn(value = "原因", col = 4) + private String reason; + +} diff --git a/src/main/java/com/subsidy/dto/member/ImportClassMemberDTO.java b/src/main/java/com/subsidy/dto/member/ImportClassMemberDTO.java new file mode 100644 index 0000000..89185e1 --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/ImportClassMemberDTO.java @@ -0,0 +1,22 @@ +package com.subsidy.dto.member; + +import com.subsidy.util.excel.ExcelColumnUtil; +import lombok.Data; + +@Data +public class ImportClassMemberDTO { + + private Long id; + + @ExcelColumnUtil(value = "姓名", col = 1) + private String userName; + + @ExcelColumnUtil(value = "身份证", col = 2) + private String idCard; + + @ExcelColumnUtil(value = "手机号", col = 3) + private String telephone; + + private String reason; + +} diff --git a/src/main/java/com/subsidy/dto/member/RemoveMembersDTO.java b/src/main/java/com/subsidy/dto/member/RemoveMembersDTO.java new file mode 100644 index 0000000..ef211e8 --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/RemoveMembersDTO.java @@ -0,0 +1,12 @@ +package com.subsidy.dto.member; + +import lombok.Data; + +import java.util.List; + +@Data +public class RemoveMembersDTO { + + private List memberMappingIds; + +} diff --git a/src/main/java/com/subsidy/dto/member/SelectImportDTO.java b/src/main/java/com/subsidy/dto/member/SelectImportDTO.java new file mode 100644 index 0000000..693173e --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/SelectImportDTO.java @@ -0,0 +1,14 @@ +package com.subsidy.dto.member; + +import lombok.Data; + +import java.util.List; + +@Data +public class SelectImportDTO { + + private List memberIds; + + private Long companyId; + +} diff --git a/src/main/java/com/subsidy/dto/member/SelectMembersDTO.java b/src/main/java/com/subsidy/dto/member/SelectMembersDTO.java new file mode 100644 index 0000000..5cc4952 --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/SelectMembersDTO.java @@ -0,0 +1,15 @@ +package com.subsidy.dto.member; + +import lombok.Data; + +@Data +public class SelectMembersDTO { + + private Long companyId; + + private Long serviceId; + + private Integer pageSize; + + private Integer pageNum; +} diff --git a/src/main/java/com/subsidy/dto/product/AllProductsDTO.java b/src/main/java/com/subsidy/dto/product/AllProductsDTO.java index b8448fc..5f910e5 100644 --- a/src/main/java/com/subsidy/dto/product/AllProductsDTO.java +++ b/src/main/java/com/subsidy/dto/product/AllProductsDTO.java @@ -5,7 +5,6 @@ import lombok.Data; @Data public class AllProductsDTO { - private Integer pageSize; private Integer pageNum; @@ -14,4 +13,6 @@ public class AllProductsDTO { private String groundingStatus; + private Integer productType; + } diff --git a/src/main/java/com/subsidy/dto/product/ChangeOrderDTO.java b/src/main/java/com/subsidy/dto/product/ChangeOrderDTO.java new file mode 100644 index 0000000..c8dbc14 --- /dev/null +++ b/src/main/java/com/subsidy/dto/product/ChangeOrderDTO.java @@ -0,0 +1,13 @@ +package com.subsidy.dto.product; + +import com.subsidy.model.ProductDictDO; +import lombok.Data; + +import java.util.List; + +@Data +public class ChangeOrderDTO { + + private List productDictDOS; + +} diff --git a/src/main/java/com/subsidy/mapper/CompanyMemberMappingMapper.java b/src/main/java/com/subsidy/mapper/CompanyMemberMappingMapper.java index 9a14a05..b7717eb 100644 --- a/src/main/java/com/subsidy/mapper/CompanyMemberMappingMapper.java +++ b/src/main/java/com/subsidy/mapper/CompanyMemberMappingMapper.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.subsidy.model.CompanyMemberMappingDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.subsidy.model.MemberDO; +import com.subsidy.vo.company.GetCompanyMembersVO; import com.subsidy.vo.company.MemberCompanyVO; import com.subsidy.vo.member.AttendMembersVO; import com.subsidy.vo.member.DepartMembersVO; @@ -47,4 +48,10 @@ public interface CompanyMemberMappingMapper extends BaseMapper companyAccountMembers(Long companyId, String accountName); + + /** + * 查看公司里里全部的人 + */ + List companyMembers(Long companyId); + } diff --git a/src/main/java/com/subsidy/mapper/ProductDictMapper.java b/src/main/java/com/subsidy/mapper/ProductDictMapper.java index 5b22b60..9c7f935 100644 --- a/src/main/java/com/subsidy/mapper/ProductDictMapper.java +++ b/src/main/java/com/subsidy/mapper/ProductDictMapper.java @@ -16,6 +16,8 @@ import org.springframework.stereotype.Repository; @Repository public interface ProductDictMapper extends BaseMapper { - IPage allProducts(IPage iPage,String groundingStatus, String productName); + IPage allProducts(IPage iPage,String groundingStatus, String productName,Integer productType); + + void updateOrderNo(Long id,Integer orderNo); } diff --git a/src/main/java/com/subsidy/mapper/ServiceCompanyFilesMapper.java b/src/main/java/com/subsidy/mapper/ServiceCompanyFilesMapper.java index b39db0e..486ca8a 100644 --- a/src/main/java/com/subsidy/mapper/ServiceCompanyFilesMapper.java +++ b/src/main/java/com/subsidy/mapper/ServiceCompanyFilesMapper.java @@ -18,6 +18,6 @@ import java.util.List; @Repository public interface ServiceCompanyFilesMapper extends BaseMapper { - IPage companyFiles(IPage page,Integer fileType,Long companyId,Long serviceId, String fileName); + IPage companyFiles(IPage page,List treeIds, String fileName); } diff --git a/src/main/java/com/subsidy/mapper/ServiceCompanyMappingMapper.java b/src/main/java/com/subsidy/mapper/ServiceCompanyMappingMapper.java index 30c6fe4..78b371c 100644 --- a/src/main/java/com/subsidy/mapper/ServiceCompanyMappingMapper.java +++ b/src/main/java/com/subsidy/mapper/ServiceCompanyMappingMapper.java @@ -35,6 +35,6 @@ public interface ServiceCompanyMappingMapper extends BaseMapper companyAdministerService(Long companyId, Long administerId); + List companyAdministerService(Long companyId,Long administerId); } diff --git a/src/main/java/com/subsidy/mapper/ServiceFileTreeMapper.java b/src/main/java/com/subsidy/mapper/ServiceFileTreeMapper.java new file mode 100644 index 0000000..0e4f11a --- /dev/null +++ b/src/main/java/com/subsidy/mapper/ServiceFileTreeMapper.java @@ -0,0 +1,18 @@ +package com.subsidy.mapper; + +import com.subsidy.model.ServiceFileTreeDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 文件目录树 Mapper 接口 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ + @Repository +public interface ServiceFileTreeMapper extends BaseMapper { + +} diff --git a/src/main/java/com/subsidy/mapper/ServiceMemberMappingMapper.java b/src/main/java/com/subsidy/mapper/ServiceMemberMappingMapper.java new file mode 100644 index 0000000..ce686b5 --- /dev/null +++ b/src/main/java/com/subsidy/mapper/ServiceMemberMappingMapper.java @@ -0,0 +1,24 @@ +package com.subsidy.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.subsidy.model.ServiceMemberMappingDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.subsidy.vo.member.SelectMembersVO; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 服务映射表 Mapper 接口 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +@Repository +public interface ServiceMemberMappingMapper extends BaseMapper { + + IPage selectMembers(IPage iPage,Long companyId, Long serviceId); + +} diff --git a/src/main/java/com/subsidy/model/MemberDO.java b/src/main/java/com/subsidy/model/MemberDO.java index 2a1d6e3..094708b 100644 --- a/src/main/java/com/subsidy/model/MemberDO.java +++ b/src/main/java/com/subsidy/model/MemberDO.java @@ -107,4 +107,29 @@ public class MemberDO extends BaseModel { private String wechat; + /** + * 实习状态 + */ + private String practiceStatus; + + /** + * 学院id + */ + private Long collegeId; + + /** + * 专业 + */ + private String major; + + /** + * 入学年份 + */ + private String enrollmentYear; + + /** + * 人员类型 0:学院 2 :职工 + */ + private Integer memberType; + } diff --git a/src/main/java/com/subsidy/model/ProductDictDO.java b/src/main/java/com/subsidy/model/ProductDictDO.java index b39c54b..ad60ac3 100644 --- a/src/main/java/com/subsidy/model/ProductDictDO.java +++ b/src/main/java/com/subsidy/model/ProductDictDO.java @@ -49,5 +49,7 @@ public class ProductDictDO extends BaseModel { private String highlightTag; + private Integer orderNo; + private Integer productType; } diff --git a/src/main/java/com/subsidy/model/ServiceCompanyFilesDO.java b/src/main/java/com/subsidy/model/ServiceCompanyFilesDO.java index c151f52..2c419c3 100644 --- a/src/main/java/com/subsidy/model/ServiceCompanyFilesDO.java +++ b/src/main/java/com/subsidy/model/ServiceCompanyFilesDO.java @@ -25,12 +25,7 @@ public class ServiceCompanyFilesDO extends BaseModel { @TableId(value = "id", type = IdType.AUTO) private Long id; - private Long serviceCompanyId; - - /** - * 0:业务合同 1:业务材料 - */ - private String fileType; + private Long treeId; private String fileName; diff --git a/src/main/java/com/subsidy/model/ServiceFileTreeDO.java b/src/main/java/com/subsidy/model/ServiceFileTreeDO.java new file mode 100644 index 0000000..f0abdbe --- /dev/null +++ b/src/main/java/com/subsidy/model/ServiceFileTreeDO.java @@ -0,0 +1,46 @@ +package com.subsidy.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.subsidy.util.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 文件目录树 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("service_file_tree") +public class ServiceFileTreeDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 公司id + */ + private Long companyId; + + /** + * 业务id + */ + private Long serviceId; + + /** + * 父节点 + */ + private Long parentId; + + private String treeName; + + +} diff --git a/src/main/java/com/subsidy/model/ServiceMemberMappingDO.java b/src/main/java/com/subsidy/model/ServiceMemberMappingDO.java new file mode 100644 index 0000000..909793d --- /dev/null +++ b/src/main/java/com/subsidy/model/ServiceMemberMappingDO.java @@ -0,0 +1,35 @@ +package com.subsidy.model; + +import com.subsidy.util.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 服务映射表 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("service_member_mapping") +public class ServiceMemberMappingDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private Long companyId; + + private Long serviceId; + + private Long memberId; + + +} diff --git a/src/main/java/com/subsidy/service/CompanyMemberMappingService.java b/src/main/java/com/subsidy/service/CompanyMemberMappingService.java index f6ba595..99a31ad 100644 --- a/src/main/java/com/subsidy/service/CompanyMemberMappingService.java +++ b/src/main/java/com/subsidy/service/CompanyMemberMappingService.java @@ -2,11 +2,13 @@ package com.subsidy.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.subsidy.dto.company.AttendMembersDTO; +import com.subsidy.dto.company.GetCompanyMembersDTO; import com.subsidy.dto.company.InviteMemberDTO; import com.subsidy.dto.member.CancerMemberDTO; import com.subsidy.dto.member.DepartMembersDTO; import com.subsidy.model.CompanyMemberMappingDO; import com.baomidou.mybatisplus.extension.service.IService; +import com.subsidy.vo.company.GetCompanyMembersVO; import com.subsidy.vo.member.AttendMembersVO; import com.subsidy.vo.member.DepartMembersVO; import com.subsidy.vo.member.MemberAttendInfoVO; @@ -26,4 +28,5 @@ public interface CompanyMemberMappingService extends IService { String updateProduct(ProductDictDO productDictDO); + String changeOrder(ChangeOrderDTO changeOrderDTO); } diff --git a/src/main/java/com/subsidy/service/ServiceCompanyFilesService.java b/src/main/java/com/subsidy/service/ServiceCompanyFilesService.java index 77d979d..f0ddcb1 100644 --- a/src/main/java/com/subsidy/service/ServiceCompanyFilesService.java +++ b/src/main/java/com/subsidy/service/ServiceCompanyFilesService.java @@ -22,7 +22,7 @@ public interface ServiceCompanyFilesService extends IService + * 文件目录树 服务类 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +public interface ServiceFileTreeService extends IService { + + List trees(ServiceFileTreeDO serviceFileTreeDO); + + String addTree(ServiceFileTreeDO serviceFileTreeDO); + + String updateTree(ServiceFileTreeDO serviceFileTreeDO); + + String deleteTree(ServiceFileTreeDO serviceFileTreeDO); + +} diff --git a/src/main/java/com/subsidy/service/ServiceMemberMappingService.java b/src/main/java/com/subsidy/service/ServiceMemberMappingService.java new file mode 100644 index 0000000..3375374 --- /dev/null +++ b/src/main/java/com/subsidy/service/ServiceMemberMappingService.java @@ -0,0 +1,36 @@ +package com.subsidy.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.subsidy.dto.member.DownloadFailClassMembers; +import com.subsidy.dto.member.RemoveMembersDTO; +import com.subsidy.dto.member.SelectImportDTO; +import com.subsidy.dto.member.SelectMembersDTO; +import com.subsidy.model.ServiceMemberMappingDO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.subsidy.vo.member.ImportClassMembersVO; +import com.subsidy.vo.member.SelectMembersVO; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + *

+ * 服务映射表 服务类 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +public interface ServiceMemberMappingService extends IService { + + String selectImport(SelectImportDTO selectImportDTO); + + IPage selectMembers(SelectMembersDTO selectMembersDTO); + + String removeMembers(RemoveMembersDTO removeMembersDTO); + + ImportClassMembersVO importClassMembers(MultipartFile multipartFile, Long companyId); + + void downloadFailClassMembers(DownloadFailClassMembers downloadFailClassMembers); + +} diff --git a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java index f7fa021..240cd72 100644 --- a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java @@ -65,7 +65,7 @@ public class AdministerServiceImpl extends ServiceImpl integers = new ArrayList<>(); + integers.add(3); + integers.add(1); + integers.add(0); + AdministerDO administerDO1 = this.baseMapper.selectOne(new QueryWrapper() .lambda() .eq(AdministerDO::getAccountName, administerDO.getAccountName()) - .ne(AdministerDO::getRole, 2)); + .in(AdministerDO::getRole, integers)); if (null == administerDO1) { throw new HttpException(10012); @@ -94,7 +99,7 @@ public class AdministerServiceImpl extends ServiceImpl() -// .lambda() -// .eq(RoleAdministerMappingDO::getAdministerId, administerDO.getId())); -// administerPermissionVO.setRole(roleAdministerMappingDO.getRoleId()); - -// CompanyDictDO companyDictDO = companyDictMapper.selectById(administerDO.getCompanyId()); -// administerPermissionVO.setCompanyName(companyDictDO.getCompanyName()); -// administerPermissionVO.setShortName(companyDictDO.getShortName()); /** * 所在公司 @@ -149,31 +145,31 @@ public class AdministerServiceImpl extends ServiceImpl() .lambda() - .eq(MemberDO::getTelephone, s.getTelephone())); + .eq(MemberDO::getTelephone, s.getTelephone()) + .eq(MemberDO::getMemberType, 2)); MemberDO memberIdCard = memberMapper.selectOne(new QueryWrapper() .lambda() - .eq(MemberDO::getIdCard, s.getIdCard())); + .eq(MemberDO::getIdCard, s.getIdCard()) + .eq(MemberDO::getMemberType, 2)); boolean departmentFlag = false; String[] fullName = s.getDepartments().split(","); @@ -316,6 +314,7 @@ public class AdministerServiceImpl extends ServiceImpl memberDOS = memberMapper.selectList(new QueryWrapper() diff --git a/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java index fab9dfa..02cafcc 100644 --- a/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java @@ -72,7 +72,6 @@ public class CompanyDictServiceImpl extends ServiceImpl records = companyMembersVOIPage.getRecords(); for (GetCompanyMembersVO gcmv : records) { - //历史带过的企业 List memberCompanyVOS = companyMemberMappingMapper.memberCompanys(gcmv.getId()); gcmv.setMemberCompanyVOS(memberCompanyVOS); diff --git a/src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java index 5db7770..072a81c 100644 --- a/src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.subsidy.common.exception.HttpException; import com.subsidy.dto.company.AttendMembersDTO; +import com.subsidy.dto.company.GetCompanyMembersDTO; import com.subsidy.dto.company.InviteMemberDTO; import com.subsidy.dto.member.CancerMemberDTO; import com.subsidy.dto.member.DepartMembersDTO; @@ -18,6 +19,8 @@ import com.subsidy.service.CompanyMemberMappingService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.subsidy.util.ConstantUtils; import com.subsidy.util.excel.ExcelUtil; +import com.subsidy.vo.company.GetCompanyMembersVO; +import com.subsidy.vo.company.MemberCompanyVO; import com.subsidy.vo.member.AttendMembersVO; import com.subsidy.vo.member.DepartMembersVO; import com.subsidy.vo.member.MemberAttendInfoVO; @@ -97,4 +100,5 @@ public class CompanyMemberMappingServiceImpl extends ServiceImpl imple } public List memberAttendInfo(CompanyMemberMappingDO companyMemberMappingDO) { - return companyMemberMappingMapper.memberAttendInfo(companyMemberMappingDO.getMemberId(),companyMemberMappingDO.getCompanyId()); + return companyMemberMappingMapper.memberAttendInfo(companyMemberMappingDO.getMemberId(), companyMemberMappingDO.getCompanyId()); } @@ -131,7 +131,8 @@ public class MemberServiceImpl extends ServiceImpl imple Integer count = this.baseMapper.selectCount(new QueryWrapper() .lambda() - .eq(MemberDO::getTelephone, addMemberDTO.getTelephone())); + .eq(MemberDO::getTelephone, addMemberDTO.getTelephone()) + .eq(MemberDO::getMemberType, 2)); if (count > 0) { throw new HttpException(20002); @@ -139,7 +140,8 @@ public class MemberServiceImpl extends ServiceImpl imple Integer count2 = this.baseMapper.selectCount(new QueryWrapper() .lambda() - .eq(MemberDO::getIdCard, addMemberDTO.getIdCard())); + .eq(MemberDO::getIdCard, addMemberDTO.getIdCard()) + .eq(MemberDO::getMemberType, 2)); if (count2 > 0) { throw new HttpException(20002); @@ -156,6 +158,7 @@ public class MemberServiceImpl extends ServiceImpl imple memberDO.setPassword("Ykhl123456"); memberDO.setStatus("启用"); memberDO.setFirstLogin(0); + memberDO.setMemberType(2); this.baseMapper.insert(memberDO); //公司赋值 CompanyMemberMappingDO companyMemberMappingDO = new CompanyMemberMappingDO(); @@ -210,7 +213,7 @@ public class MemberServiceImpl extends ServiceImpl imple Integer count1 = this.baseMapper.selectCount(new QueryWrapper() .lambda() - .eq(MemberDO::getAccountName, addMemberDTO.getAccountName()) + .eq(MemberDO::getIdCard, addMemberDTO.getIdCard()) .ne(MemberDO::getId, addMemberDTO.getId())); if (count1 > 0) { @@ -232,6 +235,7 @@ public class MemberServiceImpl extends ServiceImpl imple MemberDepartmentMappingDO memberDepartmentMappingDO = new MemberDepartmentMappingDO(); memberDepartmentMappingDO.setMemberId(memberDO.getId()); memberDepartmentMappingDO.setDepartmentId(lg); + memberDepartmentMappingDO.setMemberStatus(1); memberDepartmentMappingMapper.insert(memberDepartmentMappingDO); } } diff --git a/src/main/java/com/subsidy/service/impl/ProductDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/ProductDictServiceImpl.java index 846224d..08df370 100644 --- a/src/main/java/com/subsidy/service/impl/ProductDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ProductDictServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.subsidy.common.exception.HttpException; import com.subsidy.dto.product.AllProductsDTO; +import com.subsidy.dto.product.ChangeOrderDTO; import com.subsidy.model.ProductDictDO; import com.subsidy.mapper.ProductDictMapper; import com.subsidy.service.ProductDictService; @@ -12,6 +13,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.subsidy.util.ConstantUtils; import org.springframework.stereotype.Service; +import java.util.List; + /** *

* 产品管理字典表 服务实现类 @@ -26,7 +29,7 @@ public class ProductDictServiceImpl extends ServiceImpl allProducts(AllProductsDTO allProductsDTO) { Page pager = new Page(allProductsDTO.getPageNum(), allProductsDTO.getPageSize()); - return this.baseMapper.allProducts(pager, allProductsDTO.getGroundingStatus(),allProductsDTO.getProductName()); + return this.baseMapper.allProducts(pager, allProductsDTO.getGroundingStatus(),allProductsDTO.getProductName(),allProductsDTO.getProductType()); } public String addProduct(ProductDictDO productDictDO) { @@ -52,4 +55,17 @@ public class ProductDictServiceImpl extends ServiceImpl productDictDOS = changeOrderDTO.getProductDictDOS(); + + int i = 0; + for (ProductDictDO productDictDO : productDictDOS){ + this.baseMapper.updateOrderNo(productDictDO.getId(),i++); + } + + return ConstantUtils.SUCCESS_UPDATE; + } + + } diff --git a/src/main/java/com/subsidy/service/impl/ServiceAdministerMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/ServiceAdministerMappingServiceImpl.java index 275abe8..2b18f97 100644 --- a/src/main/java/com/subsidy/service/impl/ServiceAdministerMappingServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ServiceAdministerMappingServiceImpl.java @@ -38,9 +38,8 @@ public class ServiceAdministerMappingServiceImpl extends ServiceImpl implements ServiceCompanyFilesService { @Autowired - private ServiceCompanyMappingMapper serviceCompanyMappingMapper; + private ServiceFileTreeMapper serviceFileTreeMapper; public IPage companyFiles(CompanyFilesDTO companyFilesDTO) { Page pager = new Page(companyFilesDTO.getPageNum(), companyFilesDTO.getPageSize()); - return this.baseMapper.companyFiles(pager,companyFilesDTO.getFileType(),companyFilesDTO.getCompanyId(),companyFilesDTO.getServiceId(), companyFilesDTO.getFileName()); + + List treeIds = new ArrayList<>(); + treeIds.add(companyFilesDTO.getTreeId()); + + ServiceFileTreeDO serviceFileTreeDO = serviceFileTreeMapper.selectById(companyFilesDTO.getTreeId()); + + if (null == serviceFileTreeDO.getParentId()){ + //找出二级节点 + List serviceFileTreeDOS = serviceFileTreeMapper.selectList(new QueryWrapper() + .lambda() + .eq(ServiceFileTreeDO::getParentId,serviceFileTreeDO.getId())); + for (ServiceFileTreeDO serviceFileTreeDO1 : serviceFileTreeDOS){ + treeIds.add(serviceFileTreeDO1.getId()); + } + } + return this.baseMapper.companyFiles(pager,treeIds, companyFilesDTO.getFileName()); } public String deleteFile(ServiceCompanyFilesDO serviceCompanyFilesDO) { @@ -42,21 +60,9 @@ public class ServiceCompanyFilesServiceImpl extends ServiceImpl() - .lambda() - .eq(ServiceCompanyMappingDO::getCompanyId,uploadFileDTO.getCompanyId()) - .eq(ServiceCompanyMappingDO::getServiceId,uploadFileDTO.getServiceId())); - - BeanUtils.copyProperties(uploadFileDTO,serviceCompanyFilesDO); - serviceCompanyFilesDO.setServiceCompanyId(serviceCompanyMappingDO.getId()); - + public String uploadFile(ServiceCompanyFilesDO serviceCompanyFilesDO) { this.baseMapper.insert(serviceCompanyFilesDO); return ConstantUtils.ADD_SUCCESS; } - } diff --git a/src/main/java/com/subsidy/service/impl/ServiceFileTreeServiceImpl.java b/src/main/java/com/subsidy/service/impl/ServiceFileTreeServiceImpl.java new file mode 100644 index 0000000..d330cdf --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/ServiceFileTreeServiceImpl.java @@ -0,0 +1,126 @@ +package com.subsidy.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.subsidy.common.exception.HttpException; +import com.subsidy.model.ServiceFileTreeDO; +import com.subsidy.mapper.ServiceFileTreeMapper; +import com.subsidy.service.ServiceFileTreeService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.subsidy.util.ConstantUtils; +import com.subsidy.vo.tree.TreesVO; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 文件目录树 服务实现类 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +@Service +public class ServiceFileTreeServiceImpl extends ServiceImpl implements ServiceFileTreeService { + + + public List trees(ServiceFileTreeDO serviceFileTreeDO) { + + List result = new ArrayList<>(); + + List serviceFileTreeDOS = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ServiceFileTreeDO::getCompanyId, serviceFileTreeDO.getCompanyId()) + .eq(ServiceFileTreeDO::getServiceId, serviceFileTreeDO.getServiceId()) + .isNull(ServiceFileTreeDO::getParentId)); + + for (ServiceFileTreeDO sftd : serviceFileTreeDOS) { + TreesVO treesVO = new TreesVO(); + treesVO.setId(sftd.getId()); + treesVO.setTreeName(sftd.getTreeName()); + List serviceFileTreeDOList = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ServiceFileTreeDO::getParentId, sftd.getId())); + + List resultTmp = new ArrayList<>(); + for (ServiceFileTreeDO sftd2 : serviceFileTreeDOList) { + TreesVO treesVO1 = new TreesVO(); + treesVO1.setId(sftd2.getId()); + treesVO1.setTreeName(sftd2.getTreeName()); + treesVO1.setParentId(sftd.getId()); + resultTmp.add(treesVO1); + } + treesVO.setTreesVOS(resultTmp); + result.add(treesVO); + } + return result; + } + + public String addTree(ServiceFileTreeDO serviceFileTreeDO) { + + //查看当前节点下有没有重名的 + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ServiceFileTreeDO::getCompanyId, serviceFileTreeDO.getCompanyId()) + .eq(ServiceFileTreeDO::getParentId, serviceFileTreeDO.getParentId()) + .eq(ServiceFileTreeDO::getTreeName, serviceFileTreeDO.getTreeName()) + .eq(ServiceFileTreeDO::getServiceId, serviceFileTreeDO.getServiceId())); + + if (count > 0) { + throw new HttpException(40001); + } + + this.baseMapper.insert(serviceFileTreeDO); + return ConstantUtils.ADD_SUCCESS; + } + + public String updateTree(ServiceFileTreeDO serviceFileTreeDO) { + + ServiceFileTreeDO serviceFileTreeDO1 = this.baseMapper.selectById(serviceFileTreeDO.getId()); + //查看当前节点下有没有重名的 + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ServiceFileTreeDO::getCompanyId, serviceFileTreeDO1.getCompanyId()) + .eq(ServiceFileTreeDO::getParentId, serviceFileTreeDO1.getParentId()) + .eq(ServiceFileTreeDO::getTreeName, serviceFileTreeDO.getTreeName()) + .eq(ServiceFileTreeDO::getServiceId, serviceFileTreeDO1.getServiceId()) + .ne(ServiceFileTreeDO::getId, serviceFileTreeDO.getId())); + + if (count > 0) { + throw new HttpException(40001); + } + + this.baseMapper.updateById(serviceFileTreeDO); + return ConstantUtils.SUCCESS_UPDATE; + } + + public String deleteTree(ServiceFileTreeDO serviceFileTreeDO) { + + ServiceFileTreeDO serviceFileTreeDO1 = this.baseMapper.selectById(serviceFileTreeDO.getId()); + this.baseMapper.deleteById(serviceFileTreeDO.getId()); + + List deleteIds = new ArrayList<>(); + deleteIds.add(serviceFileTreeDO.getId()); + + //如果是一级目录的话,要删除对应的二级目录 + if (null == serviceFileTreeDO1.getParentId()) { + + //找出二级节点 + List serviceFileTreeDOS = this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ServiceFileTreeDO::getParentId, serviceFileTreeDO.getId())); + for (ServiceFileTreeDO sftd : serviceFileTreeDOS) { + deleteIds.add(sftd.getId()); + } + + // 删除该目录下及子目录下的文件 + this.baseMapper.delete(new QueryWrapper() + .lambda() + .in(ServiceFileTreeDO::getId, deleteIds)); + } + return ConstantUtils.DELETE_SUCCESS; + } + + +} diff --git a/src/main/java/com/subsidy/service/impl/ServiceMemberMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/ServiceMemberMappingServiceImpl.java new file mode 100644 index 0000000..8b4c0b9 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/ServiceMemberMappingServiceImpl.java @@ -0,0 +1,128 @@ +package com.subsidy.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.subsidy.dto.member.*; +import com.subsidy.mapper.CompanyMemberMappingMapper; +import com.subsidy.mapper.MemberMapper; +import com.subsidy.model.DepartmentDictDO; +import com.subsidy.model.MemberDO; +import com.subsidy.model.ServiceMemberMappingDO; +import com.subsidy.mapper.ServiceMemberMappingMapper; +import com.subsidy.service.ServiceMemberMappingService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.subsidy.util.ConstantUtils; +import com.subsidy.util.excel.ExcelUtil; +import com.subsidy.vo.member.ImportClassMembersVO; +import com.subsidy.vo.member.SelectMembersVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 服务映射表 服务实现类 + *

+ * + * @author Tuyp + * @since 2024-04-08 + */ +@Service +public class ServiceMemberMappingServiceImpl extends ServiceImpl implements ServiceMemberMappingService { + + @Autowired + private CompanyMemberMappingMapper companyMemberMappingMapper; + + @Autowired + private MemberMapper memberMapper; + + public String selectImport(SelectImportDTO selectImportDTO) { + List members = selectImportDTO.getMemberIds(); + for (Long memberId : members) { + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ServiceMemberMappingDO::getMemberId,memberId) + .eq(ServiceMemberMappingDO::getCompanyId,selectImportDTO.getCompanyId()) + .eq(ServiceMemberMappingDO::getServiceId,4L)); + + if (count == 0){ + ServiceMemberMappingDO serviceMemberMappingDO = new ServiceMemberMappingDO(); + serviceMemberMappingDO.setCompanyId(selectImportDTO.getCompanyId()); + serviceMemberMappingDO.setMemberId(memberId); + serviceMemberMappingDO.setServiceId(4L); + this.baseMapper.insert(serviceMemberMappingDO); + } + + } + return ConstantUtils.ADD_SUCCESS; + } + + public IPage selectMembers(SelectMembersDTO selectMembersDTO) { + Page pager = new Page(selectMembersDTO.getPageNum(), selectMembersDTO.getPageSize()); + IPage selectMembersVOIPage = this.baseMapper.selectMembers(pager, selectMembersDTO.getCompanyId(), selectMembersDTO.getServiceId()); + + List selectMembersVOS = selectMembersVOIPage.getRecords(); + + for (SelectMembersVO smv : selectMembersVOS){ + //获取这个人所在的部门 + List departmentDictDOS = memberMapper.getDepartments(smv.getId()); + smv.setDepartmentDictDOS(departmentDictDOS); + } + return selectMembersVOIPage; + + } + + public String removeMembers(RemoveMembersDTO removeMembersDTO) { + this.baseMapper.delete(new QueryWrapper() + .lambda() + .in(ServiceMemberMappingDO::getId,removeMembersDTO.getMemberMappingIds())); + return ConstantUtils.DELETE_SUCCESS; + } + + public ImportClassMembersVO importClassMembers(MultipartFile multipartFile, Long companyId) { + + ImportClassMembersVO importClassMembersVO = new ImportClassMembersVO(); + + List importClassMemberDTOS = ExcelUtil.readExcel(null, ImportClassMemberDTO.class, multipartFile); + + //查找企业下所有的学员的手机号 手机 姓名 身份证 + List companyMembers = companyMemberMappingMapper.companyMembers(companyId); + + List successMembers = new ArrayList(); + List failMembers = new ArrayList(); + + //查看该学员是否该企业下的人,不是的话就要返回 是的话直接导入成功 + for (ImportClassMemberDTO imd : importClassMemberDTOS) { + if (null == imd.getUserName() || null == imd.getTelephone() || null == imd.getIdCard()) { + imd.setReason("人员信息不完整"); + failMembers.add(imd); + } else if (!companyMembers.contains(imd.getUserName() + imd.getTelephone() + imd.getIdCard())) { + imd.setReason("企业内未查询到该成员信息"); + failMembers.add(imd); + } else if (successMembers.contains(imd.getUserName() + imd.getTelephone() + imd.getIdCard())) { + imd.setReason("人员信息重复"); + failMembers.add(imd); + } else { + MemberDO memberDO = memberMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MemberDO::getTelephone,imd.getTelephone())); + imd.setId(memberDO.getId()); + successMembers.add(imd); + } + } + importClassMembersVO.setSuccessMembers(successMembers); + importClassMembersVO.setFailureMembers(failMembers); + return importClassMembersVO; + } + + public void downloadFailClassMembers(DownloadFailClassMembers downloadFailClassMembers) { + List downloadFailClassMembersDTOS = downloadFailClassMembers.getDownloadFailClassMembersDTOS(); + ExcelUtil.writeExcel(downloadFailClassMembersDTOS, DownloadFailClassMembersDTO.class); + } + + +} diff --git a/src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java b/src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java new file mode 100644 index 0000000..3b5211e --- /dev/null +++ b/src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java @@ -0,0 +1,16 @@ +package com.subsidy.vo.member; + +import com.subsidy.dto.member.ImportClassMemberDTO; +import lombok.Data; + +import java.util.List; + +@Data +public class ImportClassMembersVO { + + private List successMembers; + + private List failureMembers; + + +} diff --git a/src/main/java/com/subsidy/vo/member/SelectMembersVO.java b/src/main/java/com/subsidy/vo/member/SelectMembersVO.java new file mode 100644 index 0000000..d4fe3b3 --- /dev/null +++ b/src/main/java/com/subsidy/vo/member/SelectMembersVO.java @@ -0,0 +1,37 @@ +package com.subsidy.vo.member; + +import com.subsidy.model.DepartmentDictDO; +import lombok.Data; + +import java.util.List; + +@Data +public class SelectMembersVO { + + private Long mappingId; + + private Long id; + + private String userName; + + private String telephone; + + private String idCard; + + private String status; + + private String accountName; + + private String gender; + + private String email; + + private String accountNameEn; + + private String workNo; + + private String inductionDate; + + private List departmentDictDOS; + +} diff --git a/src/main/java/com/subsidy/vo/tree/TreesVO.java b/src/main/java/com/subsidy/vo/tree/TreesVO.java new file mode 100644 index 0000000..157199c --- /dev/null +++ b/src/main/java/com/subsidy/vo/tree/TreesVO.java @@ -0,0 +1,18 @@ +package com.subsidy.vo.tree; + +import lombok.Data; + +import java.util.List; + +@Data +public class TreesVO { + + private Long id; + + private Long parentId; + + private String treeName; + + private List treesVOS; + +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index ae4bf01..f1f484c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +1,4 @@ -# 环境配置 +# 环境配置 企业端 spring.profiles.active=prod #和CPU数 spring.server.acceptorThreadCount=600 diff --git a/src/main/resources/mapper/CompanyDictMapper.xml b/src/main/resources/mapper/CompanyDictMapper.xml index cee568f..4356bf7 100644 --- a/src/main/resources/mapper/CompanyDictMapper.xml +++ b/src/main/resources/mapper/CompanyDictMapper.xml @@ -31,6 +31,7 @@ and t2.supervise_name =#{superviseName} + order by t2.id @@ -38,6 +39,7 @@ SELECT distinct t2.id as companyId, + IFNULL(t5.user_name,t2.company_name) as user_name, t2.banner, t2.short_name, t2.company_name, @@ -50,10 +52,12 @@ company_dict t2 left join administer_company_mapping t4 on t2.id = t4.company_id left join company_field_mapping t3 on t2.id = t3.company_id + LEFT JOIN administer t5 on t5.id = t4.administer_id WHERE - t2.delete_date is null + t2.delete_date is null and t3.delete_date is null and t4.delete_date is null + and t5.delete_date is null and t2.company_name like concat('%',#{companyName} ,'%') @@ -66,6 +70,7 @@ and t4.administer_id =#{userId} + order by t2.id @@ -102,6 +107,18 @@ and t5.member_status = #{memberStatus} + and t.member_type = 2 + and t.id not in (SELECT + t.member_id + FROM + service_member_mapping t + WHERE + t.delete_date IS NULL + AND t.service_id = 4 + + AND t.company_id =#{companyId} + + ) diff --git a/src/main/resources/mapper/CompanyMemberMappingMapper.xml b/src/main/resources/mapper/CompanyMemberMappingMapper.xml index e9ac384..214409c 100644 --- a/src/main/resources/mapper/CompanyMemberMappingMapper.xml +++ b/src/main/resources/mapper/CompanyMemberMappingMapper.xml @@ -110,4 +110,17 @@ AND t.member_status = 1 + + diff --git a/src/main/resources/mapper/ProductDictMapper.xml b/src/main/resources/mapper/ProductDictMapper.xml index 8434b70..3152ac1 100644 --- a/src/main/resources/mapper/ProductDictMapper.xml +++ b/src/main/resources/mapper/ProductDictMapper.xml @@ -15,6 +15,13 @@ AND t.product_name like concat('%',#{productName} ,'%') + + AND t.product_type = #{productType} + + + update product_dict set order_no = #{orderNo} where id = #{id} + + diff --git a/src/main/resources/mapper/ServiceCompanyFilesMapper.xml b/src/main/resources/mapper/ServiceCompanyFilesMapper.xml index a4d4be6..7c0b11e 100644 --- a/src/main/resources/mapper/ServiceCompanyFilesMapper.xml +++ b/src/main/resources/mapper/ServiceCompanyFilesMapper.xml @@ -7,20 +7,15 @@ * FROM service_company_files t - left join service_company_mapping t2 on t2.id = t.service_company_id WHERE t.delete_date IS NULL - and t2.delete_date is null - - AND t2.company_id = #{companyId} - - - and t2.service_id = #{serviceId} - AND t.file_name like concat('%',#{fileName} ,'%') - and t.file_type = #{fileType} + and t.tree_id in + + #{id} + diff --git a/src/main/resources/mapper/ServiceCompanyMappingMapper.xml b/src/main/resources/mapper/ServiceCompanyMappingMapper.xml index a350cab..82144c9 100644 --- a/src/main/resources/mapper/ServiceCompanyMappingMapper.xml +++ b/src/main/resources/mapper/ServiceCompanyMappingMapper.xml @@ -58,18 +58,26 @@ diff --git a/src/main/resources/mapper/ServiceFileTreeMapper.xml b/src/main/resources/mapper/ServiceFileTreeMapper.xml new file mode 100644 index 0000000..8ff6b7f --- /dev/null +++ b/src/main/resources/mapper/ServiceFileTreeMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, company_id, service_id, parent_id, tree_name + + + diff --git a/src/main/resources/mapper/ServiceMemberMappingMapper.xml b/src/main/resources/mapper/ServiceMemberMappingMapper.xml new file mode 100644 index 0000000..318d142 --- /dev/null +++ b/src/main/resources/mapper/ServiceMemberMappingMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + diff --git a/target/classes/application.properties b/target/classes/application.properties index ae4bf01..f1f484c 100644 --- a/target/classes/application.properties +++ b/target/classes/application.properties @@ -1,4 +1,4 @@ -# 环境配置 +# 环境配置 企业端 spring.profiles.active=prod #和CPU数 spring.server.acceptorThreadCount=600 diff --git a/target/classes/com/subsidy/controller/CompanyMemberMappingController.class b/target/classes/com/subsidy/controller/CompanyMemberMappingController.class index 25ea54c..f8cfb14 100644 Binary files a/target/classes/com/subsidy/controller/CompanyMemberMappingController.class and b/target/classes/com/subsidy/controller/CompanyMemberMappingController.class differ diff --git a/target/classes/com/subsidy/controller/MemberController.class b/target/classes/com/subsidy/controller/MemberController.class index 82ef604..d961f0a 100644 Binary files a/target/classes/com/subsidy/controller/MemberController.class and b/target/classes/com/subsidy/controller/MemberController.class differ diff --git a/target/classes/com/subsidy/controller/ProductDictController.class b/target/classes/com/subsidy/controller/ProductDictController.class index 7d6bf78..f320bd1 100644 Binary files a/target/classes/com/subsidy/controller/ProductDictController.class and b/target/classes/com/subsidy/controller/ProductDictController.class differ diff --git a/target/classes/com/subsidy/controller/ServiceCompanyFilesController.class b/target/classes/com/subsidy/controller/ServiceCompanyFilesController.class index e1d55d4..63d5318 100644 Binary files a/target/classes/com/subsidy/controller/ServiceCompanyFilesController.class and b/target/classes/com/subsidy/controller/ServiceCompanyFilesController.class differ diff --git a/target/classes/com/subsidy/dto/product/AllProductsDTO.class b/target/classes/com/subsidy/dto/product/AllProductsDTO.class index 495165e..0a684ea 100644 Binary files a/target/classes/com/subsidy/dto/product/AllProductsDTO.class and b/target/classes/com/subsidy/dto/product/AllProductsDTO.class differ diff --git a/target/classes/com/subsidy/mapper/CompanyMemberMappingMapper.class b/target/classes/com/subsidy/mapper/CompanyMemberMappingMapper.class index 1b10d1c..badec98 100644 Binary files a/target/classes/com/subsidy/mapper/CompanyMemberMappingMapper.class and b/target/classes/com/subsidy/mapper/CompanyMemberMappingMapper.class differ diff --git a/target/classes/com/subsidy/mapper/ProductDictMapper.class b/target/classes/com/subsidy/mapper/ProductDictMapper.class index c337f5c..133ce24 100644 Binary files a/target/classes/com/subsidy/mapper/ProductDictMapper.class and b/target/classes/com/subsidy/mapper/ProductDictMapper.class differ diff --git a/target/classes/com/subsidy/mapper/ServiceCompanyFilesMapper.class b/target/classes/com/subsidy/mapper/ServiceCompanyFilesMapper.class index aaf2ae9..5810345 100644 Binary files a/target/classes/com/subsidy/mapper/ServiceCompanyFilesMapper.class and b/target/classes/com/subsidy/mapper/ServiceCompanyFilesMapper.class differ diff --git a/target/classes/com/subsidy/model/MemberDO.class b/target/classes/com/subsidy/model/MemberDO.class index 7bfb1a8..10ff631 100644 Binary files a/target/classes/com/subsidy/model/MemberDO.class and b/target/classes/com/subsidy/model/MemberDO.class differ diff --git a/target/classes/com/subsidy/model/ProductDictDO.class b/target/classes/com/subsidy/model/ProductDictDO.class index 9006131..34cd5d5 100644 Binary files a/target/classes/com/subsidy/model/ProductDictDO.class and b/target/classes/com/subsidy/model/ProductDictDO.class differ diff --git a/target/classes/com/subsidy/model/ServiceCompanyFilesDO.class b/target/classes/com/subsidy/model/ServiceCompanyFilesDO.class index 1964436..99bc2b3 100644 Binary files a/target/classes/com/subsidy/model/ServiceCompanyFilesDO.class and b/target/classes/com/subsidy/model/ServiceCompanyFilesDO.class differ diff --git a/target/classes/com/subsidy/service/ProductDictService.class b/target/classes/com/subsidy/service/ProductDictService.class index a50a149..b63ef26 100644 Binary files a/target/classes/com/subsidy/service/ProductDictService.class and b/target/classes/com/subsidy/service/ProductDictService.class differ diff --git a/target/classes/com/subsidy/service/ServiceCompanyFilesService.class b/target/classes/com/subsidy/service/ServiceCompanyFilesService.class index 16d9553..f173380 100644 Binary files a/target/classes/com/subsidy/service/ServiceCompanyFilesService.class and b/target/classes/com/subsidy/service/ServiceCompanyFilesService.class differ diff --git a/target/classes/com/subsidy/service/impl/AdministerServiceImpl.class b/target/classes/com/subsidy/service/impl/AdministerServiceImpl.class index 99827d4..2dc14b0 100644 Binary files a/target/classes/com/subsidy/service/impl/AdministerServiceImpl.class and b/target/classes/com/subsidy/service/impl/AdministerServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/CompanyDictServiceImpl.class b/target/classes/com/subsidy/service/impl/CompanyDictServiceImpl.class index 918f245..6330a9c 100644 Binary files a/target/classes/com/subsidy/service/impl/CompanyDictServiceImpl.class and b/target/classes/com/subsidy/service/impl/CompanyDictServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.class b/target/classes/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.class index b815d85..2abf60c 100644 Binary files a/target/classes/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.class and b/target/classes/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/MemberServiceImpl.class b/target/classes/com/subsidy/service/impl/MemberServiceImpl.class index c045263..359bed7 100644 Binary files a/target/classes/com/subsidy/service/impl/MemberServiceImpl.class and b/target/classes/com/subsidy/service/impl/MemberServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/ProductDictServiceImpl.class b/target/classes/com/subsidy/service/impl/ProductDictServiceImpl.class index 1c8fb90..5161807 100644 Binary files a/target/classes/com/subsidy/service/impl/ProductDictServiceImpl.class and b/target/classes/com/subsidy/service/impl/ProductDictServiceImpl.class differ diff --git a/target/classes/com/subsidy/service/impl/ServiceCompanyFilesServiceImpl.class b/target/classes/com/subsidy/service/impl/ServiceCompanyFilesServiceImpl.class index cad6487..4ec5ff7 100644 Binary files a/target/classes/com/subsidy/service/impl/ServiceCompanyFilesServiceImpl.class and b/target/classes/com/subsidy/service/impl/ServiceCompanyFilesServiceImpl.class differ diff --git a/target/classes/mapper/CompanyDictMapper.xml b/target/classes/mapper/CompanyDictMapper.xml index cee568f..4356bf7 100644 --- a/target/classes/mapper/CompanyDictMapper.xml +++ b/target/classes/mapper/CompanyDictMapper.xml @@ -31,6 +31,7 @@ and t2.supervise_name =#{superviseName} + order by t2.id @@ -38,6 +39,7 @@ SELECT distinct t2.id as companyId, + IFNULL(t5.user_name,t2.company_name) as user_name, t2.banner, t2.short_name, t2.company_name, @@ -50,10 +52,12 @@ company_dict t2 left join administer_company_mapping t4 on t2.id = t4.company_id left join company_field_mapping t3 on t2.id = t3.company_id + LEFT JOIN administer t5 on t5.id = t4.administer_id WHERE - t2.delete_date is null + t2.delete_date is null and t3.delete_date is null and t4.delete_date is null + and t5.delete_date is null and t2.company_name like concat('%',#{companyName} ,'%') @@ -66,6 +70,7 @@ and t4.administer_id =#{userId} + order by t2.id @@ -102,6 +107,18 @@ and t5.member_status = #{memberStatus} + and t.member_type = 2 + and t.id not in (SELECT + t.member_id + FROM + service_member_mapping t + WHERE + t.delete_date IS NULL + AND t.service_id = 4 + + AND t.company_id =#{companyId} + + ) diff --git a/target/classes/mapper/CompanyMemberMappingMapper.xml b/target/classes/mapper/CompanyMemberMappingMapper.xml index e9ac384..214409c 100644 --- a/target/classes/mapper/CompanyMemberMappingMapper.xml +++ b/target/classes/mapper/CompanyMemberMappingMapper.xml @@ -110,4 +110,17 @@ AND t.member_status = 1 + + diff --git a/target/classes/mapper/ProductDictMapper.xml b/target/classes/mapper/ProductDictMapper.xml index 8434b70..3152ac1 100644 --- a/target/classes/mapper/ProductDictMapper.xml +++ b/target/classes/mapper/ProductDictMapper.xml @@ -15,6 +15,13 @@ AND t.product_name like concat('%',#{productName} ,'%') + + AND t.product_type = #{productType} + + + update product_dict set order_no = #{orderNo} where id = #{id} + + diff --git a/target/classes/mapper/ServiceCompanyFilesMapper.xml b/target/classes/mapper/ServiceCompanyFilesMapper.xml index a4d4be6..7c0b11e 100644 --- a/target/classes/mapper/ServiceCompanyFilesMapper.xml +++ b/target/classes/mapper/ServiceCompanyFilesMapper.xml @@ -7,20 +7,15 @@ * FROM service_company_files t - left join service_company_mapping t2 on t2.id = t.service_company_id WHERE t.delete_date IS NULL - and t2.delete_date is null - - AND t2.company_id = #{companyId} - - - and t2.service_id = #{serviceId} - AND t.file_name like concat('%',#{fileName} ,'%') - and t.file_type = #{fileType} + and t.tree_id in + + #{id} + diff --git a/target/classes/mapper/ServiceCompanyMappingMapper.xml b/target/classes/mapper/ServiceCompanyMappingMapper.xml index a350cab..82144c9 100644 --- a/target/classes/mapper/ServiceCompanyMappingMapper.xml +++ b/target/classes/mapper/ServiceCompanyMappingMapper.xml @@ -58,18 +58,26 @@ diff --git a/target/subsidy-app.jar b/target/subsidy-app.jar index ceac9a5..c6c91d5 100644 Binary files a/target/subsidy-app.jar and b/target/subsidy-app.jar differ diff --git a/target/subsidy-app.jar.original b/target/subsidy-app.jar.original index a9d4452..b1751eb 100644 Binary files a/target/subsidy-app.jar.original and b/target/subsidy-app.jar.original differ