Commit 36096276 by 涂亚平

居家办公前版本

1 parent 69bccbd6
Showing with 1041 additions and 99 deletions
......@@ -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;
......
......@@ -33,7 +33,6 @@ public class MemberController {
@Autowired
private MemberService memberService;
@PostMapping("departMembers")
@ApiOperation("某公司的离职记录 pageSize pageNum companyId userName 姓名/手机号/身份证号")
public ResponseVO departMembers(@RequestBody DepartMembersDTO departMembersDTO){
......
......@@ -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));
}
}
......@@ -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));
}
}
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;
/**
* <p>
* 文件目录树 前端控制器
* </p>
*
* @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));
}
}
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;
/**
* <p>
* 服务映射表 前端控制器
* </p>
*
* @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);
}
}
......@@ -11,13 +11,7 @@ public class CompanyFilesDTO {
private String fileName;
private Long serviceCompanyId;
private Long serviceId;
private Long companyId;
private Integer fileType;
private Long treeId;
}
package com.subsidy.dto.member;
import lombok.Data;
import java.util.List;
@Data
public class DownloadFailClassMembers {
private List<DownloadFailClassMembersDTO> downloadFailClassMembersDTOS;
}
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;
}
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;
}
package com.subsidy.dto.member;
import lombok.Data;
import java.util.List;
@Data
public class RemoveMembersDTO {
private List<Long> memberMappingIds;
}
package com.subsidy.dto.member;
import lombok.Data;
import java.util.List;
@Data
public class SelectImportDTO {
private List<Long> memberIds;
private Long companyId;
}
package com.subsidy.dto.member;
import lombok.Data;
@Data
public class SelectMembersDTO {
private Long companyId;
private Long serviceId;
private Integer pageSize;
private Integer pageNum;
}
......@@ -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;
}
package com.subsidy.dto.product;
import com.subsidy.model.ProductDictDO;
import lombok.Data;
import java.util.List;
@Data
public class ChangeOrderDTO {
private List<ProductDictDO> productDictDOS;
}
......@@ -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<CompanyMemberMapp
* 查看某个公司accountName的人
*/
List<MemberDO> companyAccountMembers(Long companyId, String accountName);
/**
* 查看公司里里全部的人
*/
List<String> companyMembers(Long companyId);
}
......@@ -16,6 +16,8 @@ import org.springframework.stereotype.Repository;
@Repository
public interface ProductDictMapper extends BaseMapper<ProductDictDO> {
IPage<ProductDictDO> allProducts(IPage iPage,String groundingStatus, String productName);
IPage<ProductDictDO> allProducts(IPage iPage,String groundingStatus, String productName,Integer productType);
void updateOrderNo(Long id,Integer orderNo);
}
......@@ -18,6 +18,6 @@ import java.util.List;
@Repository
public interface ServiceCompanyFilesMapper extends BaseMapper<ServiceCompanyFilesDO> {
IPage<ServiceCompanyFilesDO> companyFiles(IPage page,Integer fileType,Long companyId,Long serviceId, String fileName);
IPage<ServiceCompanyFilesDO> companyFiles(IPage page,List<Long> treeIds, String fileName);
}
......@@ -35,6 +35,6 @@ public interface ServiceCompanyMappingMapper extends BaseMapper<ServiceCompanyMa
/**
* 返回公司授权给某个人的业务
*/
List<AdministerServicesVO> companyAdministerService(Long companyId, Long administerId);
List<AdministerServicesVO> companyAdministerService(Long companyId,Long administerId);
}
package com.subsidy.mapper;
import com.subsidy.model.ServiceFileTreeDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 文件目录树 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-04-08
*/
@Repository
public interface ServiceFileTreeMapper extends BaseMapper<ServiceFileTreeDO> {
}
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;
/**
* <p>
* 服务映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-04-08
*/
@Repository
public interface ServiceMemberMappingMapper extends BaseMapper<ServiceMemberMappingDO> {
IPage<SelectMembersVO> selectMembers(IPage iPage,Long companyId, Long serviceId);
}
......@@ -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;
}
......@@ -49,5 +49,7 @@ public class ProductDictDO extends BaseModel {
private String highlightTag;
private Integer orderNo;
private Integer productType;
}
......@@ -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;
......
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;
/**
* <p>
* 文件目录树
* </p>
*
* @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;
}
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-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;
}
......@@ -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<CompanyMemberMappi
String inviteMember(InviteMemberDTO inviteMemberDTO);
String cancerMember(CancerMemberDTO cancerMemberDTO);
}
......@@ -2,6 +2,7 @@ package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.product.AllProductsDTO;
import com.subsidy.dto.product.ChangeOrderDTO;
import com.subsidy.model.ProductDictDO;
import com.baomidou.mybatisplus.extension.service.IService;
......@@ -23,5 +24,6 @@ public interface ProductDictService extends IService<ProductDictDO> {
String updateProduct(ProductDictDO productDictDO);
String changeOrder(ChangeOrderDTO changeOrderDTO);
}
......@@ -22,7 +22,7 @@ public interface ServiceCompanyFilesService extends IService<ServiceCompanyFiles
String deleteFile(ServiceCompanyFilesDO serviceCompanyFilesDO);
String uploadFile(UploadFileDTO uploadFileDTO);
String uploadFile(ServiceCompanyFilesDO serviceCompanyFilesDO);
}
package com.subsidy.service;
import com.subsidy.model.ServiceFileTreeDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.vo.tree.TreesVO;
import java.util.List;
/**
* <p>
* 文件目录树 服务类
* </p>
*
* @author Tuyp
* @since 2024-04-08
*/
public interface ServiceFileTreeService extends IService<ServiceFileTreeDO> {
List<TreesVO> trees(ServiceFileTreeDO serviceFileTreeDO);
String addTree(ServiceFileTreeDO serviceFileTreeDO);
String updateTree(ServiceFileTreeDO serviceFileTreeDO);
String deleteTree(ServiceFileTreeDO serviceFileTreeDO);
}
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;
/**
* <p>
* 服务映射表 服务类
* </p>
*
* @author Tuyp
* @since 2024-04-08
*/
public interface ServiceMemberMappingService extends IService<ServiceMemberMappingDO> {
String selectImport(SelectImportDTO selectImportDTO);
IPage<SelectMembersVO> selectMembers(SelectMembersDTO selectMembersDTO);
String removeMembers(RemoveMembersDTO removeMembersDTO);
ImportClassMembersVO importClassMembers(MultipartFile multipartFile, Long companyId);
void downloadFailClassMembers(DownloadFailClassMembers downloadFailClassMembers);
}
......@@ -77,10 +77,15 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
LoginVO loginVO = new LoginVO();
List<Integer> integers = new ArrayList<>();
integers.add(3);
integers.add(1);
integers.add(0);
AdministerDO administerDO1 = this.baseMapper.selectOne(new QueryWrapper<AdministerDO>()
.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<AdministerMapper, Adminis
String token = JwtUtil.generateToken(administerDO1.getId(), ConstantUtils.ADMINISTER_TERMINATE);
loginVO.setToken(token);
return loginVO;
}else {
} else {
throw new HttpException(10029);
}
}
......@@ -130,15 +135,6 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
administerPermissionVO.setPermissions(treeList);
administerPermissionVO.setTelephone(administerDO.getTelephone());
administerPermissionVO.setAccountName(administerDO.getAccountName());
// //查询角色
// RoleAdministerMappingDO roleAdministerMappingDO = roleAdministerMappingMapper.selectOne(new QueryWrapper<RoleAdministerMappingDO>()
// .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,23 +145,23 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
return administerPermissionVO;
}
public AuthVO auth(AdministerDO administerDO){
public AuthVO auth(AdministerDO administerDO) {
CloseableHttpClient client = null;
CloseableHttpResponse response = null;
String resValue = "";
long timestamp = System.currentTimeMillis();
String nonce = SecretUtils.getNonce(5);
String appId = subsidyConfig.getAppId();
String appKey = subsidyConfig.getSecurityKey();
String accountName = administerDO.getAccountName();
// long timestamp = System.currentTimeMillis();
// String nonce = SecretUtils.getNonce(5);
// String appId = subsidyConfig.getAppId();
//
// String appKey = subsidyConfig.getSecurityKey();
// String accountName = administerDO.getAccountName();
//鉴权逻辑 对不对
String preAuthen = "appId=qxywz5nnWMI7ABCS"
+"&id="+administerDO.getId()
+"&accountName="+administerDO.getAccountName()
+ "&id=" + administerDO.getId()
+ "&accountName=" + administerDO.getAccountName()
+ "&appSecret=626737T1-65K0-5xC2-0Y0V-2Aq9QUAJ";
......@@ -203,11 +199,13 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
MemberDO memberDel = memberMapper.selectOne(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getTelephone, s.getTelephone()));
.eq(MemberDO::getTelephone, s.getTelephone())
.eq(MemberDO::getMemberType, 2));
MemberDO memberIdCard = memberMapper.selectOne(new QueryWrapper<MemberDO>()
.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<AdministerMapper, Adminis
memberDO1.setStatus("启用");
memberDO1.setPassword("Ykhl123456");
memberDO1.setAccountNameEn(s.getAccountNameEn());
memberDO1.setMemberType(2);
memberMapper.insert(memberDO1);
//人和公司的映射
......@@ -512,6 +511,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
return ConstantUtils.SET_SUCCESS;
}
public String userName(String originName, int i, Long companyId) {
i++;
List<MemberDO> memberDOS = memberMapper.selectList(new QueryWrapper<MemberDO>()
......
......@@ -72,7 +72,6 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
List<GetCompanyMembersVO> records = companyMembersVOIPage.getRecords();
for (GetCompanyMembersVO gcmv : records) {
//历史带过的企业
List<MemberCompanyVO> memberCompanyVOS = companyMemberMappingMapper.memberCompanys(gcmv.getId());
gcmv.setMemberCompanyVOS(memberCompanyVOS);
......
......@@ -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<CompanyMemberMa
return ConstantUtils.DELETE_SUCCESS;
}
}
......@@ -83,7 +83,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
}
public List<MemberAttendInfoVO> 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<MemberMapper, MemberDO> imple
Integer count = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.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<MemberMapper, MemberDO> imple
Integer count2 = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.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<MemberMapper, MemberDO> 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<MemberMapper, MemberDO> imple
Integer count1 = this.baseMapper.selectCount(new QueryWrapper<MemberDO>()
.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<MemberMapper, MemberDO> imple
MemberDepartmentMappingDO memberDepartmentMappingDO = new MemberDepartmentMappingDO();
memberDepartmentMappingDO.setMemberId(memberDO.getId());
memberDepartmentMappingDO.setDepartmentId(lg);
memberDepartmentMappingDO.setMemberStatus(1);
memberDepartmentMappingMapper.insert(memberDepartmentMappingDO);
}
}
......
......@@ -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;
/**
* <p>
* 产品管理字典表 服务实现类
......@@ -26,7 +29,7 @@ public class ProductDictServiceImpl extends ServiceImpl<ProductDictMapper, Produ
public IPage<ProductDictDO> 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<ProductDictMapper, Produ
}
public String changeOrder(ChangeOrderDTO changeOrderDTO){
List<ProductDictDO> productDictDOS = changeOrderDTO.getProductDictDOS();
int i = 0;
for (ProductDictDO productDictDO : productDictDOS){
this.baseMapper.updateOrderNo(productDictDO.getId(),i++);
}
return ConstantUtils.SUCCESS_UPDATE;
}
}
......@@ -38,9 +38,8 @@ public class ServiceAdministerMappingServiceImpl extends ServiceImpl<ServiceAdmi
return serviceCompanyMappingMapper.companyService(administerCompanyMappingDO.getCompanyId());
} else {
//返回企业中授权给这个人的应用
return serviceCompanyMappingMapper.companyAdministerService(administerCompanyMappingDO.getCompanyId(), administerCompanyMappingDO.getAdministerId());
return serviceCompanyMappingMapper.companyAdministerService(administerCompanyMappingDO.getCompanyId(),administerCompanyMappingDO.getAdministerId());
}
}
}
......@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.subsidy.dto.company.CompanyFilesDTO;
import com.subsidy.dto.company.UploadFileDTO;
import com.subsidy.mapper.ServiceCompanyMappingMapper;
import com.subsidy.mapper.ServiceFileTreeMapper;
import com.subsidy.model.ServiceCompanyFilesDO;
import com.subsidy.mapper.ServiceCompanyFilesMapper;
import com.subsidy.model.ServiceCompanyMappingDO;
import com.subsidy.model.ServiceFileTreeDO;
import com.subsidy.service.ServiceCompanyFilesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
......@@ -16,6 +18,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -30,11 +33,26 @@ import java.util.List;
public class ServiceCompanyFilesServiceImpl extends ServiceImpl<ServiceCompanyFilesMapper, ServiceCompanyFilesDO> implements ServiceCompanyFilesService {
@Autowired
private ServiceCompanyMappingMapper serviceCompanyMappingMapper;
private ServiceFileTreeMapper serviceFileTreeMapper;
public IPage<ServiceCompanyFilesDO> 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<Long> treeIds = new ArrayList<>();
treeIds.add(companyFilesDTO.getTreeId());
ServiceFileTreeDO serviceFileTreeDO = serviceFileTreeMapper.selectById(companyFilesDTO.getTreeId());
if (null == serviceFileTreeDO.getParentId()){
//找出二级节点
List<ServiceFileTreeDO> serviceFileTreeDOS = serviceFileTreeMapper.selectList(new QueryWrapper<ServiceFileTreeDO>()
.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<ServiceCompanyFi
return ConstantUtils.DELETE_SUCCESS;
}
public String uploadFile(UploadFileDTO uploadFileDTO) {
ServiceCompanyFilesDO serviceCompanyFilesDO = new ServiceCompanyFilesDO();
ServiceCompanyMappingDO serviceCompanyMappingDO = serviceCompanyMappingMapper.selectOne(new QueryWrapper<ServiceCompanyMappingDO>()
.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;
}
}
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;
/**
* <p>
* 文件目录树 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-04-08
*/
@Service
public class ServiceFileTreeServiceImpl extends ServiceImpl<ServiceFileTreeMapper, ServiceFileTreeDO> implements ServiceFileTreeService {
public List<TreesVO> trees(ServiceFileTreeDO serviceFileTreeDO) {
List<TreesVO> result = new ArrayList<>();
List<ServiceFileTreeDO> serviceFileTreeDOS = this.baseMapper.selectList(new QueryWrapper<ServiceFileTreeDO>()
.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<ServiceFileTreeDO> serviceFileTreeDOList = this.baseMapper.selectList(new QueryWrapper<ServiceFileTreeDO>()
.lambda()
.eq(ServiceFileTreeDO::getParentId, sftd.getId()));
List<TreesVO> 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<ServiceFileTreeDO>()
.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<ServiceFileTreeDO>()
.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<Long> deleteIds = new ArrayList<>();
deleteIds.add(serviceFileTreeDO.getId());
//如果是一级目录的话,要删除对应的二级目录
if (null == serviceFileTreeDO1.getParentId()) {
//找出二级节点
List<ServiceFileTreeDO> serviceFileTreeDOS = this.baseMapper.selectList(new QueryWrapper<ServiceFileTreeDO>()
.lambda()
.eq(ServiceFileTreeDO::getParentId, serviceFileTreeDO.getId()));
for (ServiceFileTreeDO sftd : serviceFileTreeDOS) {
deleteIds.add(sftd.getId());
}
// 删除该目录下及子目录下的文件
this.baseMapper.delete(new QueryWrapper<ServiceFileTreeDO>()
.lambda()
.in(ServiceFileTreeDO::getId, deleteIds));
}
return ConstantUtils.DELETE_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.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;
/**
* <p>
* 服务映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-04-08
*/
@Service
public class ServiceMemberMappingServiceImpl extends ServiceImpl<ServiceMemberMappingMapper, ServiceMemberMappingDO> implements ServiceMemberMappingService {
@Autowired
private CompanyMemberMappingMapper companyMemberMappingMapper;
@Autowired
private MemberMapper memberMapper;
public String selectImport(SelectImportDTO selectImportDTO) {
List<Long> members = selectImportDTO.getMemberIds();
for (Long memberId : members) {
int count = this.baseMapper.selectCount(new QueryWrapper<ServiceMemberMappingDO>()
.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<SelectMembersVO> selectMembers(SelectMembersDTO selectMembersDTO) {
Page pager = new Page(selectMembersDTO.getPageNum(), selectMembersDTO.getPageSize());
IPage<SelectMembersVO> selectMembersVOIPage = this.baseMapper.selectMembers(pager, selectMembersDTO.getCompanyId(), selectMembersDTO.getServiceId());
List<SelectMembersVO> selectMembersVOS = selectMembersVOIPage.getRecords();
for (SelectMembersVO smv : selectMembersVOS){
//获取这个人所在的部门
List<DepartmentDictDO> departmentDictDOS = memberMapper.getDepartments(smv.getId());
smv.setDepartmentDictDOS(departmentDictDOS);
}
return selectMembersVOIPage;
}
public String removeMembers(RemoveMembersDTO removeMembersDTO) {
this.baseMapper.delete(new QueryWrapper<ServiceMemberMappingDO>()
.lambda()
.in(ServiceMemberMappingDO::getId,removeMembersDTO.getMemberMappingIds()));
return ConstantUtils.DELETE_SUCCESS;
}
public ImportClassMembersVO importClassMembers(MultipartFile multipartFile, Long companyId) {
ImportClassMembersVO importClassMembersVO = new ImportClassMembersVO();
List<ImportClassMemberDTO> importClassMemberDTOS = ExcelUtil.readExcel(null, ImportClassMemberDTO.class, multipartFile);
//查找企业下所有的学员的手机号 手机 姓名 身份证
List<String> companyMembers = companyMemberMappingMapper.companyMembers(companyId);
List<ImportClassMemberDTO> successMembers = new ArrayList<ImportClassMemberDTO>();
List<ImportClassMemberDTO> failMembers = new ArrayList<ImportClassMemberDTO>();
//查看该学员是否该企业下的人,不是的话就要返回 是的话直接导入成功
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<MemberDO>()
.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<DownloadFailClassMembersDTO> downloadFailClassMembersDTOS = downloadFailClassMembers.getDownloadFailClassMembersDTOS();
ExcelUtil.writeExcel(downloadFailClassMembersDTOS, DownloadFailClassMembersDTO.class);
}
}
package com.subsidy.vo.member;
import com.subsidy.dto.member.ImportClassMemberDTO;
import lombok.Data;
import java.util.List;
@Data
public class ImportClassMembersVO {
private List<ImportClassMemberDTO> successMembers;
private List<ImportClassMemberDTO> failureMembers;
}
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<DepartmentDictDO> departmentDictDOS;
}
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<TreesVO> treesVOS;
}
# 环境配置
# 环境配置 企业端
spring.profiles.active=prod
#和CPU数
spring.server.acceptorThreadCount=600
......
......@@ -31,6 +31,7 @@
<if test="superviseName != null and superviseName != ''">
and t2.supervise_name =#{superviseName}
</if>
order by t2.id
</select>
......@@ -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
and t3.delete_date is null
and t4.delete_date is null
and t5.delete_date is null
<if test="companyName != null and companyName != ''">
and t2.company_name like concat('%',#{companyName} ,'%')
</if>
......@@ -66,6 +70,7 @@
<if test="userId != null and userId != ''">
and t4.administer_id =#{userId}
</if>
order by t2.id
</select>
......@@ -102,6 +107,18 @@
<if test="memberStatus != null and memberStatus != ''">
and t5.member_status = #{memberStatus}
</if>
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
<if test="companyId != null and companyId != ''">
AND t.company_id =#{companyId}
</if>
)
</select>
......
......@@ -110,4 +110,17 @@
AND t.member_status = 1
</select>
<select id="companyMembers" parameterType="long" resultType="string">
SELECT
concat(t2.user_name,t2.telephone,t2.id_card)
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}
AND t.member_status = 1
</select>
</mapper>
......@@ -15,6 +15,13 @@
<if test="productName != null and productName != ''">
AND t.product_name like concat('%',#{productName} ,'%')
</if>
<if test="productType != null">
AND t.product_type = #{productType}
</if>
</select>
<update id="updateOrderNo">
update product_dict set order_no = #{orderNo} where id = #{id}
</update>
</mapper>
......@@ -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
<if test="companyId != null and companyId != ''">
AND t2.company_id = #{companyId}
</if>
<if test="serviceId != null and serviceId != ''">
and t2.service_id = #{serviceId}
</if>
<if test="fileName != null and fileName != ''">
AND t.file_name like concat('%',#{fileName} ,'%')
</if>
and t.file_type = #{fileType}
and t.tree_id in
<foreach collection="treeIds" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</select>
</mapper>
......@@ -59,17 +59,25 @@
<select id="companyAdministerService" resultType="com.subsidy.vo.administer.AdministerServicesVO">
SELECT
t2.*,
t.id as service_company_id
t2.*
FROM
service_administer_mapping t
LEFT JOIN service_dict t2 ON t.service_id = t2.id
INNER JOIN (
SELECT
t2.*
FROM
service_company_mapping t
LEFT JOIN service_dict t2 ON t.service_id = t2.id
LEFT JOIN service_administer_mapping t3 ON t.service_id = t3.service_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t.company_id = #{companyId}
AND t3.administer_id = #{administerId}
) t3 ON t2.id = t3.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.administer_id = #{administerId}
order by t2.id
</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.ServiceFileTreeMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.ServiceFileTreeDO">
<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_id" property="companyId" />
<result column="service_id" property="serviceId" />
<result column="parent_id" property="parentId" />
<result column="tree_name" property="treeName" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_id, service_id, parent_id, tree_name
</sql>
</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.ServiceMemberMappingMapper">
<select id="selectMembers" resultType="com.subsidy.vo.member.SelectMembersVO">
SELECT
t.id AS mappingId,
t2.id,
t2.user_name,
t2.telephone,
t2.id_card,
t2.status,
t2.account_name,
t2.gender,
t2.email,
t2.account_name_en,
t2.work_no,
t2.induction_date
FROM
service_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.service_id = 4
AND t.company_id =#{companyId}
</select>
</mapper>
# 环境配置
# 环境配置 企业端
spring.profiles.active=prod
#和CPU数
spring.server.acceptorThreadCount=600
......
......@@ -31,6 +31,7 @@
<if test="superviseName != null and superviseName != ''">
and t2.supervise_name =#{superviseName}
</if>
order by t2.id
</select>
......@@ -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
and t3.delete_date is null
and t4.delete_date is null
and t5.delete_date is null
<if test="companyName != null and companyName != ''">
and t2.company_name like concat('%',#{companyName} ,'%')
</if>
......@@ -66,6 +70,7 @@
<if test="userId != null and userId != ''">
and t4.administer_id =#{userId}
</if>
order by t2.id
</select>
......@@ -102,6 +107,18 @@
<if test="memberStatus != null and memberStatus != ''">
and t5.member_status = #{memberStatus}
</if>
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
<if test="companyId != null and companyId != ''">
AND t.company_id =#{companyId}
</if>
)
</select>
......
......@@ -110,4 +110,17 @@
AND t.member_status = 1
</select>
<select id="companyMembers" parameterType="long" resultType="string">
SELECT
concat(t2.user_name,t2.telephone,t2.id_card)
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}
AND t.member_status = 1
</select>
</mapper>
......@@ -15,6 +15,13 @@
<if test="productName != null and productName != ''">
AND t.product_name like concat('%',#{productName} ,'%')
</if>
<if test="productType != null">
AND t.product_type = #{productType}
</if>
</select>
<update id="updateOrderNo">
update product_dict set order_no = #{orderNo} where id = #{id}
</update>
</mapper>
......@@ -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
<if test="companyId != null and companyId != ''">
AND t2.company_id = #{companyId}
</if>
<if test="serviceId != null and serviceId != ''">
and t2.service_id = #{serviceId}
</if>
<if test="fileName != null and fileName != ''">
AND t.file_name like concat('%',#{fileName} ,'%')
</if>
and t.file_type = #{fileType}
and t.tree_id in
<foreach collection="treeIds" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</select>
</mapper>
......@@ -59,17 +59,25 @@
<select id="companyAdministerService" resultType="com.subsidy.vo.administer.AdministerServicesVO">
SELECT
t2.*,
t.id as service_company_id
t2.*
FROM
service_administer_mapping t
LEFT JOIN service_dict t2 ON t.service_id = t2.id
INNER JOIN (
SELECT
t2.*
FROM
service_company_mapping t
LEFT JOIN service_dict t2 ON t.service_id = t2.id
LEFT JOIN service_administer_mapping t3 ON t.service_id = t3.service_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t.company_id = #{companyId}
AND t3.administer_id = #{administerId}
) t3 ON t2.id = t3.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.administer_id = #{administerId}
order by t2.id
</select>
</mapper>
This file is too large to display.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!