Commit 78427b22 authored by fangxinjiang's avatar fangxinjiang

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

parents b5125880 d49b33de
......@@ -180,36 +180,6 @@ public class FddContractAttachInfo extends BaseEntity {
@Schema(description ="结算主体编码")
private String departNo;
/**
* 创建者
*/
@Schema(description ="创建者")
private String createBy;
/**
* 更新人
*/
@Schema(description ="更新人")
private String updateBy;
/**
* 创建时间
*/
@Schema(description ="创建时间")
private LocalDateTime createTime;
/**
* 更新时间
*/
@Schema(description ="更新时间")
private LocalDateTime updateTime;
/**
* 创建人姓名
*/
@Schema(description ="创建人姓名")
private String createName;
/**
* 结算主体名称
*/
......
......@@ -141,35 +141,4 @@ public class FddContractInfo extends BaseEntity {
@Schema(description ="合同模板id")
private String fddTemplateId;
/**
* 创建者
*/
@Schema(description ="创建者")
private String createBy;
/**
* 更新人
*/
@Schema(description ="更新人")
private String updateBy;
/**
* 创建时间
*/
@Schema(description ="创建时间")
private LocalDateTime createTime;
/**
* 更新时间
*/
@Schema(description ="更新时间")
private LocalDateTime updateTime;
/**
* 创建人姓名
*/
@Schema(description ="创建人姓名")
private String createName;
}
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
......@@ -99,35 +100,15 @@ public class FddPersonAccount extends BaseEntity {
@Schema(description ="实名短信发送:0未发送 1已发送")
private String realMessageFlag;
/**
* 创建者
*/
@Schema(description ="创建者")
private String createBy;
/**
* 更新人
*/
@Schema(description ="更新人")
private String updateBy;
/**
* 创建时间
*/
@Schema(description ="创建时间")
private LocalDateTime createTime;
/**
* 更新时间
*/
@Schema(description ="更新时间")
private LocalDateTime updateTime;
/**
* 创建人姓名
*/
@Schema(description ="创建人姓名")
private String createName;
@Schema(description ="组织名称")
@TableField(exist = false)
private String companyName;
@Schema(description ="法大大印章ID")
@TableField(exist = false)
private String sealId;
@Schema(description ="印章名称")
@TableField(exist = false)
private String sealName;
}
......@@ -132,12 +132,12 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "客户名称", name = "subjectUnit")
private String subjectUnit;
/**
* 签订类型
* 签订类型(字典也是汉字
*/
@NotBlank(message = "签订类型不能为空")
@Length(max = 1, message = "签订类型不能超过1个字符")
@ExcelAttribute(name = "签订类型", isNotEmpty = true, errorInfo = "签订类型不能为空", maxLength = 100, isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_SITUATION_TYPE)
@Schema(description = "签订类型(字典)", name = "situation")
@ExcelAttribute(name = "签订类型", isNotEmpty = true, errorInfo = "签订类型不能为空", maxLength = 100)
@Schema(description = "签订类型(字典也是汉字)", name = "situation")
private String situation;
/**
* 合同年限
......@@ -446,4 +446,12 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
@TableField(exist = false)
@Schema(description = "创建时间起")
private String createTimeStart;
@TableField(exist = false)
@Schema(description = "创建时间止")
private String createTimeEnd;
}
......@@ -214,4 +214,8 @@ public class EmployeeExportVO extends BaseEntity {
@ExcelProperty(value = "单位编码")
private String unitNo;
@ExcelAttribute(name = "人员档案状态", readConverterExp = "0=草稿,1=已审核")
@ExcelProperty(value = "人员档案状态")
private String status;
}
......@@ -32,11 +32,17 @@ public class EmployeeConstants {
public static final String DEPT_NO_EXIST = "根据项目编码未找到项目";
public static final String CHECK_ERROR = "校验服务错误,请联系管理员!";
public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!";
public static final String SITUATION_SIX = "作废";
public static final String SITUATION_SEVEN = "终止";
/**
* 无数据可更新
**/
public static final String NO_DATA_UPDATE = "无数据可更新";
public static final String NO_DATA = "无数据";
public static final String FILE_EXPORT_EXCEPTION = "档案导出异常";
public static final String CONCART_EXPORT_EXCEPTION = "合同导出异常";
public static final String CONCART_ALL_EXPORT_EXCEPTION = "合同[合并]导出异常";
/**
* 数据更新是失败
......
......@@ -83,7 +83,7 @@ public class FddController {
fddPersonAccountService.updateById(fddPersonAccount);
}
}
return R.ok();
return R.ok(null,"成功");
}
/**
......@@ -127,7 +127,7 @@ public class FddController {
fddPersonAccount.setCompanyInfoId(companyInfo.getId());
}
fddPersonAccountService.updateById(fddPersonAccount);
return R.ok();
return R.ok(null,"成功");
}
}
}
......@@ -186,7 +186,7 @@ public class FddController {
}
});
}
return R.ok();
return R.ok(null,"成功");
}
}
} else if (StringUtils.equals(fddEvent, "reviseTask")) {
......@@ -218,7 +218,7 @@ public class FddController {
e.printStackTrace();
}
});
return R.ok();
return R.ok(null,"成功");
}
}
} else if (StringUtils.equals(fddEvent, "sign")) {
......@@ -260,7 +260,7 @@ public class FddController {
employeeContractInfoService.updateById(ec);
}
}
return R.ok();
return R.ok(null,"成功");
}else if (StringUtils.equals(fddEvent, "notifyUrlVerify")) {
return R.ok(null,"success");
}
......
......@@ -84,7 +84,7 @@ public class FddPersonAccountController {
@PostMapping
@PreAuthorize("@pms.hasPermission('demo_fddpersonaccount_add')" )
public R saveAuth(@RequestBody FddPersonAccount fddPersonAccount) {
return R.ok(fddPersonAccountService.save(fddPersonAccount));
return fddPersonAccountService.saveInfo(fddPersonAccount);
}
/**
......
......@@ -117,7 +117,7 @@ public class TEmployeeProjectController {
@PutMapping
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_edit')" )
public R updateById(@RequestBody TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.updateProject(tEmployeeProject));
return tEmployeeProjectService.updateProject(tEmployeeProject);
}
/**
......
......@@ -78,5 +78,12 @@ public interface FddPersonAccountService extends IService<FddPersonAccount> {
* @return R
*/
R<List<FddCompanyInfo>> getAllDepart(String id);
/**
* 新增员工
* @param fddPersonAccount
* @return R
*/
R saveInfo (FddPersonAccount fddPersonAccount);
}
......@@ -225,35 +225,35 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//该人员该结算主体有项目档案
if (null != tEmployeeProject) {
//如果是减项状态就复项
TEmployeeProject tEmployeeProjectCompare = employeeProjectMapper.selectById(tEmployeeProject.getId());
if (CommonConstants.ONE_INT == tEmployeeProject.getProjectStatus()) {
tEmployeeProject.setProjectStatus(CommonConstants.ZERO_INT);
employeeProjectMapper.updateById(tEmployeeProject);
TEmployeeProject tEmployeeProjectCompare = employeeProjectMapper.selectById(tEmployeeProject.getId());
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",tEmployeeProject.getId(),tEmployeeProjectCompare,tEmployeeProject);
}
//判断人员档案的状态,如果是减档状态就复档
TEmployeeInfo tEmployeeInfoCompare = employeeInfoService.getById(tEmployeeProject.getEmpId());
if (CommonConstants.ONE_INT == tEmployeeInfo.getFileStatus()) {
tEmployeeInfo.setFileStatus(CommonConstants.ZERO_INT);
employeeInfoService.updateById(tEmployeeInfo);
TEmployeeInfo tEmployeeInfoCompare = employeeInfoService.getById(tEmployeeProject.getEmpId());
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",tEmployeeInfoCompare,tEmployeeInfo);
}
TEmployeeContractInfo employeeContractInfo = employeeContractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING));
//更新项目档案
tEmployeeProject.setEmpNatrue(fddContractTemplate.getType());
tEmployeeProject.setPost(fddContractAttachInfo.getPost());
employeeProjectMapper.updateById(tEmployeeProject);
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",tEmployeeProject.getId(),tEmployeeProjectCompare,tEmployeeProject);
//更新人员档案
tEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone());
tEmployeeInfo.setEmpNatrue(fddContractTemplate.getType());
employeeInfoService.updateById(tEmployeeInfo);
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",tEmployeeInfoCompare,tEmployeeInfo);
TEmployeeContractInfo employeeContractInfo = employeeContractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeContractInfo::getSettleDomain, settleDomain.getId())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING));
//无可用合同
if (null == employeeContractInfo) {
//新增合同
......@@ -285,10 +285,12 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
employeeInfoService.updateById(tEmployeeInfo);
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",employeeInfoCompare,tEmployeeInfo);
//新增项目档案
TEmployeeProject project = new TEmployeeProject();
saveEmployeeproject(fddContractAttachInfo, settleDomain, fddContractTemplate, tEmployeeInfo,tCustomerInfo, project);
} else {
//新增人员档案
TEmployeeInfo newEmployeeInfo = new TEmployeeInfo();
newEmployeeInfo.setEmpName(fddContractAttachInfo.getEmpName());
newEmployeeInfo.setEmpIdcard(fddContractAttachInfo.getEmpIdcard());
newEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone());
......@@ -311,26 +313,8 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//新增项目档案
TEmployeeProject newTEmpProject = new TEmployeeProject();
saveEmployeeproject(fddContractAttachInfo, settleDomain, fddContractTemplate, newEmployeeInfo,tCustomerInfo, tEmployeeProject);
newTEmpProject.setEmpName(fddContractAttachInfo.getEmpName());
newTEmpProject.setEmpIdcard(fddContractAttachInfo.getEmpIdcard());
newTEmpProject.setEmpPhone(fddContractAttachInfo.getEmpPhone());
newTEmpProject.setDeptId(settleDomain.getId());
newTEmpProject.setDeptNo(settleDomain.getDepartNo());
newTEmpProject.setDeptName(settleDomain.getDepartName());
newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setUnitId(tCustomerInfo.getId());
newTEmpProject.setUnitName(tCustomerInfo.getCustomerName());
newTEmpProject.setUnitNo(tCustomerInfo.getCustomerCode());
newTEmpProject.setContractType(fddContractTemplate.getType());
newTEmpProject.setStatus(CommonConstants.dingleDigitIntArray[0]);
newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setEmpNatrue(newEmployeeInfo.getEmpNatrue());
newTEmpProject.setEmpCode(newEmployeeInfo.getEmpCode());
String empNO = getEmpNo(tEmployeeProject.getDeptNo());
newTEmpProject.setEmpNo(empNO);
//新增档案
tEmployeeProjectMapper.insert(newTEmpProject);
//新增合同
TEmployeeContractInfo newEmployeeContractInfo1 = new TEmployeeContractInfo();
saveTEmployeeContractInfo(newEmployeeContractInfo1, fddContractAttachInfo, settleDomain, fddContractTemplate, tEmployeeInfo,tCustomerInfo,newTEmpProject);
......@@ -588,6 +572,43 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
}
}
/**
* @param fddContractAttachInfo
* @param settleDomain
* @param fddContractTemplate
* @param newEmployeeInfo
* @param tEmployeeProject
* @Author: huyc
* @Date: 2022/06/01
* @Description: 新增项目档案
* @return:
**/
public void saveEmployeeproject(FddContractAttachInfo fddContractAttachInfo,TSettleDomain settleDomain,FddContractTemplate fddContractTemplate,
TEmployeeInfo newEmployeeInfo, TCustomerInfo tCustomerInfo, TEmployeeProject newTEmpProject) {
//新增项目档案
newTEmpProject.setEmpName(fddContractAttachInfo.getEmpName());
newTEmpProject.setEmpIdcard(fddContractAttachInfo.getEmpIdcard());
newTEmpProject.setEmpPhone(fddContractAttachInfo.getEmpPhone());
newTEmpProject.setDeptId(settleDomain.getId());
newTEmpProject.setDeptNo(settleDomain.getDepartNo());
newTEmpProject.setDeptName(settleDomain.getDepartName());
newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setUnitId(tCustomerInfo.getId());
newTEmpProject.setUnitName(tCustomerInfo.getCustomerName());
newTEmpProject.setUnitNo(tCustomerInfo.getCustomerCode());
newTEmpProject.setContractType(fddContractTemplate.getType());
newTEmpProject.setStatus(CommonConstants.dingleDigitIntArray[0]);
newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setEmpNatrue(newEmployeeInfo.getEmpNatrue());
newTEmpProject.setEmpCode(newEmployeeInfo.getEmpCode());
String empNO = "";
empNO = getEmpNo(newTEmpProject.getDeptNo());
newTEmpProject.setEmpNo(empNO);
//新增档案
tEmployeeProjectMapper.insert(newTEmpProject);
}
//获取员工编码
public String getEmpNo(String deptNo) {
String str = "";
......
......@@ -86,27 +86,11 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
@Override
public R<String> getPersonUnionIdUrl(FddPersonAccount fddPersonAccount) throws ApiException {
long mobileCount = this.count(Wrappers.<FddPersonAccount>query().lambda().eq(FddPersonAccount::getMoblie, fddPersonAccount.getMoblie())
.eq(FddPersonAccount::getSystemFlag, CommonConstants.ZERO_STRING));
if(mobileCount > CommonConstants.ZERO_INT){
return R.failed("手机号已存在");
}
long idCardCount = this.count(Wrappers.<FddPersonAccount>query().lambda().eq(FddPersonAccount::getIdCard, fddPersonAccount.getIdCard())
.eq(FddPersonAccount::getSystemFlag, CommonConstants.ZERO_STRING));
if(idCardCount > CommonConstants.ZERO_INT){
return R.failed("身份证号已存在");
}
FddPersonAccount entity = new FddPersonAccount();
entity.setIdCard(fddPersonAccount.getIdCard());
entity.setName(fddPersonAccount.getName());
entity.setMoblie(fddPersonAccount.getMoblie());
entity.setSystemFlag(CommonConstants.ZERO_STRING);
this.save(entity);
//发送请求
GetPersonUnionIdUrlReq req = new GetPersonUnionIdUrlReq();
req.setToken(fddUtil.getToken());
req.setClientId(entity.getId());
req.setClientId(fddPersonAccount.getId());
req.setAuthScheme(CommonConstants.ZERO_INT);
NoticeReq notice = new NoticeReq();
//短信发送实名认证链接
......@@ -131,7 +115,8 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
reqLogService.saveLog(Thread.currentThread().getStackTrace()[1].getClassName(), Thread.currentThread().getStackTrace()[1].getMethodName(), req, rsp);
//校验参数
if (StringUtils.equals(rsp.getCode(), FddUtil.SUCCESS)) {
entity.setRealMessageFlag(CommonConstants.ONE_STRING);
fddPersonAccount.setRealMessageFlag(CommonConstants.ONE_STRING);
baseMapper.updateById(fddPersonAccount);
return new R<>(rsp.getData().getNextUrl());
} else {
return R.failed(rsp.getMsg());
......@@ -285,4 +270,20 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
return new R<>(fddCompanyInfoList);
}
@Override
public R saveInfo(FddPersonAccount fddPersonAccount) {
long mobileCount = this.count(Wrappers.<FddPersonAccount>query().lambda().eq(FddPersonAccount::getMoblie, fddPersonAccount.getMoblie())
.eq(FddPersonAccount::getSystemFlag, CommonConstants.ZERO_STRING));
if(mobileCount>CommonConstants.ZERO_INT){
return R.failed("手机号已存在");
}
long idCardCount = this.count(Wrappers.<FddPersonAccount>query().lambda().eq(FddPersonAccount::getIdCard, fddPersonAccount.getIdCard())
.eq(FddPersonAccount::getSystemFlag, CommonConstants.ZERO_STRING));
if(idCardCount>CommonConstants.ZERO_INT){
return R.failed("身份证号已存在");
}
baseMapper.insert(fddPersonAccount);
return R.ok();
}
}
......@@ -123,6 +123,17 @@ public class FddSealInfoServiceImpl extends ServiceImpl<FddSealInfoMapper, FddSe
@Override
public R<String> sealAuth(List<String> id, String fddPersonAccountId) throws ApiException {
// //查询机构印章信息
// CompanySealListReq companySealListReq = new CompanySealListReq();
// companySealListReq.setToken(fddUtil.getToken());
// companySealListReq.setSealInfo(1);
// OwnerInfo owner1 = new OwnerInfo();
// owner1.setUnionId("6ecf01effd8647528255a72c9014ce08");
// companySealListReq.setOwner(owner1);
// SealClient sealClient1 = new SealClient(fddUtil.getFadadaApiClient());
// BaseRsp<CompanySealListRsp> rsp1 = sealClient1.companySealList(companySealListReq);
// CompanySealListRsp data1 = rsp1.getData();
for (String sId : id) {
FddSealInfo entity = this.getById(sId);
if (entity == null) {
......
......@@ -26,14 +26,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeContractConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
......@@ -409,8 +407,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) {
// 作废、终止,不变为在用
if (Common.isEmpty(contractInfo.getSituation())
|| (!CommonConstants.dingleDigitStrArray[6].equals(contractInfo.getSituation())
&& !CommonConstants.dingleDigitStrArray[7].equals(contractInfo.getSituation()))) {
|| (!EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation())
&& !EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation()))) {
tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING);
}
tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now());
......@@ -736,31 +734,32 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
String fileName = "员工合同批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo);
ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
ServletOutputStream out = null;
list = new ArrayList<>();
}
try {
ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class);
for (EmployeeContractExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeContractExportVO.class).includeColumnFiledNames(contractInfo.getExportFields())
.sheet("员工合同").doWrite(list);
out.flush();
} catch (Exception e) {
log.error("员工合同导出异常:", e);
} finally {
try {
ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class);
for (EmployeeContractExportVO vo : list) {
util.convertEntity(vo, null, null, null);
if (out != null) {
out.close();
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeContractExportVO.class).includeColumnFiledNames(contractInfo.getExportFields())
.sheet("员工合同").doWrite(list);
out.flush();
} catch (Exception e) {
} catch (IOException e) {
log.error("员工合同导出异常:", e);
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException e) {
log.error("员工合同导出异常:", e);
}
}
}
}
......@@ -775,33 +774,35 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
String fileName = "员工合同批量导出[合并]" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo);
ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
ServletOutputStream out = null;
list = new ArrayList<>();
}
try {
ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class);
for (EmployeeContractExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeContractExportVO.class).includeColumnFiledNames(contractInfo.getExportFields())
.sheet("员工合同[合并]").doWrite(list);
out.flush();
} catch (Exception e) {
log.error(EmployeeConstants.CONCART_ALL_EXPORT_EXCEPTION, e);
} finally {
try {
ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class);
for (EmployeeContractExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeContractExportVO.class).includeColumnFiledNames(contractInfo.getExportFields())
.sheet("员工合同[合并]").doWrite(list);
out.flush();
} catch (Exception e) {
log.error("员工合同[合并]导出异常:", e);
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException e) {
log.error("员工合同[合并]导出异常:", e);
if (out != null) {
out.close();
}
} catch (IOException e) {
log.error(EmployeeConstants.CONCART_ALL_EXPORT_EXCEPTION, e);
}
}
}
}
......
......@@ -50,6 +50,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.bouncycastle.jcajce.provider.asymmetric.ec.KeyFactorySpi;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
......@@ -1968,31 +1969,32 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
//获取要导出的列表
employeeInfo.setFileStatus(CommonConstants.ZERO_INT);
List<EmployeeExportVO> list = baseMapper.getTEmployeeExportList(employeeInfo);
ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
ServletOutputStream out = null;
list = new ArrayList<>();
}
try {
ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeExportVO.class).includeColumnFiledNames(employeeInfo.getExportFields())
.sheet("人员档案").doWrite(list);
out.flush();
} catch (Exception e) {
log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
} finally {
try {
ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeExportVO.class).includeColumnFiledNames(employeeInfo.getExportFields())
.sheet("人员档案").doWrite(list);
out.flush();
} catch (Exception e) {
log.error("人员档案导出异常:", e);
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException e) {
log.error("档案导出异常:", e);
if (out != null) {
out.close();
}
} catch (IOException e) {
log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
}
}
}
......@@ -2008,31 +2010,32 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
//获取要导出的列表
employeeInfo.setFileStatus(CommonConstants.ONE_INT);
List<EmployeeExportVO> list = baseMapper.getTEmployeeLeaveExportList(employeeInfo);
ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
ServletOutputStream out = null;
list = new ArrayList<>();
}
try {
ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeExportVO.class).includeColumnFiledNames(employeeInfo.getExportFields())
.sheet("离职档案").doWrite(list);
out.flush();
} catch (Exception e) {
log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
} finally {
try {
ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeExportVO.class).includeColumnFiledNames(employeeInfo.getExportFields())
.sheet("离职档案").doWrite(list);
out.flush();
} catch (Exception e) {
log.error("离职档案导出异常:", e);
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException e) {
log.error("档案导出异常:", e);
if (out != null) {
out.close();
}
} catch (IOException e) {
log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
}
}
}
......
......@@ -119,6 +119,6 @@
1=1
<include refid="fddPersonAccount_where"/>
</where>
GROUP BY a.NAME
GROUP BY a.ID_CARD ORDER BY a.CREATE_TIME desc
</select>
</mapper>
......@@ -369,6 +369,13 @@
AND a.CONTRACT_SUB_NAME = #{tEmployeeContractInfo.contractSubName}
</if>
<if test="tEmployeeContractInfo.createTimeStart != null and tEmployeeContractInfo.createTimeStart.trim() != ''">
AND a.CREATE_TIME >= #{tEmployeeContractInfo.createTimeStart}
</if>
<if test="tEmployeeContractInfo.createTimeEnd != null and tEmployeeContractInfo.createTimeEnd.trim() != ''">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{tEmployeeContractInfo.createTimeEnd}
</if>
</if>
</sql>
<!--tEmployeeContractInfo简单分页查询-->
......
......@@ -123,6 +123,7 @@
<result property="leaveTime" column="LEAVE_TIME"/>
<result property="leaveReason" column="LEAVE_REASON"/>
<result property="leaveRemark" column="LEAVE_REMARK"/>
<result property="status" column="STATUS"/>
</resultMap>
<sql id="baseParam">
......@@ -216,6 +217,7 @@
a.SALARY_STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
a.STATUS,
a.CONTACT_ADDRESS
</sql>
......
......@@ -452,6 +452,15 @@ public class SysBaseSetInfo extends BaseEntity {
@ExcelProperty("社保户名称")
private String departName;
@ExcelAttribute(name = "执行月份")
@Schema(description = "执行月份")
@ExcelProperty("执行月份")
private String doMonth;
@Schema(description = "适用月")
@TableField(exist = false)
private String applyDate;
@Schema(description = "公积金比例List(保存时前端传参用)")
@TableField(exist = false)
private List<SysPayProportion> fundProList;
......
......@@ -34,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
......@@ -68,13 +69,28 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
return R.failed("获取用户登录信息失败!");
}
SysBaseSetInfo baseSetInfo = null;
SysBaseSetInfo lastBase = null;
if (null != sysBaseSetInfo.getTown()) {
baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getTown, sysBaseSetInfo.getTown())
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.or()
.isNull(SysBaseSetInfo::getApplyEndDate)))
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.last(CommonConstants.LAST_ONE_SQL));
lastBase = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getTown, sysBaseSetInfo.getTown())
.isNull(SysBaseSetInfo::getApplyEndDate)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysBaseSetInfo.getCity() && null == sysBaseSetInfo.getTown()) {
......@@ -83,8 +99,23 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getCity, sysBaseSetInfo.getCity())
.isNull(SysBaseSetInfo::getTown)
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.or()
.isNull(SysBaseSetInfo::getApplyEndDate)))
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.last(CommonConstants.LAST_ONE_SQL));
lastBase = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getCity, sysBaseSetInfo.getCity())
.isNull(SysBaseSetInfo::getTown)
.isNull(SysBaseSetInfo::getApplyEndDate)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysBaseSetInfo.getProvince() && null == sysBaseSetInfo.getCity()) {
......@@ -93,14 +124,34 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getProvince, sysBaseSetInfo.getProvince())
.isNull(SysBaseSetInfo::getCity)
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.or()
.isNull(SysBaseSetInfo::getApplyEndDate)))
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.last(CommonConstants.LAST_ONE_SQL));
lastBase = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getProvince, sysBaseSetInfo.getProvince())
.isNull(SysBaseSetInfo::getCity)
.isNull(SysBaseSetInfo::getApplyEndDate)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != baseSetInfo) {
return R.failed("对应户、地市、有效期的基数配置已存在!");
}
// 将上一个无截止月的增加截止月
if (lastBase != null) {
lastBase.setApplyEndDate(sysBaseSetInfo.getApplyStartDate());
this.updateById(lastBase);
}
this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo);
return R.ok();
}
......@@ -116,15 +167,23 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
return R.failed("根据id未找到基数配置!" + sysBaseSetInfo.getId());
}
SysBaseSetInfo baseSetInfo = null;
// where (b.apply_start_date < '2023-01' and ( b.apply_end_date > '2023-01' or b.apply_end_date is null) ) or b.apply_start_date > '2023-01'
if (null != sysBaseSetInfo.getTown()) {
baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getTown, sysBaseSetInfo.getTown())
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT)
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.or()
.isNull(SysBaseSetInfo::getApplyEndDate)))
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysBaseSetInfo.getCity() && null == sysBaseSetInfo.getTown()) {
......@@ -133,8 +192,15 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getCity, sysBaseSetInfo.getCity())
.isNull(SysBaseSetInfo::getTown)
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.or()
.isNull(SysBaseSetInfo::getApplyEndDate)))
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
......@@ -145,8 +211,15 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getProvince, sysBaseSetInfo.getProvince())
.isNull(SysBaseSetInfo::getCity)
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.or()
.isNull(SysBaseSetInfo::getApplyEndDate)))
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
......
......@@ -75,6 +75,7 @@
<result property="insuranceIsLatestCardinality" column="INSURANCE_IS_LATEST_CARDINALITY"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="departName" column="DEPART_NAME"/>
<result property="doMonth" column="DO_MONTH"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
......@@ -82,65 +83,63 @@
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a
.
ID
,
a.PROVINCE,
a.CITY,
a.TOWN,
a.APPLY_START_DATE,
a.APPLY_END_DATE,
a.UPPER_LIMIT,
a.LOWER_LIMIT,
a.PAY_POLICY,
a.BASE_TYPE,
a.UNIT_PERSION_PRO,
a.UNIT_MEDICAL_PRO,
a.UNIT_UNEMPLOYMENT_PRO,
a.UNIT_INJURY_PRO,
a.UNIT_BIRTH_PRO,
a.UNIT_PRO_SUM,
a.PERSONAL_PERSION_PRO,
a.PERSONAL_MEDICAL_PRO,
a.PERSONAL_UNEMPLOYMENT_PRO,
a.PERSONAL_PRO_SUM,
a.IS_ILLNESS,
a.IS_CHARGE_PERSONAL,
a.CHARGE_COMPANY,
a.CHARGE_PERSONAL,
a.COLLECT_TYPE,
a.PAY_COMPANY,
a.PAY_COMPANY_PRO,
a.PAY_PERSONAL,
a.PAY_PERSONAL_PRO,
a.COLLECT_MOTH,
a.FUND_PAY_LOWER_LIMIT,
a.FUND_PAY_UPPER_LIMIT,
a.FUND_PAY_POINT,
a.FUND_PAY_TYPE,
a.HOUSING_FUND_COMPAMY_PRO,
a.HOUSING_FUND_PERSONAL_PRO,
a.DEPART_ID,
a.STATUS,
a.VALUE_TYPE,
a.CAN_OVERPAY,
a.OVERPAY_NUMBER,
a.HAVE_THIS_MONTH,
a.INSURANCE_PENSION,
a.INSURANCE_MEDICAL,
a.INSURANCE_UNEMPLOYMENT,
a.INSURANCE_INJURY,
a.INSURANCE_BIRTH,
a.INSURANCE_BIGAILMENT,
a.INSURANCE_IS_LATEST_CARDINALITY,
a.DELETE_FLAG,
a.DEPART_NAME,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME
a.ID,
a.PROVINCE,
a.CITY,
a.TOWN,
a.APPLY_START_DATE,
a.APPLY_END_DATE,
a.UPPER_LIMIT,
a.LOWER_LIMIT,
a.PAY_POLICY,
a.BASE_TYPE,
a.UNIT_PERSION_PRO,
a.UNIT_MEDICAL_PRO,
a.UNIT_UNEMPLOYMENT_PRO,
a.UNIT_INJURY_PRO,
a.UNIT_BIRTH_PRO,
a.UNIT_PRO_SUM,
a.PERSONAL_PERSION_PRO,
a.PERSONAL_MEDICAL_PRO,
a.PERSONAL_UNEMPLOYMENT_PRO,
a.PERSONAL_PRO_SUM,
a.IS_ILLNESS,
a.IS_CHARGE_PERSONAL,
a.CHARGE_COMPANY,
a.CHARGE_PERSONAL,
a.COLLECT_TYPE,
a.PAY_COMPANY,
a.PAY_COMPANY_PRO,
a.PAY_PERSONAL,
a.PAY_PERSONAL_PRO,
a.COLLECT_MOTH,
a.FUND_PAY_LOWER_LIMIT,
a.FUND_PAY_UPPER_LIMIT,
a.FUND_PAY_POINT,
a.FUND_PAY_TYPE,
a.HOUSING_FUND_COMPAMY_PRO,
a.HOUSING_FUND_PERSONAL_PRO,
a.DEPART_ID,
a.STATUS,
a.VALUE_TYPE,
a.CAN_OVERPAY,
a.OVERPAY_NUMBER,
a.HAVE_THIS_MONTH,
a.INSURANCE_PENSION,
a.INSURANCE_MEDICAL,
a.INSURANCE_UNEMPLOYMENT,
a.INSURANCE_INJURY,
a.INSURANCE_BIRTH,
a.INSURANCE_BIGAILMENT,
a.INSURANCE_IS_LATEST_CARDINALITY,
a.DELETE_FLAG,
a.DEPART_NAME,
a.DO_MONTH,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME
</sql>
<sql id="sysBaseSetInfo_where">
<if test="sysBaseSetInfo != null">
......@@ -295,7 +294,13 @@
AND a.DELETE_FLAG = #{sysBaseSetInfo.deleteFlag}
</if>
<if test="sysBaseSetInfo.departName != null and sysBaseSetInfo.departName.trim() != ''">
AND a.DEPART_NAME = #{sysBaseSetInfo.departName}
AND a.DEPART_NAME like concat('%',#{sysBaseSetInfo.departName},'%')
</if>
<if test="sysBaseSetInfo.applyDate != null and sysBaseSetInfo.applyDate.trim() != ''">
AND (
a.APPLY_START_DATE <![CDATA[ <= ]]> #{sysBaseSetInfo.applyDate}
and (a.APPLY_END_DATE is null or a.APPLY_END_DATE >= #{sysBaseSetInfo.applyDate})
)
</if>
<if test="sysBaseSetInfo.createBy != null and sysBaseSetInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{sysBaseSetInfo.createBy}
......
......@@ -70,7 +70,7 @@
AND a.ORGAN_ID = #{sysHouseHoldInfo.organId}
</if>
<if test="sysHouseHoldInfo.name != null and sysHouseHoldInfo.name.trim() != ''">
AND a.NAME = #{sysHouseHoldInfo.name}
AND a.NAME like CONCAT('%',#{sysHouseHoldInfo.name},'%')
</if>
<if test="sysHouseHoldInfo.createTime != null">
AND a.CREATE_TIME = #{sysHouseHoldInfo.createTime}
......@@ -125,5 +125,6 @@
1=1
<include refid="sysHouseHoldInfo_where"/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
......@@ -123,7 +123,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
String nowSql;
// 处理创建人
if (menuCreateList != null && !menuCreateList.isEmpty()) {
nowSql = " or a.create_by = #create_by ";
nowSql = " or a.create_by = '#create_by' ";
for (SysDataAuthMenuRel menu : menuCreateList) {
mapSql = authSqlMap.get(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId());
if (!Common.isEmpty(mapSql)) {
......@@ -334,7 +334,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
String nowSql;
// 处理创建人
if (menuCreateList != null && !menuCreateList.isEmpty()) {
nowSql = " or a.create_by = #create_by ";
nowSql = " or a.create_by = '#create_by' ";
sysDataAuth.setIsCreateAuth(1);
for (SysDataAuthMenuRel menu : menuCreateList) {
mapSql = authSqlMap.get(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId());
......
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