Commit 6e9f568f by 涂亚平

2024.1 多客户端上线,过年备份

1 parent f9929fde
Showing with 1903 additions and 176 deletions
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.service.AdministerCompanyMappingService;
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;
/**
* <p>
* 管理员-公司映射表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@RestController
@Api(tags = "管理员-公司映射表")
@RequestMapping("/administerCompanyMapping")
public class AdministerCompanyMappingController {
}
......@@ -4,7 +4,9 @@ package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.administer.*;
import com.subsidy.dto.member.QingxuetangLoginDTO;
import com.subsidy.model.*;
import com.subsidy.service.AdministerService;
import com.subsidy.vo.member.DownloadFailMembersDTO;
......@@ -15,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
......@@ -33,18 +36,19 @@ public class AdministerController {
@Autowired
private AdministerService administerService;
// @GetMapping("getIp")
// public String getIp()throws Exception{
// InetAddress addr = InetAddress.getLocalHost();
// return addr.getHostAddress();
// }
@PostMapping("/login")
@ApiOperation("登录接口 accountName password")
@ApiOperation("登录接口(非中心端登录入口) accountName password")
public ResponseVO login(@RequestBody AdministerDO administerDO) {
return ResponseData.generateCreatedResponse(0, administerService.login(administerDO));
}
@PostMapping("appLogin")
@ApiOperation("应用端 手机号accountName timestamp sign")
@TimeRequired
public ResponseVO kunchiLogin(@RequestBody AppLoginDTO appLoginDTO, HttpServletRequest request){
return ResponseData.generateCreatedResponse(0,administerService.appLogin(appLoginDTO,request));
}
@PostMapping("/getPermissions")
@ApiOperation("权限查询")
@LoginRequired
......@@ -53,31 +57,31 @@ public class AdministerController {
}
@PostMapping("/administers")
@ApiOperation("查询所有运营者 { userName pageNum pageSize }")
@ApiOperation("客户账户管理 { userName companyName pageNum pageSize }")
// @LoginRequired
public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO) {
return ResponseData.generateCreatedResponse(0, administerService.operators(operatorsDTO));
}
@PostMapping("addAdminister")
@ApiOperation("添加运营者 id userName 名称 accountName 账号 ")
@ApiOperation("添加客户账户 userName 名称 accountName 账户 password 密码 telephone 联系方式 role:0:应用 1:客户 2:中心 3:企业唯一账号 remark 备注 companyIds[] serviceIds[]")
@LoginRequired
public ResponseVO addAdminister(@RequestBody AdministerDO administerDO) {
return ResponseData.generateCreatedResponse(0, administerService.addAdminister(administerDO));
public ResponseVO addAdminister(@RequestBody AddAdministerDTO addAdministerDTO) {
return ResponseData.generateCreatedResponse(0, administerService.addAdminister(addAdministerDTO));
}
@PostMapping("deleteAdminister")
@ApiOperation("添加运营者 id ")
@ApiOperation("客户账户管理 删除 id ")
@LoginRequired
public ResponseVO deleteAdminister(@RequestBody AdministerDO administerDO) {
return ResponseData.generateCreatedResponse(0, administerService.deleteAdminister(administerDO));
}
@PostMapping("updateAdminister")
@ApiOperation("编辑运营者 id userName 名称 accountName 账号 password")
@ApiOperation("编辑客户账户 id userName 名称 accountName 账号 password remark telephone companyIds[] serviceIds[]")
@LoginRequired
public ResponseVO updateAdminister(@RequestBody AdministerDO administerDO) {
return ResponseData.generateCreatedResponse(0, administerService.updateAdminister(administerDO));
public ResponseVO updateAdminister(@RequestBody AddAdministerDTO addAdministerDTO) {
return ResponseData.generateCreatedResponse(0, administerService.updateAdminister(addAdministerDTO));
}
@PostMapping("classSummary")
......
......@@ -3,7 +3,9 @@ package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.company.AttendMembersDTO;
import com.subsidy.dto.member.CancerMemberDTO;
import com.subsidy.dto.member.DepartMembersDTO;
import com.subsidy.dto.member.InviteMemberDTO;
import com.subsidy.mapper.CompanyMemberMappingMapper;
import com.subsidy.model.CompanyMemberMappingDO;
......@@ -35,7 +37,7 @@ public class CompanyMemberMappingController {
private CompanyMemberMappingService companyMemberMappingService;
@PostMapping("noCompanyMembers")
@ApiOperation(" userName idCard")
@ApiOperation("没有公司的人 userName idCard")
public ResponseVO noCompanyMembers(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,companyMemberMappingService.noCompanyMembers(memberDO));
}
......@@ -52,4 +54,29 @@ public class CompanyMemberMappingController {
return ResponseData.generateCreatedResponse(0,companyMemberMappingService.cancerMember(cancerMemberDTO));
}
@PostMapping("departMembers")
@ApiOperation("某公司的离职记录 pageSize pageNum companyId userName 姓名/手机号/身份证号")
public ResponseVO departMembers(@RequestBody DepartMembersDTO departMembersDTO){
return ResponseData.generateCreatedResponse(0,companyMemberMappingService.departMembers(departMembersDTO));
}
@PostMapping("exportDepartMembers")
@ApiOperation("导出离职人员记录 companyId userName 姓名/手机号/身份证号 ")
public void exportDepartMembers(@RequestBody DepartMembersDTO departMembersDTO){
companyMemberMappingService.exportDepartMembers(departMembersDTO);
}
@PostMapping("attendMembers")
@ApiOperation("查看某个企业已经参加过该培训的学生 companyId departmentId userName pageSize pageNum")
public ResponseVO attendMembers(@RequestBody AttendMembersDTO attendMembersDTO){
return ResponseData.generateCreatedResponse(0,companyMemberMappingService.attendMembers(attendMembersDTO));
}
@PostMapping("memberAttendInfo")
@ApiOperation("某个学员在该企业参加培训的详情 memberId 学员id companyId 公司id")
public ResponseVO memberAttendInfo(@RequestBody CompanyMemberMappingDO companyMemberMappingDO){
return ResponseData.generateCreatedResponse(0,companyMemberMappingService.memberAttendInfo(companyMemberMappingDO));
}
}
......@@ -44,6 +44,14 @@ public class MemberController {
return ResponseData.generateCreatedResponse(0,memberService.getAll(getAllDTO));
}
@PostMapping("exportAllMembers")
@ApiOperation("导出企业成员 departmentId userName status ")
public void exportAllMembers(@RequestBody GetAllDTO getAllDTO){
memberService.exportAllMembers(getAllDTO);
}
@PostMapping("deleteMember")
@ApiOperation("删除成员 id ")
@LoginRequired
......
......@@ -47,41 +47,6 @@ public class OssController {
return ResponseData.generateCreatedResponse(0, getSecretVO);
}
// @PostMapping("uploadFile")
// @ApiOperation("上传文件 file")
// public ResponseVO uploadFile(@RequestParam("file") MultipartFile file) {
// // 创建OSSClient实例。
// OSS ossClient = new OSSClientBuilder().build("http://oss-cn-shanghai.aliyuncs.com", keyId, secret);
// UploadFileVO uploadFileVO = new UploadFileVO();
// try {
//
// if (env.equals("test")) {
// env = "ykhl-bigger-test";
// }
// if (env.equals("prod")) {
// env = "ykhl-bigger";
// }
//
//
// // 创建PutObjectRequest对象。
// PutObjectRequest putObjectRequest = new PutObjectRequest(env, System.currentTimeMillis() + "_" + file.getOriginalFilename(), file.getInputStream());
// // 设置该属性可以返回response。如果不设置,则返回的response为空。
// putObjectRequest.setProcess("true");
// // 创建PutObject请求。
// PutObjectResult result = ossClient.putObject(putObjectRequest);
// // 如果上传成功,则返回200。
//// System.out.println(result.getResponse().getUri());
// uploadFileVO.setUrl(result.getResponse().getUri());
// } catch (Exception oe) {
// oe.printStackTrace();
// } finally {
// if (ossClient != null) {
// ossClient.shutdown();
// }
// }
// return ResponseData.generateCreatedResponse(0, uploadFileVO);
// }
@PostMapping("uploadFile")
@ApiOperation("分片上传")
public ResponseVO fenpian(@RequestParam("file") MultipartFile file) {
......
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.product.AllProductsDTO;
import com.subsidy.model.ProductDictDO;
import com.subsidy.service.ProductDictService;
import io.swagger.annotations.Api;
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;
/**
* <p>
* 产品管理字典表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
@RestController
@Api(tags = "产品管理字典表")
@RequestMapping("/productDict")
public class ProductDictController {
@Autowired
private ProductDictService productDictService;
@PostMapping("allProducts")
@ApiOperation("查看所有产品 productName pageSize pageNum")
public ResponseVO allProducts(@RequestBody AllProductsDTO allProductsDTO){
return ResponseData.generateCreatedResponse(0,productDictService.allProducts(allProductsDTO));
}
@PostMapping("addProduct")
@ApiOperation("添加产品 productName productLogo productDesc contactInfo groundingStatus highlightTag ")
public ResponseVO addProduct(@RequestBody ProductDictDO productDictDO){
return ResponseData.generateCreatedResponse(0,productDictService.addProduct(productDictDO));
}
@PostMapping("deleteProduct")
@ApiOperation("删除产品 id")
public ResponseVO deleteProduct(@RequestBody ProductDictDO productDictDO){
return ResponseData.generateCreatedResponse(0,productDictService.deleteProduct(productDictDO));
}
@PostMapping("updateProduct")
@ApiOperation("编辑产品 id productName productLogo productDesc contactInfo groundingStatus highlightTag ")
public ResponseVO updateProduct(@RequestBody ProductDictDO productDictDO){
return ResponseData.generateCreatedResponse(0,productDictService.updateProduct(productDictDO));
}
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.ServiceAdministerMappingDO;
import com.subsidy.service.ServiceAdministerMappingService;
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;
/**
* <p>
* 应用账户-服务映射表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
@RestController
@Api(tags = "应用账户-服务映射表")
@RequestMapping("/serviceAdministerMapping")
public class ServiceAdministerMappingController {
@Autowired
private ServiceAdministerMappingService serviceAdministerMappingService;
@PostMapping("administerServices")
@ApiOperation("查看某个人所有的服务 administerId 账户id")
public ResponseVO administerServices(@RequestBody ServiceAdministerMappingDO serviceAdministerMappingDO){
return ResponseData.generateCreatedResponse(0,serviceAdministerMappingService.administerServices(serviceAdministerMappingDO));
}
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.model.ServiceCompanyFilesDO;
import com.subsidy.service.ServiceCompanyFilesService;
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;
/**
* <p>
* 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@RestController
@Api(tags = "协议管理材料表")
@RequestMapping("/serviceCompanyFiles")
public class ServiceCompanyFilesController {
@Autowired
private ServiceCompanyFilesService serviceCompanyFilesService;
@PostMapping("companyFiles")
@ApiOperation("查看业务合同/业务材料 serviceCompanyId fileType 0:业务合同 1:业务材料 ")
public ResponseVO companyFiles(@RequestBody ServiceCompanyFilesDO serviceCompanyFilesDO){
return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.companyFiles(serviceCompanyFilesDO));
}
@PostMapping("deleteFile")
@ApiOperation("删除协议/材料 id companyFiles返回的id")
public ResponseVO deleteFile(@RequestBody ServiceCompanyFilesDO serviceCompanyFilesDO){
return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.deleteFile(serviceCompanyFilesDO));
}
@PostMapping("uploadFile")
@ApiOperation("上传新文件 serviceCompanyId fileType 0:业务合同 1:业务材料 fileName fileAddress ")
public ResponseVO uploadFile(@RequestBody ServiceCompanyFilesDO serviceCompanyFilesDO){
return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.uploadFile(serviceCompanyFilesDO));
}
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.service.CancelAuthDTO;
import com.subsidy.dto.service.GetServiceCompaniesDTO;
import com.subsidy.service.ServiceCompanyMappingService;
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;
/**
* <p>
* 业务公司 映射表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@RestController
@Api(tags = "业务公司 映射表")
@RequestMapping("/serviceCompanyMapping")
public class ServiceCompanyMappingController {
@Autowired
private ServiceCompanyMappingService serviceCompanyMappingService;
@PostMapping("getServiceCompanies")
@ApiOperation("获取某个业务下的公司(筛选可查全部的) serviceId 业务id pageSize authStatus pageNum companyName")
public ResponseVO getServiceCompanies(@RequestBody GetServiceCompaniesDTO getServiceCompaniesDTO){
return ResponseData.generateCreatedResponse(0,serviceCompanyMappingService.getServiceCompanies(getServiceCompaniesDTO));
}
@PostMapping("cancelAuth")
@ApiOperation("取消授权 serviceId companyIds[]")
public ResponseVO cancelAuth(@RequestBody CancelAuthDTO cancelAuthDTO){
return ResponseData.generateCreatedResponse(0,serviceCompanyMappingService.cancelAuth(cancelAuthDTO));
}
@PostMapping("addAuth")
@ApiOperation("添加授权 serviceId companyIds[]")
public ResponseVO addAuth(@RequestBody CancelAuthDTO cancelAuthDTO){
return ResponseData.generateCreatedResponse(0,serviceCompanyMappingService.addAuth(cancelAuthDTO));
}
@PostMapping("serviceCompanies")
@ApiOperation("获取某个业务管理下的所有公司 companyName serviceId")
public ResponseVO serviceCompanies(@RequestBody GetServiceCompaniesDTO getServiceCompaniesDTO){
return ResponseData.generateCreatedResponse(0,serviceCompanyMappingService.serviceCompanies(getServiceCompaniesDTO));
}
}
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.service.ServiceDictService;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import javax.servlet.http.HttpServletRequest;
/**
* <p>
* 业务管理字典表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@RestController
@Api(tags = "业务管理字典表")
@RequestMapping("/serviceDict")
public class ServiceDictController {
@Autowired
private ServiceDictService serviceDictService;
@PostMapping("getAllServices")
@ApiOperation("获取所有的服务")
public ResponseVO getAllServices(){
return ResponseData.generateCreatedResponse(0,serviceDictService.getAllServices());
}
}
package com.subsidy.dto.administer;
import lombok.Data;
import java.util.List;
@Data
public class AddAdministerDTO {
private Long id;
/**
* 账号
*/
private String accountName;
/**
* 手机号/企业账号
*/
private String telephone;
/**
* 密码
*/
private String password;
/**
* 成员名称
*/
private String userName;
/**
* 备注
*/
private String remark;
/**
* 角色
*/
private Integer role;
/**
* 企业
*/
private List<Long> companyIds;
/**
* 服务
*/
private List<Long> serviceIds;
}
package com.subsidy.dto.administer;
import lombok.Data;
@Data
public class AppLoginDTO {
private String appId;
private String authCorpId;
private String authCorpName;
private String openId;
private String accountName;
private Long id;
private String mobile;
private String nickname;
private Long timestamp;
private String sign;
}
......@@ -21,4 +21,7 @@ public class OperatorsDTO {
private String superviseName;
private Long userId;
}
package com.subsidy.dto.company;
import lombok.Data;
@Data
public class AttendMembersDTO {
private Long companyId;
private Long departmentId;
private String userName;
private Integer pageSize;
private Integer pageNum;
}
package com.subsidy.dto.member;
import lombok.Data;
@Data
public class DepartMembersDTO {
private Integer pageSize;
private Integer pageNum;
private String userName;
private Long companyId;
}
package com.subsidy.dto.product;
import lombok.Data;
@Data
public class AllProductsDTO {
private Integer pageSize;
private Integer pageNum;
private String productName;
}
package com.subsidy.dto.service;
import lombok.Data;
import java.util.List;
@Data
public class CancelAuthDTO {
private List<Long> companyIds;
private Long serviceId;
}
package com.subsidy.dto.service;
import lombok.Data;
@Data
public class GetServiceCompaniesDTO {
private Integer pageSize;
private Integer pageNum;
private String companyName;
private String authStatus;
private Long serviceId;
}
package com.subsidy.mapper;
import com.subsidy.model.AdministerCompanyMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 管理员-公司映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Repository
public interface AdministerCompanyMappingMapper extends BaseMapper<AdministerCompanyMappingDO> {
}
......@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.administer.SelfExportVO;
import com.subsidy.model.AdministerDO;
import com.subsidy.model.ClassDictDO;
import com.subsidy.model.CompanyDictDO;
import com.subsidy.vo.administer.*;
import com.subsidy.vo.classdict.ClassDetailVO;
import com.subsidy.vo.company.GetAllCompanyVO;
import com.subsidy.vo.member.ClassSignVO;
import com.subsidy.vo.sign.AnswerRecordVO;
import org.springframework.stereotype.Repository;
......@@ -59,11 +61,25 @@ public interface AdministerMapper extends BaseMapper<AdministerDO> {
/**
* 管理员账号管理
*/
IPage<OperatorsVO> operators(IPage page, String userName);
IPage<AdministerVO> operators(IPage page, String userName,String companyName);
/**
* 自助导出
*/
List<SelfExportVO> selfExport(ClassDictDO classDictDO);
/**
* 查看某客户账号管理哪些公司
*/
List<GetAllCompanyVO> administerCompanys(Long administerId);
/**
* 查看某客户账号管理哪些公司 返回id
*/
List<Long> administerCompanyIds(Long administerId);
/**
* 查看某客户有哪些服务 返回id
*/
List<Long> administerServiceIds(Long administerId);
}
......@@ -22,12 +22,18 @@ import java.util.List;
@Repository
public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> {
/**
* 查询全部企业
*/
IPage<OperatorsVO> allOperators(IPage page,String companyName, Long fieldId, String superviseName);
/**
* 企业管理--查找所有主账号 、运营者
*
* @return
*/
IPage<OperatorsVO> operators(IPage page, String companyName, Long fieldId, Long id, Integer role, String superviseName);
IPage<OperatorsVO> operators(IPage page, Long userId,String companyName, Long fieldId, String superviseName);
/**
* 查找所有的公司名称
......
package com.subsidy.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.model.CompanyDictDO;
import com.subsidy.model.CompanyMemberMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.model.MemberDO;
import com.subsidy.vo.member.AttendMembersVO;
import com.subsidy.vo.member.DepartMembersVO;
import com.subsidy.vo.member.MemberAttendInfoVO;
import com.subsidy.vo.member.MemberCompanyVO;
import org.springframework.stereotype.Repository;
import java.util.List;
......@@ -43,4 +48,25 @@ public interface CompanyMemberMappingMapper extends BaseMapper<CompanyMemberMapp
* 查看某个公司accountName的人
*/
List<MemberDO> companyAccountMembers(Long companyId,String accountName);
/**
* 查询某个人带过公司的记录
*/
List<MemberCompanyVO> memberCompanys(Long memberId);
/**
* 查看某个公司的离职记录
*/
IPage<DepartMembersVO> departMembers(IPage iPage,Long companyId,String userName);
/**
* 某公司参加过培训的学生名单
*/
IPage<AttendMembersVO> attendMembers(IPage iPage, Long companyId, Long departmentId, String userName);
/**
* 某个学员参加过某个公司的所有培训
*/
List<MemberAttendInfoVO> memberAttendInfo(Long memberId, Long companyId);
}
package com.subsidy.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.product.AllProductsDTO;
import com.subsidy.model.ProductDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 产品管理字典表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
@Repository
public interface ProductDictMapper extends BaseMapper<ProductDictDO> {
IPage<ProductDictDO> allProducts(IPage iPage,String productName);
}
package com.subsidy.mapper;
import com.subsidy.model.ServiceAdministerMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.model.ServiceDictDO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 应用账户-服务映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
@Repository
public interface ServiceAdministerMappingMapper extends BaseMapper<ServiceAdministerMappingDO> {
/**
* 查看某个账户能管理的应用
*/
List<ServiceDictDO> administerService(Long administerId);
}
package com.subsidy.mapper;
import com.subsidy.model.ServiceCompanyFilesDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Repository
public interface ServiceCompanyFilesMapper extends BaseMapper<ServiceCompanyFilesDO> {
List<ServiceCompanyFilesDO> companyFiles(Long serviceCompanyId, String fileName);
}
package com.subsidy.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.model.CompanyDictDO;
import com.subsidy.model.ServiceCompanyMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.service.GetServiceCompaniesVO;
import com.subsidy.vo.service.ServiceCompaniesVO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 业务公司 映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Repository
public interface ServiceCompanyMappingMapper extends BaseMapper<ServiceCompanyMappingDO> {
IPage<GetServiceCompaniesVO> getServiceCompanies(IPage iPage, Long serviceId, String companyName, String authStatus);
List<ServiceCompaniesVO> serviceCompanies(Long serviceId, String companyName);
}
package com.subsidy.mapper;
import com.subsidy.model.ServiceDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 业务管理字典表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Repository
public interface ServiceDictMapper extends BaseMapper<ServiceDictDO> {
}
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;
/**
* <p>
* 管理员-公司映射表
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("administer_company_mapping")
public class AdministerCompanyMappingDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long administerId;
private Long companyId;
}
......@@ -63,15 +63,14 @@ public class AdministerDO extends BaseModel {
*/
private String status;
///**
// * 0:运营者账号 1:企业账号
// */
//private String accountType;
/**
* role 0:平台运营者 1:超级管理员 2:普通成员
*/
private Integer role;
/**
* 备注
*/
private String remark;
}
......@@ -41,16 +41,6 @@ public class CompanyDictDO extends BaseModel {
private String companyCode;
/**
* 账号
*/
private String accountName;
/**
* 密码
*/
private String password;
/**
* 简称
*/
private String shortName;
......
......@@ -40,5 +40,14 @@ public class CompanyMemberMappingDO extends BaseModel {
*/
private Integer memberStatus;
/**
* 工号
*/
private String workNo;
/**
* 入职时间
*/
private String inductionDate;
}
......@@ -60,17 +60,6 @@ public class MemberDO extends BaseModel {
private String password;
/**
* 工号
*/
private String workNo;
/**
* 入职时间
*/
@JsonFormat
private String inductionDate;
/**
* 邮箱
*/
private String email;
......
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;
/**
* <p>
* 产品管理字典表
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("product_dict")
public class ProductDictDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 产品名称
*/
private String productName;
/**
* 产品图标
*/
private String productLogo;
/**
* 产品描述
*/
private String productDesc;
/**
* 联系方式
*/
private String contactInfo;
/**
* 上下架状态
*/
private String groundingStatus;
/**
* 高亮标签
*/
private String highlightTag;
}
......@@ -30,7 +30,7 @@ public class RankDictDO extends BaseModel {
/**
* 职级
*/
private String rank;
private String rankLevel;
}
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;
/**
* <p>
* 应用账户-服务映射表
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("service_administer_mapping")
public class ServiceAdministerMappingDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long administerId;
private Long serviceId;
}
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;
/**
* <p>
*
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("service_company_files")
public class ServiceCompanyFilesDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long serviceCompanyId;
/**
* 0:业务合同 1:业务材料
*/
private String fileType;
private String fileName;
private String fileAddress;
}
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;
/**
* <p>
* 业务公司 映射表
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("service_company_mapping")
public class ServiceCompanyMappingDO 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;
}
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;
/**
* <p>
* 业务管理字典表
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("service_dict")
public class ServiceDictDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 业务名称
*/
private String serviceName;
}
package com.subsidy.service;
import com.subsidy.model.AdministerCompanyMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 管理员-公司映射表 服务类
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
public interface AdministerCompanyMappingService extends IService<AdministerCompanyMappingDO> {
}
......@@ -14,6 +14,7 @@ import com.subsidy.vo.member.ImportMemberVO;
import com.subsidy.vo.sign.AnswerRecordVO;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
......@@ -28,15 +29,17 @@ public interface AdministerService extends IService<AdministerDO> {
LoginVO login(AdministerDO administerDO);
LoginVO appLogin(AppLoginDTO appLoginDTO, HttpServletRequest request);
AdministerPermissionVO getPermissions();
IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO);
IPage<AdministerVO> operators(OperatorsDTO operatorsDTO);
String addAdminister(AdministerDO administerDO);
String addAdminister(AddAdministerDTO addAdministerDTO);
String deleteAdminister(AdministerDO administerDO);
String updateAdminister(AdministerDO administerDO);
String updateAdminister(AddAdministerDTO addAdministerDTO);
ClassSummaryVO classSummary(ClassDetailDTO classDetailDTO);
......
package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.company.AttendMembersDTO;
import com.subsidy.dto.member.CancerMemberDTO;
import com.subsidy.dto.member.DepartMembersDTO;
import com.subsidy.dto.member.InviteMemberDTO;
import com.subsidy.model.CompanyMemberMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.model.MemberDO;
import com.subsidy.vo.member.AttendMembersVO;
import com.subsidy.vo.member.DepartMembersVO;
import com.subsidy.vo.member.MemberAttendInfoVO;
import java.util.List;
......@@ -23,4 +29,13 @@ public interface CompanyMemberMappingService extends IService<CompanyMemberMappi
String inviteMember(InviteMemberDTO inviteMemberDTO);
String cancerMember(CancerMemberDTO cancerMemberDTO);
IPage<DepartMembersVO> departMembers(DepartMembersDTO departMembersDTO);
void exportDepartMembers(DepartMembersDTO departMembersDTO);
IPage<AttendMembersVO> attendMembers(AttendMembersDTO attendMembersDTO);
List<MemberAttendInfoVO> memberAttendInfo(CompanyMemberMappingDO companyMemberMappingDO);
}
......@@ -29,6 +29,8 @@ public interface MemberService extends IService<MemberDO> {
IPage<GetAllVO> getAll(GetAllDTO getAllDTO);
void exportAllMembers(GetAllDTO getAllDTO);
String deleteMember(MemberDO memberDO);
String addMember(AddMemberDTO addMemberDTO);
......
package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.dto.product.AllProductsDTO;
import com.subsidy.model.ProductDictDO;
/**
* <p>
* 产品管理字典表 服务类
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
public interface ProductDictService extends IService<ProductDictDO> {
IPage<ProductDictDO> allProducts(AllProductsDTO allProductsDTO);
String addProduct(ProductDictDO productDictDO);
String deleteProduct(ProductDictDO productDictDO);
String updateProduct(ProductDictDO productDictDO);
}
package com.subsidy.service;
import com.subsidy.model.ServiceAdministerMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.model.ServiceDictDO;
import java.util.List;
/**
* <p>
* 应用账户-服务映射表 服务类
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
public interface ServiceAdministerMappingService extends IService<ServiceAdministerMappingDO> {
List<ServiceDictDO> administerServices(ServiceAdministerMappingDO serviceAdministerMappingDO);
}
package com.subsidy.service;
import com.subsidy.model.ServiceCompanyFilesDO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 服务类
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
public interface ServiceCompanyFilesService extends IService<ServiceCompanyFilesDO> {
List<ServiceCompanyFilesDO> companyFiles(ServiceCompanyFilesDO serviceCompanyFilesDO);
String deleteFile(ServiceCompanyFilesDO serviceCompanyFilesDO);
String uploadFile(ServiceCompanyFilesDO serviceCompanyFilesDO);
}
package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.service.CancelAuthDTO;
import com.subsidy.dto.service.GetServiceCompaniesDTO;
import com.subsidy.model.CompanyDictDO;
import com.subsidy.model.ServiceCompanyMappingDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.vo.service.GetServiceCompaniesVO;
import com.subsidy.vo.service.ServiceCompaniesVO;
import java.util.List;
/**
* <p>
* 业务公司 映射表 服务类
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
public interface ServiceCompanyMappingService extends IService<ServiceCompanyMappingDO> {
IPage<GetServiceCompaniesVO> getServiceCompanies(GetServiceCompaniesDTO getServiceCompaniesDTO);
String cancelAuth(CancelAuthDTO cancelAuthDTO);
String addAuth(CancelAuthDTO cancelAuthDTO);
List<ServiceCompaniesVO> serviceCompanies(GetServiceCompaniesDTO getServiceCompaniesDTO);
}
package com.subsidy.service;
import com.subsidy.model.ServiceDictDO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 业务管理字典表 服务类
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
public interface ServiceDictService extends IService<ServiceDictDO> {
List<ServiceDictDO> getAllServices();
}
package com.subsidy.service.impl;
import com.subsidy.mapper.AdministerMapper;
import com.subsidy.model.AdministerCompanyMappingDO;
import com.subsidy.mapper.AdministerCompanyMappingMapper;
import com.subsidy.service.AdministerCompanyMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.vo.company.GetAllCompanyVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 管理员-公司映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Service
public class AdministerCompanyMappingServiceImpl extends ServiceImpl<AdministerCompanyMappingMapper, AdministerCompanyMappingDO> implements AdministerCompanyMappingService {
}
......@@ -45,6 +45,7 @@ import com.subsidy.vo.company.CDNStatDetailsVO;
import com.subsidy.vo.company.DataOverviewVO;
import com.subsidy.vo.company.GetAllCompanyVO;
import com.subsidy.vo.company.GetCompanyMembersVO;
import com.subsidy.vo.member.MemberCompanyVO;
import com.tencentcloudapi.vod.v20180717.models.StatDataItem;
import org.apache.commons.collections.CollectionUtils;
import com.subsidy.vo.company.MemberSummaryVO;
......@@ -123,23 +124,23 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
@Autowired
private CompanyMemberMappingMapper companyMemberMappingMapper;
@Autowired
private AdministerCompanyMappingMapper administerCompanyMappingMapper;
public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) {
Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize());
AdministerDO administerDO = administerMapper.selectById(operatorsDTO.getUserId());
AdministerDO administerDO = administerMapper.selectById(operatorsDTO.getId());
//判断该用户的角色
Integer count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>()
.lambda()
.eq(RoleAdministerMappingDO::getAdministerId, operatorsDTO.getId())
.eq(RoleAdministerMappingDO::getRoleId, 1));
if (count > 0) {
administerDO.setCompanyId(null);
IPage page = null;
if (0 == administerDO.getRole()) {
page = this.baseMapper.allOperators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), operatorsDTO.getSuperviseName());
} else if (1 == administerDO.getRole() || 3 == administerDO.getRole()) {
page = this.baseMapper.operators(pager, operatorsDTO.getUserId(), operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), operatorsDTO.getSuperviseName());
}
IPage page = this.baseMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), administerDO.getCompanyId(), 2, operatorsDTO.getSuperviseName());
List<OperatorsVO> operatorsVOS = page.getRecords();
for (OperatorsVO operatorsVO : operatorsVOS) {
//查看公司所在行业
List<FieldDictDO> fieldDictDOS = fieldDictMapper.queryCompanyFields(operatorsVO.getCompanyId());
operatorsVO.setField(fieldDictDOS);
......@@ -178,6 +179,11 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
//administerDO.setRole(1);
administerMapper.insert(administerDO);
AdministerCompanyMappingDO administerCompanyMappingDO = new AdministerCompanyMappingDO();
administerCompanyMappingDO.setCompanyId(companyDictDO.getId());
administerCompanyMappingDO.setAdministerId(administerDO.getId());
administerCompanyMappingMapper.insert(administerCompanyMappingDO);
RoleAdministerMappingDO roleAdministerMappingDO = new RoleAdministerMappingDO();
roleAdministerMappingDO.setAdministerId(administerDO.getId());
roleAdministerMappingDO.setRoleId(2L);
......@@ -337,12 +343,23 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
public IPage<GetCompanyMembersVO> getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) {
Page pager = new Page(getCompanyMembersDTO.getPageNum(), getCompanyMembersDTO.getPageSize());
return this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName(),getCompanyMembersDTO.getMemberStatus());
IPage<GetCompanyMembersVO> companyMembersVOIPage = this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName(), getCompanyMembersDTO.getMemberStatus());
List<GetCompanyMembersVO> records = companyMembersVOIPage.getRecords();
for (GetCompanyMembersVO gcmv : records) {
//历史带过的企业
List<MemberCompanyVO> memberCompanyVOS = companyMemberMappingMapper.memberCompanys(gcmv.getId());
gcmv.setMemberCompanyVOS(memberCompanyVOS);
}
return companyMembersVOIPage;
}
public void exportCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) {
Page pager = new Page(1, -1);
List<GetCompanyMembersVO> getCompanyMembersVOS = this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName(),getCompanyMembersDTO.getMemberStatus()).getRecords();
List<GetCompanyMembersVO> getCompanyMembersVOS = this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName(), getCompanyMembersDTO.getMemberStatus()).getRecords();
ExcelUtil.writeExcel(getCompanyMembersVOS, GetCompanyMembersVO.class);
}
......
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.common.exception.HttpException;
import com.subsidy.dto.company.AttendMembersDTO;
import com.subsidy.dto.member.CancerMemberDTO;
import com.subsidy.dto.member.DepartMembersDTO;
import com.subsidy.dto.member.InviteMemberDTO;
import com.subsidy.mapper.MemberDepartmentMappingMapper;
import com.subsidy.mapper.MemberMapper;
......@@ -13,10 +17,13 @@ import com.subsidy.model.MemberDepartmentMappingDO;
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.member.AttendMembersVO;
import com.subsidy.vo.member.DepartMembersVO;
import com.subsidy.vo.member.MemberAttendInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -56,7 +63,7 @@ public class CompanyMemberMappingServiceImpl extends ServiceImpl<CompanyMemberMa
.eq(CompanyMemberMappingDO::getMemberId, memberDO.getId())
.eq(CompanyMemberMappingDO::getMemberStatus, 1));
if (count > 0 ) {
if (count > 0) {
throw new HttpException(10028);
}
......@@ -94,4 +101,25 @@ public class CompanyMemberMappingServiceImpl extends ServiceImpl<CompanyMemberMa
return ConstantUtils.DELETE_SUCCESS;
}
public IPage<DepartMembersVO> departMembers(DepartMembersDTO departMembersDTO) {
Page pager = new Page(departMembersDTO.getPageNum(), departMembersDTO.getPageSize());
return this.baseMapper.departMembers(pager, departMembersDTO.getCompanyId(), departMembersDTO.getUserName());
}
public void exportDepartMembers(DepartMembersDTO departMembersDTO) {
Page pager = new Page(1, -1);
IPage<DepartMembersVO> departMembersVOIPage = this.baseMapper.departMembers(pager, departMembersDTO.getCompanyId(), departMembersDTO.getUserName());
List<DepartMembersVO> departMembersVOS = departMembersVOIPage.getRecords();
ExcelUtil.writeExcel(departMembersVOS, DepartMembersVO.class);
}
public IPage<AttendMembersVO> attendMembers(AttendMembersDTO attendMembersDTO) {
Page pager = new Page(attendMembersDTO.getPageNum(), attendMembersDTO.getPageSize());
return this.baseMapper.attendMembers(pager, attendMembersDTO.getCompanyId(), attendMembersDTO.getDepartmentId(), attendMembersDTO.getUserName());
}
public List<MemberAttendInfoVO> memberAttendInfo(CompanyMemberMappingDO companyMemberMappingDO) {
return this.baseMapper.memberAttendInfo(companyMemberMappingDO.getMemberId(),companyMemberMappingDO.getCompanyId());
}
}
......@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.subsidy.common.configure.PolyvConfig;
import com.subsidy.dto.live.AddLiveDTO;
import com.subsidy.dto.live.AllLivesDTO;
import com.subsidy.jobs.CourseNotificationJob;
import com.subsidy.jobs.LiveDictJob;
import com.subsidy.mapper.LiveClassesMapper;
import com.subsidy.mapper.LiveStudyHistoryMapper;
......@@ -15,12 +14,10 @@ import com.subsidy.model.LiveClassesDO;
import com.subsidy.model.LiveDictDO;
import com.subsidy.mapper.LiveDictMapper;
import com.subsidy.model.LiveStudyHistoryDO;
import com.subsidy.model.MemberDO;
import com.subsidy.service.LiveDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.*;
import com.subsidy.vo.live.*;
import net.polyv.common.v1.constant.Constant;
import net.polyv.live.v1.util.LiveSignUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.subsidy.service.impl;
import com.subsidy.common.configure.PolyvConfig;
import com.subsidy.dto.live.LiveSignDTO;
import com.subsidy.model.LiveStudyHistoryDO;
import com.subsidy.mapper.LiveStudyHistoryMapper;
import com.subsidy.model.MemberDO;
import com.subsidy.service.LiveStudyHistoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import com.subsidy.util.PolyvUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
......
......@@ -14,6 +14,7 @@ import com.subsidy.mapper.*;
import com.subsidy.model.*;
import com.subsidy.service.MemberService;
import com.subsidy.util.*;
import com.subsidy.util.excel.ExcelUtil;
import com.subsidy.vo.administer.UserRoleVO;
import com.subsidy.vo.live.MemberLivesVO;
import com.subsidy.vo.live.PolyvInfoVO;
......@@ -154,6 +155,23 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
return iPage;
}
public void exportAllMembers(GetAllDTO getAllDTO) {
Page pager = new Page(1, -1);
DepartmentDictDO departmentDictDO = departmentDictMapper.selectById(getAllDTO.getDepartmentId());
IPage iPage = null;
if (null != departmentDictDO.getParentId()) {
iPage = this.baseMapper.getMembers(pager, getAllDTO.getDepartmentId(), getAllDTO.getUserName(), getAllDTO.getStatus(), getAllDTO.getStartDate(), getAllDTO.getEndDate());
} else {
iPage = this.baseMapper.getCompanyMember(pager, departmentDictDO.getCompanyId(), getAllDTO.getUserName(), getAllDTO.getStatus(), getAllDTO.getStartDate(), getAllDTO.getEndDate());
}
List<GetAllVO> getAllVOS = iPage.getRecords();
ExcelUtil.writeExcel(getAllVOS, GetAllVO.class);
}
@Transactional(rollbackFor = Exception.class)
public String deleteMember(MemberDO memberDO) {
......@@ -185,7 +203,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw new HttpException(20002);
}
List<MemberDO> memberDOS = companyMemberMappingMapper.companyAccountMembers(addMemberDTO.getCompanyId(),addMemberDTO.getAccountName());
List<MemberDO> memberDOS = companyMemberMappingMapper.companyAccountMembers(addMemberDTO.getCompanyId(), addMemberDTO.getAccountName());
if (memberDOS.size() > 0) {
throw new HttpException(20002);
......@@ -348,8 +366,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
public MemberVO passwordLogin(PasswordLoginDTO passwordLoginDTO, HttpServletRequest request) {
List<MemberDO> memberDOS = companyMemberMappingMapper.companyAccountMembers(passwordLoginDTO.getCompanyId(),passwordLoginDTO.getAccountName());
if (memberDOS.size() == 0 ) {
List<MemberDO> memberDOS = companyMemberMappingMapper.companyAccountMembers(passwordLoginDTO.getCompanyId(), passwordLoginDTO.getAccountName());
if (memberDOS.size() == 0) {
throw new HttpException(10017);
}
......
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.common.exception.HttpException;
import com.subsidy.dto.product.AllProductsDTO;
import com.subsidy.model.ProductDictDO;
import com.subsidy.mapper.ProductDictMapper;
import com.subsidy.service.ProductDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import org.springframework.stereotype.Service;
/**
* <p>
* 产品管理字典表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
@Service
public class ProductDictServiceImpl extends ServiceImpl<ProductDictMapper, ProductDictDO> implements ProductDictService {
public IPage<ProductDictDO> allProducts(AllProductsDTO allProductsDTO) {
Page pager = new Page(allProductsDTO.getPageNum(), allProductsDTO.getPageSize());
return this.baseMapper.allProducts(pager, allProductsDTO.getProductName());
}
public String addProduct(ProductDictDO productDictDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<ProductDictDO>()
.lambda()
.eq(ProductDictDO::getProductName, productDictDO.getProductName()));
if (count > 0) {
throw new HttpException(30002);
}
this.baseMapper.insert(productDictDO);
return ConstantUtils.ADD_SUCCESS;
}
public String deleteProduct(ProductDictDO productDictDO) {
this.baseMapper.deleteById(productDictDO.getId());
return ConstantUtils.DELETE_SUCCESS;
}
public String updateProduct(ProductDictDO productDictDO) {
this.baseMapper.updateById(productDictDO);
return ConstantUtils.SUCCESS_UPDATE;
}
}
......@@ -28,7 +28,7 @@ public class RankDictServiceImpl extends ServiceImpl<RankDictMapper, RankDictDO>
int count = this.baseMapper.selectCount(new QueryWrapper<RankDictDO>()
.lambda()
.eq(RankDictDO::getCompanyId, rankDictDO.getCompanyId())
.eq(RankDictDO::getRank, rankDictDO.getRank()));
.eq(RankDictDO::getRankLevel, rankDictDO.getRankLevel()));
if (count > 0) {
throw new HttpException(12001);
}
......@@ -46,7 +46,7 @@ public class RankDictServiceImpl extends ServiceImpl<RankDictMapper, RankDictDO>
int count = this.baseMapper.selectCount(new QueryWrapper<RankDictDO>()
.lambda()
.eq(RankDictDO::getCompanyId, rankDictDO.getCompanyId())
.eq(RankDictDO::getRank, rankDictDO.getRank())
.eq(RankDictDO::getRankLevel, rankDictDO.getRankLevel())
.ne(RankDictDO::getId, rankDictDO.getId()));
if (count > 0) {
throw new HttpException(12001);
......
......@@ -57,26 +57,24 @@ public class RenSheJuServiceImpl implements RenSheJuService {
//查找前一天产生数据的班级
// //看视频
// List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
//
// //考试
// List<Long> examClassIds = renSheJuMapper.examClassIds("0");
//
// //答疑
// List<Long> answerClassIds = renSheJuMapper.answerClassIds("0");
//
// //人脸识别
// List<Long> imageClassIds = renSheJuMapper.imageClassIds("0");
//看视频
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
Set<Long> classIds = new HashSet<>();
//考试
List<Long> examClassIds = renSheJuMapper.examClassIds("0");
// vodClassIds.stream().forEach(x -> classIds.add(x));
// examClassIds.stream().forEach(x -> classIds.add(x));
// answerClassIds.stream().forEach(x -> classIds.add(x));
// imageClassIds.stream().forEach(x -> classIds.add(x));
//答疑
List<Long> answerClassIds = renSheJuMapper.answerClassIds("0");
classIds.add(473L);
//人脸识别
List<Long> imageClassIds = renSheJuMapper.imageClassIds("0");
Set<Long> classIds = new HashSet<>();
vodClassIds.stream().forEach(x -> classIds.add(x));
examClassIds.stream().forEach(x -> classIds.add(x));
answerClassIds.stream().forEach(x -> classIds.add(x));
imageClassIds.stream().forEach(x -> classIds.add(x));
try {
if (classIds.size() > 0) {
......@@ -161,13 +159,10 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List<ClassHourBasic> classHourBasics = new ArrayList<>();
// 产生视频学习数据的班级
// List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
List<DailyStudyInfoVO> result = new ArrayList<>();
List<Long> vodClassIds = new ArrayList<>();
vodClassIds.add(473L);
try {
for (Long classId : vodClassIds) {
//产生数据的班级
......@@ -284,9 +279,6 @@ public class RenSheJuServiceImpl implements RenSheJuService {
//找出前一天产生考试数据的班级
List<Long> classIds = renSheJuMapper.dailyExamBasic("0");
// List<Long> classIds = new ArrayList<>();
// classIds.add(439L);
try {
if (classIds.size() > 0) {
for (Long classId : classIds) {
......
package com.subsidy.service.impl;
import com.subsidy.model.ServiceAdministerMappingDO;
import com.subsidy.mapper.ServiceAdministerMappingMapper;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.service.ServiceAdministerMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 应用账户-服务映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-01-08
*/
@Service
public class ServiceAdministerMappingServiceImpl extends ServiceImpl<ServiceAdministerMappingMapper, ServiceAdministerMappingDO> implements ServiceAdministerMappingService {
public List<ServiceDictDO> administerServices(ServiceAdministerMappingDO serviceAdministerMappingDO) {
return this.baseMapper.administerService(serviceAdministerMappingDO.getAdministerId());
}
}
package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.model.ServiceCompanyFilesDO;
import com.subsidy.mapper.ServiceCompanyFilesMapper;
import com.subsidy.service.ServiceCompanyFilesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Service
public class ServiceCompanyFilesServiceImpl extends ServiceImpl<ServiceCompanyFilesMapper, ServiceCompanyFilesDO> implements ServiceCompanyFilesService {
public List<ServiceCompanyFilesDO> companyFiles(ServiceCompanyFilesDO serviceCompanyFilesDO) {
return this.baseMapper.companyFiles(serviceCompanyFilesDO.getServiceCompanyId(), serviceCompanyFilesDO.getFileName());
}
public String deleteFile(ServiceCompanyFilesDO serviceCompanyFilesDO) {
this.baseMapper.deleteById(serviceCompanyFilesDO.getId());
return ConstantUtils.DELETE_SUCCESS;
}
public String uploadFile(ServiceCompanyFilesDO serviceCompanyFilesDO) {
this.baseMapper.insert(serviceCompanyFilesDO);
return ConstantUtils.ADD_SUCCESS;
}
}
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.service.CancelAuthDTO;
import com.subsidy.dto.service.GetServiceCompaniesDTO;
import com.subsidy.model.CompanyDictDO;
import com.subsidy.model.ServiceCompanyMappingDO;
import com.subsidy.mapper.ServiceCompanyMappingMapper;
import com.subsidy.service.ServiceCompanyMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import com.subsidy.vo.service.GetServiceCompaniesVO;
import com.subsidy.vo.service.ServiceCompaniesVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* <p>
* 业务公司 映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Service
public class ServiceCompanyMappingServiceImpl extends ServiceImpl<ServiceCompanyMappingMapper, ServiceCompanyMappingDO> implements ServiceCompanyMappingService {
public IPage<GetServiceCompaniesVO> getServiceCompanies(GetServiceCompaniesDTO getServiceCompaniesDTO) {
Page pager = new Page(getServiceCompaniesDTO.getPageNum(), getServiceCompaniesDTO.getPageSize());
return this.baseMapper.getServiceCompanies(pager, getServiceCompaniesDTO.getServiceId(), getServiceCompaniesDTO.getCompanyName(), getServiceCompaniesDTO.getAuthStatus());
}
@Transactional(rollbackFor = Exception.class)
public String cancelAuth(CancelAuthDTO cancelAuthDTO) {
List<Long> companyIds = cancelAuthDTO.getCompanyIds();
for (Long companyId : companyIds) {
this.baseMapper.delete(new QueryWrapper<ServiceCompanyMappingDO>()
.lambda()
.eq(ServiceCompanyMappingDO::getCompanyId, companyId)
.eq(ServiceCompanyMappingDO::getServiceId, cancelAuthDTO.getServiceId()));
}
return ConstantUtils.DELETE_SUCCESS;
}
@Transactional(rollbackFor = Exception.class)
public String addAuth(CancelAuthDTO cancelAuthDTO) {
List<Long> companyIds = cancelAuthDTO.getCompanyIds();
for (Long companyId : companyIds) {
ServiceCompanyMappingDO serviceCompanyMappingDO = new ServiceCompanyMappingDO();
serviceCompanyMappingDO.setCompanyId(companyId);
serviceCompanyMappingDO.setServiceId(cancelAuthDTO.getServiceId());
this.baseMapper.insert(serviceCompanyMappingDO);
}
return ConstantUtils.ADD_SUCCESS;
}
public List<ServiceCompaniesVO> serviceCompanies(GetServiceCompaniesDTO getServiceCompaniesDTO) {
return this.baseMapper.serviceCompanies(getServiceCompaniesDTO.getServiceId(),getServiceCompaniesDTO.getCompanyName());
}
}
package com.subsidy.service.impl;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.mapper.ServiceDictMapper;
import com.subsidy.service.ServiceDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 业务管理字典表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-01-05
*/
@Service
public class ServiceDictServiceImpl extends ServiceImpl<ServiceDictMapper, ServiceDictDO> implements ServiceDictService {
public List<ServiceDictDO> getAllServices(){
return this.baseMapper.selectList(null);
}
}
package com.subsidy.vo.administer;
import com.subsidy.vo.company.GetAllCompanyVO;
import lombok.Data;
import java.util.List;
......@@ -11,7 +12,7 @@ public class AdministerPermissionVO {
private String userName;
private Long role;
private Integer role;
private String img;
......@@ -22,4 +23,6 @@ public class AdministerPermissionVO {
private String shortName;
private List<PermissionsVO> permissions;
private List<GetAllCompanyVO> getAllCompanyVOS;
}
package com.subsidy.vo.administer;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.vo.company.GetAllCompanyVO;
import lombok.Data;
import java.util.List;
@Data
public class AdministerVO {
private Long id;
private String userName;
private String password;
private String telephone;
private String remark;
private Integer role;
private List<GetAllCompanyVO> getAllCompanyVOS;
private List<ServiceDictDO> serviceDictDOS;
}
package com.subsidy.vo.company;
import com.subsidy.util.excel.ExcelColumn;
import com.subsidy.vo.member.MemberCompanyVO;
import lombok.Data;
import java.util.List;
@Data
public class GetCompanyMembersVO {
......@@ -38,5 +41,6 @@ public class GetCompanyMembersVO {
private String memberStatus;
private List<MemberCompanyVO> memberCompanyVOS;
}
package com.subsidy.vo.member;
import lombok.Data;
@Data
public class AttendMembersVO {
private Long id;
private String userName;
private String accountNameEn;
private String accountName;
private String gender;
private String telephone;
private String idCard;
private String email;
}
package com.subsidy.vo.member;
import com.subsidy.util.excel.ExcelColumn;
import lombok.Data;
@Data
public class DepartMembersVO {
@ExcelColumn(value = "姓名", col = 1)
private String userName;
@ExcelColumn(value = "手机号", col = 2)
private String telephone;
@ExcelColumn(value = "身份证号", col = 3)
private String idCard;
@ExcelColumn(value = "性别", col = 4)
private String gender;
@ExcelColumn(value = "邮件", col = 5)
private String email;
@ExcelColumn(value = "QQ号", col = 6)
private String qqNo;
@ExcelColumn(value = "微信号", col = 7)
private String wechat;
@ExcelColumn(value = "离职时间", col = 8)
private String createDate;
}
......@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.subsidy.model.DepartmentDictDO;
import com.subsidy.model.JobDictDO;
import com.subsidy.model.MemberDO;
import com.subsidy.util.excel.ExcelColumn;
import lombok.Data;
import java.util.Date;
......@@ -16,18 +17,25 @@ public class GetAllVO {
private Long id;
@ExcelColumn(value = "账号", col = 5)
private String accountName;
@ExcelColumn(value = "英文名", col = 2)
private String accountNameEn;
@ExcelColumn(value = "姓名", col = 1)
private String userName;
@ExcelColumn(value = "手机号", col = 6)
private String telephone;
@ExcelColumn(value = "性别", col = 4)
private String gender;
@ExcelColumn(value = "身份证号码", col = 7)
private String idCard;
@ExcelColumn(value = "账号状态", col = 3)
private String status;
private String email;
......
package com.subsidy.vo.member;
import lombok.Data;
@Data
public class MemberAttendInfoVO {
private Long id;
private String className;
private String createDate;
}
package com.subsidy.vo.member;
import lombok.Data;
@Data
public class MemberCompanyVO {
private Long companyId;
private String companyName;
private String createDate;
}
package com.subsidy.vo.service;
import lombok.Data;
@Data
public class GetServiceCompaniesVO {
private Long id;
private String companyName;
private String shortName;
private String areaName;
private String superviseName;
private String authStatus;
}
package com.subsidy.vo.service;
import lombok.Data;
@Data
public class ServiceCompaniesVO {
private Long id;
private String companyName;
}
......@@ -77,3 +77,5 @@ meishu.code-message[18001]=已超过当日验证次数上线
meishu.code-message[19001]=验证失败
meishu.code-message[20003]=提交时间过短,请稍后尝试
meishu.code-message[30002]=该产品已存在
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.AdministerCompanyMappingMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.AdministerCompanyMappingDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="administer_id" property="administerId" />
<result column="company_id" property="companyId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, administer_id, company_id
</sql>
</mapper>
......@@ -221,18 +221,27 @@
order by t6.account_name ASC
</select>
<select id="operators" parameterType="string" resultType="com.subsidy.vo.administer.OperatorsVO">
<select id="operators" parameterType="string" resultType="com.subsidy.vo.administer.AdministerVO">
SELECT
t.id,
t.user_name,
t.account_name
t2.id,
t2.user_name,
t2.`password`,
t2.telephone,
t2.remark,
t2.role
FROM
administer t
administer_company_mapping t
LEFT JOIN administer t2 ON t.administer_id = t2.id
LEFT JOIN company_dict t3 ON t.company_id = t3.id
WHERE
t.role = 0
AND t.delete_date IS NULL
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t3.delete_date is null
<if test="userName != null and userName != ''">
and t.user_name like concat('%',#{userName} ,'%')
and t2.user_name like concat('%',#{userName} ,'%')
</if>
<if test="companyName != null and companyName != ''">
and t3.company_name like concat('%',#{userName} ,'%')
</if>
</select>
......@@ -315,4 +324,41 @@
t1.create_date
</select>
<select id="administerCompanys" parameterType="long" resultType="com.subsidy.vo.company.GetAllCompanyVO">
SELECT
t2.id,
t2.company_name
FROM
administer_company_mapping t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.administer_id = #{administerId}
</select>
<select id="administerCompanyIds" parameterType="long" resultType="long">
SELECT
t2.id
FROM
administer_company_mapping t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.administer_id = #{administerId}
</select>
<select id="administerServiceIds" parameterType="long" resultType="long">
SELECT
t2.id
FROM
service_administer_mapping t
LEFT JOIN service_dict t2 ON t.service_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.administer_id = #{administerId}
</select>
</mapper>
......@@ -2,33 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.CompanyDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.CompanyDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_name" property="companyName" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_name
</sql>
<select id="operators" resultType="com.subsidy.vo.administer.OperatorsVO">
<select id="allOperators" resultType="com.subsidy.vo.administer.OperatorsVO">
SELECT
distinct t.id,
distinct
t2.id as companyId,
t.telephone,
t.user_name,
t2.banner,
t2.short_name,
t.account_name,
t.img,
t2.company_name,
t2.logo,
t2.address,
......@@ -36,23 +16,48 @@
t2.company_code,
t2.area_name
FROM
administer t
left join role_administer_mapping t4 on t.id = t4.administer_id
left join company_dict t2 on t.company_id = t2.id
company_dict t2
left join company_field_mapping t3 on t2.id = t3.company_id
left join service_company_mapping t4 on t2.id = t4.company_id
WHERE
t.delete_date IS NULL
and t2.delete_date is null
t2.delete_date is null
and t3.delete_date is null
<if test="role == 1">
and t4.role_id in (1,3)
and service_id = 1
and t4.delete_date is null
<if test="companyName != null and companyName != ''">
and t2.company_name like concat('%',#{companyName} ,'%')
</if>
<if test="role == 2">
and t4.role_id = 2
<if test="fieldId != null and fieldId != ''">
and t3.field_id = #{fieldId}
</if>
<if test="id != null and id != ''">
and t2.id = #{id}
<if test="superviseName != null and superviseName != ''">
and t2.supervise_name =#{superviseName}
</if>
</select>
<select id="operators" resultType="com.subsidy.vo.administer.OperatorsVO">
SELECT
distinct
t2.id as companyId,
t2.banner,
t2.short_name,
t2.company_name,
t2.logo,
t2.address,
t2.supervise_name,
t2.company_code,
t2.area_name
FROM
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 service_company_mapping t5 on t2.id = t5.company_id
WHERE
t2.delete_date is null
and t3.delete_date is null
and t4.delete_date is null
and t5.service_id = 1
and t5.delete_date is null
<if test="companyName != null and companyName != ''">
and t2.company_name like concat('%',#{companyName} ,'%')
</if>
......@@ -62,9 +67,13 @@
<if test="superviseName != null and superviseName != ''">
and t2.supervise_name =#{superviseName}
</if>
<if test="userId != null and userId != ''">
and t4.administer_id =#{userId}
</if>
</select>
<select id="getAllCompany" parameterType="com.subsidy.model.CompanyDictDO" resultType="com.subsidy.vo.company.GetAllCompanyVO">
SELECT
t.id,
......
......@@ -76,4 +76,93 @@
AND t.member_status = 1
</select>
<select id="memberCompanys" parameterType="long" resultType="com.subsidy.vo.member.MemberCompanyVO">
SELECT
t.company_id,
t2.company_name,
t.create_date
FROM
company_member_mapping t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.member_id =#{memberId}
order by t.create_date desc,t.id desc
</select>
<select id="departMembers" parameterType="long" resultType="com.subsidy.vo.member.DepartMembersVO">
SELECT
t2.user_name,
t2.telephone,
t2.id_card,
t2.gender,
t2.email,
t2.qq_no,
t2.wechat,
t.create_date
FROM
company_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.company_id = #{companyId}
<if test="userName != null and userName !=''">
and ( t2.user_name like concat('%',#{userName} ,'%')
or t2.id_card like concat('%',#{userName} ,'%')
or t2.telephone like concat('%',#{userName} ,'%'))
</if>
and t.member_status = 0
order by t.id desc
</select>
<select id="attendMembers" resultType="com.subsidy.vo.member.AttendMembersVO">
SELECT DISTINCT
t1.id,
t1.user_name,
t1.account_name_en,
t1.account_name,
t1.gender,
t1.telephone,
t1.id_card,
t1.email
FROM
member t1
LEFT JOIN company_member_mapping t3 ON t1.id = t3.member_id
LEFT JOIN class_member_mapping t2 ON t1.id = t2.member_id
LEFT JOIN member_department_mapping t4 ON t1.id = t4.member_id
WHERE
t1.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t4.delete_date IS NULL
AND t3.member_status = 1
AND t2.id IS NOT NULL
AND t3.company_id = #{companyId}
AND t4.member_status = 1
AND t4.department_id = #{departmentId}
<if test="userName != null and userName != ''">
and ( t1.user_name like concat('%',#{userName} ,'%')
or t1.id_card like concat('%',#{userName} ,'%')
or t1.telephone like concat('%',#{userName} ,'%'))
</if>
</select>
<select id="memberAttendInfo" resultType="com.subsidy.vo.member.MemberAttendInfoVO">
SELECT
t2.id,
t2.class_name,
t.create_date
FROM
class_member_mapping t
LEFT JOIN class_dict t2 ON t.class_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.member_id = #{memberId}
AND t2.company_id = #{companyId}
order by t.create_date desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.ProductDictMapper">
<select id="allProducts" parameterType="string" resultType="com.subsidy.model.ProductDictDO">
SELECT
*
FROM
product_dict t
WHERE
t.delete_date IS NULL
AND t.product_name like concat('%',#{productName} ,'%')
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.ServiceAdministerMappingMapper">
<select id="administerService" parameterType="long" resultType="com.subsidy.model.ServiceDictDO">
SELECT
t2.*
FROM
service_administer_mapping t
LEFT JOIN service_dict t2 ON t.service_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.administer_id = #{administerId}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.ServiceCompanyFilesMapper">
<select id="companyFiles" resultType="com.subsidy.model.ServiceCompanyFilesDO">
SELECT
*
FROM
service_company_files t
WHERE
t.delete_date IS NULL
AND t.service_company_id = #{serviceCompanyId}
<if test="fileName != null and fileName != ''">
AND t.file_name like concat('%',#{fileName} ,'%')
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.ServiceCompanyMappingMapper">
<select id="getServiceCompanies" resultType="com.subsidy.vo.service.GetServiceCompaniesVO">
SELECT
t2.id,
t2.company_name,
t2.short_name,
t2.area_name,
t2.supervise_name ,
IF(t.id=null,'授权','未授权') as authStatus
FROM
company_dict t2
LEFT JOIN service_company_mapping t ON t.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.service_id = #{serviceId}
<if test="companyName != null and companyName != ''">
AND t2.company_name like concat('%',#{companyName} ,'%')
</if>
<if test="authStatus == '授权'">
and t.id is not null
</if>
<if test="authStatus =='未授权'">
and t.id is null
</if>
</select>
<select id="serviceCompanies" resultType="com.subsidy.vo.service.ServiceCompaniesVO">
SELECT
t2.id,
t2.company_name
FROM
service_company_mapping t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.service_id = #{serviceId}
<if test="companyName != null and companyName != ''">
AND t2.company_name like concat('%',#{companyName} ,'%')
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.subsidy.mapper.ServiceDictMapper">
</mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!