Commit a5b74e9f authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents 1fd69b4e f595cafb
......@@ -78,12 +78,12 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
@Override
public IPage<TElecEmployeeInfo> getTElecEmployeeInfoPage(Page page, TElecEmployeeInfo tElecEmployeeInfo) {
return baseMapper.getTElecEmployeeInfoPage(page,tElecEmployeeInfo);
return baseMapper.getTElecEmployeeInfoPage(page, tElecEmployeeInfo);
}
/**
* @description: 解析zip文件包中的多个附件,并生成结算记录
* @param zipFile zip文件包
* @description: 解析zip文件包中的多个附件,并生成结算记录
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: huyc
* @date: 2022/6/27
......@@ -117,7 +117,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
@Override
public R getEmpInfoByCard(String idCard) {
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard,idCard)).eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING));
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isNotNull(tEmployeeInfo)) {
if (CommonConstants.ONE_INT == tEmployeeInfo.getFileStatus()) {
return R.failed("身份证号对应的档案为已减档");
......@@ -132,15 +132,16 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
baseMapper.insert(tElecEmployeeInfo);
//更新附件信息
List<String> ids;
if (Common.isNotNull(tElecEmployeeInfo.getAttaIds())){
ids = Common.initStrToList(tElecEmployeeInfo.getAttaIds(),CommonConstants.COMMA_STRING);
attaInfoMapper.updateDomainId(tElecEmployeeInfo.getId(),ids);
if (Common.isNotNull(tElecEmployeeInfo.getAttaIds())) {
ids = Common.initStrToList(tElecEmployeeInfo.getAttaIds(), CommonConstants.COMMA_STRING);
attaInfoMapper.updateDomainId(tElecEmployeeInfo.getId(), ids);
}
return R.ok();
}
/**
* zip解压
*
* @param srcFile zip源文件
* @throws RuntimeException 解压失败会抛出运行时异常
*/
......@@ -155,7 +156,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
Map<String, String> elecTypeMap;
if (dictR == null) {
return R.failed("获取字典失败!");
}else {
} else {
dictMap = dictR.getData();
elecTypeMapData = dictMap.get("data");
elecTypeMap = elecTypeMapData.get("literature_types");
......@@ -170,34 +171,54 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
zipFile = new ZipFile(srcFile, CharsetUtil.CHARSET_GBK);
Enumeration<?> entries = zipFile.entries();
Enumeration<?> entriesCheck = zipFile.entries();
Map<String,String> insMap = new HashMap<>();
List<TElecEmployeeInfo> infolist = new ArrayList<>();
List<String> list = new ArrayList<>();
Set<String> infoList =new HashSet<>();
Set<String> idCardList =new HashSet<>();
Set<String> cardType =new HashSet<>();
while (entriesCheck.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entriesCheck.nextElement();
//添加进filesName
String empInfo = entry.getName();
// 如果是文件夹,就创建个文件夹
if (!entry.isDirectory()) {
if (empInfo.length() > empInfo.lastIndexOf("/") + 1) {
String idCard = empInfo.substring(0, empInfo.indexOf("/"));
String dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/"));
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT));
if (Common.isEmpty(tEmployeeInfo)) {
return R.failed("未找到身份证对应的档案信息,身份证号:" + idCard);
}
infoList.add(empInfo);
String dataType = "";
if (empInfo.length() == empInfo.lastIndexOf("/") + 1) {
String idCard = empInfo.substring(0, empInfo.indexOf("/"));
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT));
if (Common.isEmpty(tEmployeeInfo)) {
return R.failed("未找到身份证对应的档案信息,身份证号:" + idCard);
}
idCardList.add(idCard);
if (empInfo.length() > 20) {
dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/"));
if (Common.isNotNull(elecTypeMap)) {
if (!Common.isNotNull(elecTypeMap.get(dataType))) {
return R.failed("资料类型错误:" + dataType);
}
cardType.add(idCard + "/" + dataType);
}
}
}
}
for (String idCarInfo : idCardList) {
if (!infoList.stream().anyMatch(e-> containsCheckTwo(e,idCarInfo))) {
return R.failed(idCarInfo + ":"+"证件数据不可为空");
}
}
if (cardType.size() > CommonConstants.ZERO_INT) {
for (String typeInfo :cardType) {
if (!infoList.stream().anyMatch(e -> containsCheckOne(e, typeInfo))) {
return R.failed(typeInfo + ":" + "证件数据不可为空");
}
}
}
Map<String, String> insMap = new HashMap<>();
List<TElecEmployeeInfo> infolist = new ArrayList<>();
List<String> list = new ArrayList<>();
while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement();
//添加进filesName
......@@ -226,37 +247,31 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
}
TElecEmployeeInfo tElecEmployeeInfo = new TElecEmployeeInfo();
if (empInfo.length() > empInfo.lastIndexOf("/") + 1) {
String idCard = empInfo.substring(0,empInfo.indexOf("/"));
String dataType = empInfo.substring(empInfo.indexOf("/") +1,empInfo.lastIndexOf("/"));
if (empInfo.length() > empInfo.lastIndexOf("/") + 1) {
String idCard = empInfo.substring(0, empInfo.indexOf("/"));
String dataType = empInfo.substring(empInfo.indexOf("/") + 1, empInfo.lastIndexOf("/"));
String empName = "";
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne((Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard,idCard)).eq(TEmployeeInfo::getFileStatus,CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING));
.eq(TEmployeeInfo::getEmpIdcard, idCard)).eq(TEmployeeInfo::getFileStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isNotNull(tEmployeeInfo)) {
empName = tEmployeeInfo.getEmpName();
}else {
return R.failed("未找到身份证对应的档案信息,身份证号:" + idCard);
}
tElecEmployeeInfo.setEmpIdcard(idCard);
tElecEmployeeInfo.setEmpName(empName);
if (Common.isNotNull(elecTypeMap)) {
if (Common.isNotNull(elecTypeMap.get(dataType))) {
tElecEmployeeInfo.setDataType(elecTypeMap.get(dataType));
} else {
return R.failed("资料类型错误:" + dataType);
}
}
String id = insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType);
//if (!elecTypeMap.get(dataType).equals(insMap.get(idCard))) {
if (Common.isEmpty(id)) {
infolist.add(tElecEmployeeInfo);
this.save(tElecEmployeeInfo);
insMap.put(idCard + CommonConstants.DOWN_LINE_STRING + dataType, tElecEmployeeInfo.getId());
}
list.add(insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
fileUploadService.uploadImg(fileCovertMultipartFile(targetFile),"", CommonConstants.EIGHT_INT,insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
fileUploadService.uploadImg(fileCovertMultipartFile(targetFile), "", CommonConstants.EIGHT_INT, insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
}
// 关流顺序,先打开的后关闭
......@@ -282,8 +297,9 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
/**
* File转MultipartFile
* @description: File转MultipartFile
*
* @param file 需要转换的文件
* @description: File转MultipartFile
* @return: org.springframework.web.multipart.MultipartFile
* @author: huyc
* @date: 2022/6/27
......@@ -311,6 +327,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
/**
* 根据路径删除指定的目录或文件,无论存在与否
*
* @param path 要删除的目录或文件路径
* @return 删除成功返回 true,否则返回 false
*/
......@@ -376,4 +393,18 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
//删除当前目录
return dirFile.delete();
}
public boolean containsCheckTwo(String e,String idCard) {
if (e.contains(idCard) && e.length() > 20) {
return true;
}
return false;
}
public boolean containsCheckOne(String e,String cardType) {
if (e.contains(cardType) && e.contains(CommonConstants.SPOT)) {
return true;
}
return false;
}
}
......@@ -9,7 +9,6 @@
<artifactId>yifu</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>yifu-social</artifactId>
<packaging>pom</packaging>
......
......@@ -8,6 +8,7 @@
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>yifu-social-biz</artifactId>
......@@ -26,12 +27,7 @@
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-social-api</artifactId>
<version>1.0.0</version>
</dependency>
<!--必备: 依赖api模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<!--选配: orm 模块-->
<dependency>
......@@ -67,12 +63,6 @@
<version>5.8.0</version>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-social-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
......@@ -23,14 +23,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import java.util.List;
......@@ -45,7 +45,6 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/syshouseholdinfo" )
@Tag(name = "社保户公积金户数据管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class SysHouseHoldInfoController {
private final SysHouseHoldInfoService sysHouseHoldInfoService;
......
......@@ -26,10 +26,8 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion;
import com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
......
......@@ -24,12 +24,12 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig;
import com.yifu.cloud.plus.v1.yifu.social.service.TAgentConfigService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
......@@ -45,7 +45,6 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/tagentconfig" )
@Tag(name = "预估临时政策配置表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TAgentConfigController {
private final TAgentConfigService tAgentConfigService;
......
......@@ -18,19 +18,25 @@
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.demo.entity.TAuditInfo;
import com.yifu.cloud.plus.v1.yifu.demo.service.TAuditInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TAuditInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TAuditInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -43,10 +49,9 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tauditinfo" )
@Tag(name = "审核信息表(社保、公积金、预估结算单、社保核准表、公积金核准表 、基数变更 审核记录)管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TAuditInfoController {
private final TAuditInfoService tAuditInfoService;
private final TAuditInfoService tAuditInfoService;
/**
......@@ -55,9 +60,9 @@ public class TAuditInfoController {
* @param tAuditInfo 审核信息表(社保、公积金、预估结算单、社保核准表、公积金核准表 、基数变更 审核记录)
* @return
*/
@ApiOperation(value = "简单分页查询")
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TAuditInfo>> getTAuditInfoPage(Page<TAuditInfo> page, TAuditInfo tAuditInfo) {
public R<IPage<TAuditInfo>> getTAuditInfoPage(Page<TAuditInfo> page, TAuditInfoSearchVo tAuditInfo) {
return new R<>(tAuditInfoService.getTAuditInfoPage(page,tAuditInfo));
}
/**
......@@ -68,8 +73,8 @@ public class TAuditInfoController {
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tauditinfo_get')" )
public R<List<TAuditInfo>> getTAuditInfoNoPage(@RequestBody TAuditInfo tAuditInfo) {
return R.ok(tAuditInfoService.list(Wrappers.query(tAuditInfo)));
public R<List<TAuditInfo>> getTAuditInfoNoPage(@RequestBody TAuditInfoSearchVo tAuditInfo) {
return R.ok(tAuditInfoService.noPageDiy(tAuditInfo));
}
/**
......
......@@ -20,17 +20,22 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.demo.entity.TDispatchDayConf;
import com.yifu.cloud.plus.v1.yifu.demo.service.TDispatchDayConfService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchDayConf;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchDayConfService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchDayConfSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -43,10 +48,9 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tdispatchdayconf" )
@Tag(name = "各个地市派单日期管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TDispatchDayConfController {
private final TDispatchDayConfService tDispatchDayConfService;
private final TDispatchDayConfService tDispatchDayConfService;
/**
......@@ -55,7 +59,7 @@ public class TDispatchDayConfController {
* @param tDispatchDayConf 各个地市派单日期
* @return
*/
@ApiOperation(value = "简单分页查询")
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TDispatchDayConf>> getTDispatchDayConfPage(Page<TDispatchDayConf> page, TDispatchDayConf tDispatchDayConf) {
return new R<>(tDispatchDayConfService.getTDispatchDayConfPage(page,tDispatchDayConf));
......
......@@ -18,19 +18,25 @@
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.demo.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.demo.service.TDispatchInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -43,10 +49,9 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tdispatchinfo" )
@Tag(name = "派单信息记录表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TDispatchInfoController {
private final TDispatchInfoService tDispatchInfoService;
private final TDispatchInfoService tDispatchInfoService;
/**
......@@ -55,9 +60,9 @@ public class TDispatchInfoController {
* @param tDispatchInfo 派单信息记录表
* @return
*/
@ApiOperation(value = "简单分页查询")
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TDispatchInfo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfo tDispatchInfo) {
public R<IPage<TDispatchInfo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
}
/**
......@@ -68,8 +73,8 @@ public class TDispatchInfoController {
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo_get')" )
public R<List<TDispatchInfo>> getTDispatchInfoNoPage(@RequestBody TDispatchInfo tDispatchInfo) {
return R.ok(tDispatchInfoService.list(Wrappers.query(tDispatchInfo)));
public R<List<TDispatchInfo>> getTDispatchInfoNoPage(@RequestBody TDispatchInfoSearchVo tDispatchInfo) {
return R.ok(tDispatchInfoService.noPageDiy(tDispatchInfo));
}
/**
......
......@@ -18,19 +18,25 @@
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.demo.entity.TProvidentFund;
import com.yifu.cloud.plus.v1.yifu.demo.service.TProvidentFundService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.yifu.cloud.plus.v1.yifu.social.entity.TProvidentFund;
import com.yifu.cloud.plus.v1.yifu.social.service.TProvidentFundService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TProvidentFundSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -43,10 +49,9 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tprovidentfund" )
@Tag(name = "公积金信息管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TProvidentFundController {
private final TProvidentFundService tProvidentFundService;
private final TProvidentFundService tProvidentFundService;
/**
......@@ -55,9 +60,9 @@ public class TProvidentFundController {
* @param tProvidentFund 公积金信息
* @return
*/
@ApiOperation(value = "简单分页查询")
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TProvidentFund>> getTProvidentFundPage(Page<TProvidentFund> page, TProvidentFund tProvidentFund) {
public R<IPage<TProvidentFund>> getTProvidentFundPage(Page<TProvidentFund> page, TProvidentFundSearchVo tProvidentFund) {
return new R<>(tProvidentFundService.getTProvidentFundPage(page,tProvidentFund));
}
/**
......@@ -68,8 +73,8 @@ public class TProvidentFundController {
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tprovidentfund_get')" )
public R<List<TProvidentFund>> getTProvidentFundNoPage(@RequestBody TProvidentFund tProvidentFund) {
return R.ok(tProvidentFundService.list(Wrappers.query(tProvidentFund)));
public R<List<TProvidentFund>> getTProvidentFundNoPage(@RequestBody TProvidentFundSearchVo tProvidentFund) {
return R.ok(tProvidentFundService.noPageDiy(tProvidentFund));
}
/**
......
......@@ -18,19 +18,25 @@
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.demo.entity.TSocialFundHistory;
import com.yifu.cloud.plus.v1.yifu.demo.service.TSocialFundHistoryService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundHistory;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundHistoryService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundHistorySearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -43,10 +49,9 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tsocialfundhistory" )
@Tag(name = "社保公积金调基历史记录表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TSocialFundHistoryController {
private final TSocialFundHistoryService tSocialFundHistoryService;
private final TSocialFundHistoryService tSocialFundHistoryService;
/**
......@@ -55,9 +60,9 @@ public class TSocialFundHistoryController {
* @param tSocialFundHistory 社保公积金调基历史记录表
* @return
*/
@ApiOperation(value = "简单分页查询")
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TSocialFundHistory>> getTSocialFundHistoryPage(Page<TSocialFundHistory> page, TSocialFundHistory tSocialFundHistory) {
public R<IPage<TSocialFundHistory>> getTSocialFundHistoryPage(Page<TSocialFundHistory> page, TSocialFundHistorySearchVo tSocialFundHistory) {
return new R<>(tSocialFundHistoryService.getTSocialFundHistoryPage(page,tSocialFundHistory));
}
/**
......@@ -68,8 +73,8 @@ public class TSocialFundHistoryController {
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tsocialfundhistory_get')" )
public R<List<TSocialFundHistory>> getTSocialFundHistoryNoPage(@RequestBody TSocialFundHistory tSocialFundHistory) {
return R.ok(tSocialFundHistoryService.list(Wrappers.query(tSocialFundHistory)));
public R<List<TSocialFundHistory>> getTSocialFundHistoryNoPage(@RequestBody TSocialFundHistorySearchVo tSocialFundHistory) {
return R.ok(tSocialFundHistoryService.noPageDiy(tSocialFundHistory));
}
/**
......
......@@ -18,19 +18,25 @@
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.demo.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.demo.service.TSocialFundInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -43,10 +49,9 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tsocialfundinfo" )
@Tag(name = "社保公积金查询表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TSocialFundInfoController {
private final TSocialFundInfoService tSocialFundInfoService;
private final TSocialFundInfoService tSocialFundInfoService;
/**
......@@ -55,9 +60,9 @@ public class TSocialFundInfoController {
* @param tSocialFundInfo 社保公积金查询表
* @return
*/
@ApiOperation(value = "简单分页查询")
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TSocialFundInfo>> getTSocialFundInfoPage(Page<TSocialFundInfo> page, TSocialFundInfo tSocialFundInfo) {
public R<IPage<TSocialFundInfo>> getTSocialFundInfoPage(Page<TSocialFundInfo> page, TSocialFundInfoSearchVo tSocialFundInfo) {
return new R<>(tSocialFundInfoService.getTSocialFundInfoPage(page,tSocialFundInfo));
}
/**
......@@ -68,8 +73,8 @@ public class TSocialFundInfoController {
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tsocialfundinfo_get')" )
public R<List<TSocialFundInfo>> getTSocialFundInfoNoPage(@RequestBody TSocialFundInfo tSocialFundInfo) {
return R.ok(tSocialFundInfoService.list(Wrappers.query(tSocialFundInfo)));
public R<List<TSocialFundInfo>> getTSocialFundInfoNoPage(@RequestBody TSocialFundInfoSearchVo tSocialFundInfo) {
return R.ok(tSocialFundInfoService.noPageDiy(tSocialFundInfo));
}
/**
......
......@@ -18,19 +18,25 @@
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.demo.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.demo.service.TSocialInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -43,10 +49,9 @@ import org.springframework.web.bind.annotation.*;
@RequiredArgsConstructor
@RequestMapping("/tsocialinfo" )
@Tag(name = "社保明细表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TSocialInfoController {
private final TSocialInfoService tSocialInfoService;
private final TSocialInfoService tSocialInfoService;
/**
......@@ -55,9 +60,9 @@ public class TSocialInfoController {
* @param tSocialInfo 社保明细表
* @return
*/
@ApiOperation(value = "简单分页查询")
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TSocialInfo>> getTSocialInfoPage(Page<TSocialInfo> page, TSocialInfo tSocialInfo) {
public R<IPage<TSocialInfo>> getTSocialInfoPage(Page<TSocialInfo> page, TSocialInfoSearchVo tSocialInfo) {
return new R<>(tSocialInfoService.getTSocialInfoPage(page,tSocialInfo));
}
/**
......@@ -68,8 +73,8 @@ public class TSocialInfoController {
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tsocialinfo_get')" )
public R<List<TSocialInfo>> getTSocialInfoNoPage(@RequestBody TSocialInfo tSocialInfo) {
return R.ok(tSocialInfoService.list(Wrappers.query(tSocialInfo)));
public R<List<TSocialInfo>> getTSocialInfoNoPage(@RequestBody TSocialInfoSearchVo tSocialInfo) {
return R.ok(tSocialInfoService.noPageDiy(tSocialInfo));
}
/**
......
package com.yifu.cloud.plus.v1.yifu.social.controller;
\ No newline at end of file
......@@ -20,9 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion;
/**
* 公积金政策对应的缴费比例表
......
......@@ -39,7 +39,7 @@ public interface TProvidentFundService extends IService<TProvidentFund> {
* @param tProvidentFund 公积金信息
* @return
*/
IPage<TProvidentFund> getTProvidentFundPage(Page<TProvidentFund> page, TProvidentFund tProvidentFund);
IPage<TProvidentFund> getTProvidentFundPage(Page<TProvidentFund> page, TProvidentFundSearchVo tProvidentFund);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
......
......@@ -41,7 +41,7 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
* @param tSocialFundInfo 社保公积金查询表
* @return
*/
IPage<TSocialFundInfo> getTSocialFundInfoPage(Page<TSocialFundInfo> page, TSocialFundInfo tSocialFundInfo);
IPage<TSocialFundInfo> getTSocialFundInfoPage(Page<TSocialFundInfo> page, TSocialFundInfoSearchVo tSocialFundInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
......
......@@ -16,11 +16,6 @@
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.demo.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.demo.mapper.TDispatchInfoMapper;
import com.yifu.cloud.plus.v1.yifu.demo.service.TDispatchInfoService;
import org.springframework.stereotype.Service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
......@@ -38,11 +33,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAuditInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TAuditInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TAuditInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TAuditInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TAuditInfoVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -59,6 +54,7 @@ import java.util.List;
* @author fxj
* @date 2022-07-15 11:38:05
*/
@Log4j2
@Service
public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, TDispatchInfo> implements TDispatchInfoService {
/**
......@@ -70,21 +66,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public IPage<TDispatchInfo> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfo tDispatchInfo){
return baseMapper.getTDispatchInfoPage(page,tDispatchInfo);
}
/**
* 派单信息记录表批量导入
*/
@Override
R<List<ErrorMessage>> importDiy(InputStream inputStream){
}
/**
* 派单信息记录表批量导出
* @param tDispatchInfo 派单信息记录表
* @return
*/
@Override
void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo){
public void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo){
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TDispatchInfo> list = new ArrayList<>();
......@@ -112,7 +100,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet(派单信息记录表+index).build();
WriteSheet writeSheet = EasyExcel.writerSheet("派单信息记录表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
......@@ -122,7 +110,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet(派单信息记录表+index).build();
WriteSheet writeSheet = EasyExcel.writerSheet("派单信息记录表"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
......@@ -148,7 +136,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
LambdaQueryWrapper<TDispatchInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TEmpBadRecord::getId,idList);
wrapper.in(TDispatchInfo::getId,idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0){
wrapper.last(" limit "+ searchVo.getLimitStart() +","+ searchVo.getLimitEnd());
......@@ -243,7 +231,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 数据合法情况 TODO
// 插入
insertExcel(excel,emp);
insertExcel(excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS));
}
}
......
......@@ -63,7 +63,7 @@ public class TProvidentFundServiceImpl extends ServiceImpl<TProvidentFundMapper,
* @return
*/
@Override
public IPage<TProvidentFund> getTProvidentFundPage(Page<TProvidentFund> page, TProvidentFund tProvidentFund){
public IPage<TProvidentFund> getTProvidentFundPage(Page<TProvidentFund> page, TProvidentFundSearchVo tProvidentFund){
return baseMapper.getTProvidentFundPage(page,tProvidentFund);
}
......
......@@ -63,7 +63,7 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
* @return
*/
@Override
public IPage<TSocialFundInfo> getTSocialFundInfoPage(Page<TSocialFundInfo> page, TSocialFundInfo tSocialFundInfo){
public IPage<TSocialFundInfo> getTSocialFundInfoPage(Page<TSocialFundInfo> page, TSocialFundInfoSearchVo tSocialFundInfo){
return baseMapper.getTSocialFundInfoPage(page,tSocialFundInfo);
}
......
......@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import ${package}.${moduleName}.entity.${className};
import ${package}.${moduleName}.service.${className}Service;
import ${package}.${moduleName}.vo.${className}Vo;
import ${package}.${moduleName}.vo.${className}SearchVo;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
......@@ -66,7 +68,7 @@ public class ${className}Controller {
* @param ${classname} ${comments}
* @return
*/
@ApiOperation(value = "简单分页查询")
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<${className}>> get${className}Page(Page<${className}> page, ${className}SearchVo ${classname}) {
return new R<>(${classname}Service.get${className}Page(page,${classname}));
......@@ -80,7 +82,7 @@ public class ${className}Controller {
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_get')" )
public R<List<${className}>> get${className}NoPage(@RequestBody ${className}SearchVo ${classname}) {
return R.ok(${classname}Service.list(Wrappers.query(${classname})));
return R.ok(${classname}Service.noPageDiy(${classname}));
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment