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 { ...@@ -180,36 +180,6 @@ public class FddContractAttachInfo extends BaseEntity {
@Schema(description ="结算主体编码") @Schema(description ="结算主体编码")
private String departNo; 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 { ...@@ -141,35 +141,4 @@ public class FddContractInfo extends BaseEntity {
@Schema(description ="合同模板id") @Schema(description ="合同模板id")
private String fddTemplateId; 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 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
...@@ -99,35 +100,15 @@ public class FddPersonAccount extends BaseEntity { ...@@ -99,35 +100,15 @@ public class FddPersonAccount extends BaseEntity {
@Schema(description ="实名短信发送:0未发送 1已发送") @Schema(description ="实名短信发送:0未发送 1已发送")
private String realMessageFlag; private String realMessageFlag;
/** @Schema(description ="组织名称")
* 创建者 @TableField(exist = false)
*/ private String companyName;
@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 ="法大大印章ID")
@TableField(exist = false)
private String sealId;
@Schema(description ="印章名称")
@TableField(exist = false)
private String sealName;
} }
...@@ -132,12 +132,12 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -132,12 +132,12 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "客户名称", name = "subjectUnit") @Schema(description = "客户名称", name = "subjectUnit")
private String subjectUnit; private String subjectUnit;
/** /**
* 签订类型 * 签订类型(字典也是汉字
*/ */
@NotBlank(message = "签订类型不能为空") @NotBlank(message = "签订类型不能为空")
@Length(max = 1, message = "签订类型不能超过1个字符") @Length(max = 1, message = "签订类型不能超过1个字符")
@ExcelAttribute(name = "签订类型", isNotEmpty = true, errorInfo = "签订类型不能为空", maxLength = 100, isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_SITUATION_TYPE) @ExcelAttribute(name = "签订类型", isNotEmpty = true, errorInfo = "签订类型不能为空", maxLength = 100)
@Schema(description = "签订类型(字典)", name = "situation") @Schema(description = "签订类型(字典也是汉字)", name = "situation")
private String situation; private String situation;
/** /**
* 合同年限 * 合同年限
...@@ -446,4 +446,12 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -446,4 +446,12 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "导出的表头的Set") @Schema(description = "导出的表头的Set")
private Set<String> exportFields; 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 { ...@@ -214,4 +214,8 @@ public class EmployeeExportVO extends BaseEntity {
@ExcelProperty(value = "单位编码") @ExcelProperty(value = "单位编码")
private String unitNo; private String unitNo;
@ExcelAttribute(name = "人员档案状态", readConverterExp = "0=草稿,1=已审核")
@ExcelProperty(value = "人员档案状态")
private String status;
} }
...@@ -32,11 +32,17 @@ public class EmployeeConstants { ...@@ -32,11 +32,17 @@ public class EmployeeConstants {
public static final String DEPT_NO_EXIST = "根据项目编码未找到项目"; public static final String DEPT_NO_EXIST = "根据项目编码未找到项目";
public static final String CHECK_ERROR = "校验服务错误,请联系管理员!"; public static final String CHECK_ERROR = "校验服务错误,请联系管理员!";
public static final String CHECK_NO_RESPONSE = "校验服务器未返回,请联系管理员!"; 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_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 { ...@@ -83,7 +83,7 @@ public class FddController {
fddPersonAccountService.updateById(fddPersonAccount); fddPersonAccountService.updateById(fddPersonAccount);
} }
} }
return R.ok(); return R.ok(null,"成功");
} }
/** /**
...@@ -127,7 +127,7 @@ public class FddController { ...@@ -127,7 +127,7 @@ public class FddController {
fddPersonAccount.setCompanyInfoId(companyInfo.getId()); fddPersonAccount.setCompanyInfoId(companyInfo.getId());
} }
fddPersonAccountService.updateById(fddPersonAccount); fddPersonAccountService.updateById(fddPersonAccount);
return R.ok(); return R.ok(null,"成功");
} }
} }
} }
...@@ -186,7 +186,7 @@ public class FddController { ...@@ -186,7 +186,7 @@ public class FddController {
} }
}); });
} }
return R.ok(); return R.ok(null,"成功");
} }
} }
} else if (StringUtils.equals(fddEvent, "reviseTask")) { } else if (StringUtils.equals(fddEvent, "reviseTask")) {
...@@ -218,7 +218,7 @@ public class FddController { ...@@ -218,7 +218,7 @@ public class FddController {
e.printStackTrace(); e.printStackTrace();
} }
}); });
return R.ok(); return R.ok(null,"成功");
} }
} }
} else if (StringUtils.equals(fddEvent, "sign")) { } else if (StringUtils.equals(fddEvent, "sign")) {
...@@ -260,7 +260,7 @@ public class FddController { ...@@ -260,7 +260,7 @@ public class FddController {
employeeContractInfoService.updateById(ec); employeeContractInfoService.updateById(ec);
} }
} }
return R.ok(); return R.ok(null,"成功");
}else if (StringUtils.equals(fddEvent, "notifyUrlVerify")) { }else if (StringUtils.equals(fddEvent, "notifyUrlVerify")) {
return R.ok(null,"success"); return R.ok(null,"success");
} }
......
...@@ -84,7 +84,7 @@ public class FddPersonAccountController { ...@@ -84,7 +84,7 @@ public class FddPersonAccountController {
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('demo_fddpersonaccount_add')" ) @PreAuthorize("@pms.hasPermission('demo_fddpersonaccount_add')" )
public R saveAuth(@RequestBody FddPersonAccount fddPersonAccount) { public R saveAuth(@RequestBody FddPersonAccount fddPersonAccount) {
return R.ok(fddPersonAccountService.save(fddPersonAccount)); return fddPersonAccountService.saveInfo(fddPersonAccount);
} }
/** /**
......
...@@ -117,7 +117,7 @@ public class TEmployeeProjectController { ...@@ -117,7 +117,7 @@ public class TEmployeeProjectController {
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_edit')" ) @PreAuthorize("@pms.hasPermission('archives_temployeeproject_edit')" )
public R updateById(@RequestBody TEmployeeProject tEmployeeProject) { 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> { ...@@ -78,5 +78,12 @@ public interface FddPersonAccountService extends IService<FddPersonAccount> {
* @return R * @return R
*/ */
R<List<FddCompanyInfo>> getAllDepart(String id); R<List<FddCompanyInfo>> getAllDepart(String id);
/**
* 新增员工
* @param fddPersonAccount
* @return R
*/
R saveInfo (FddPersonAccount fddPersonAccount);
} }
...@@ -225,35 +225,35 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -225,35 +225,35 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//该人员该结算主体有项目档案 //该人员该结算主体有项目档案
if (null != tEmployeeProject) { if (null != tEmployeeProject) {
//如果是减项状态就复项 //如果是减项状态就复项
TEmployeeProject tEmployeeProjectCompare = employeeProjectMapper.selectById(tEmployeeProject.getId());
if (CommonConstants.ONE_INT == tEmployeeProject.getProjectStatus()) { if (CommonConstants.ONE_INT == tEmployeeProject.getProjectStatus()) {
tEmployeeProject.setProjectStatus(CommonConstants.ZERO_INT); 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()) { if (CommonConstants.ONE_INT == tEmployeeInfo.getFileStatus()) {
tEmployeeInfo.setFileStatus(CommonConstants.ZERO_INT); 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.setEmpNatrue(fddContractTemplate.getType());
tEmployeeProject.setPost(fddContractAttachInfo.getPost()); tEmployeeProject.setPost(fddContractAttachInfo.getPost());
employeeProjectMapper.updateById(tEmployeeProject); employeeProjectMapper.updateById(tEmployeeProject);
//保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",tEmployeeProject.getId(),tEmployeeProjectCompare,tEmployeeProject);
//更新人员档案 //更新人员档案
tEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone()); tEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone());
tEmployeeInfo.setEmpNatrue(fddContractTemplate.getType()); tEmployeeInfo.setEmpNatrue(fddContractTemplate.getType());
employeeInfoService.updateById(tEmployeeInfo); 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) { if (null == employeeContractInfo) {
//新增合同 //新增合同
...@@ -285,10 +285,12 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -285,10 +285,12 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
employeeInfoService.updateById(tEmployeeInfo); employeeInfoService.updateById(tEmployeeInfo);
//保存操作记录 //保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",employeeInfoCompare,tEmployeeInfo); tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",employeeInfoCompare,tEmployeeInfo);
//新增项目档案
TEmployeeProject project = new TEmployeeProject();
saveEmployeeproject(fddContractAttachInfo, settleDomain, fddContractTemplate, tEmployeeInfo,tCustomerInfo, project);
} else { } else {
//新增人员档案 //新增人员档案
TEmployeeInfo newEmployeeInfo = new TEmployeeInfo(); TEmployeeInfo newEmployeeInfo = new TEmployeeInfo();
newEmployeeInfo.setEmpName(fddContractAttachInfo.getEmpName()); newEmployeeInfo.setEmpName(fddContractAttachInfo.getEmpName());
newEmployeeInfo.setEmpIdcard(fddContractAttachInfo.getEmpIdcard()); newEmployeeInfo.setEmpIdcard(fddContractAttachInfo.getEmpIdcard());
newEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone()); newEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone());
...@@ -311,26 +313,8 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -311,26 +313,8 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//新增项目档案 //新增项目档案
TEmployeeProject newTEmpProject = new TEmployeeProject(); 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(); TEmployeeContractInfo newEmployeeContractInfo1 = new TEmployeeContractInfo();
saveTEmployeeContractInfo(newEmployeeContractInfo1, fddContractAttachInfo, settleDomain, fddContractTemplate, tEmployeeInfo,tCustomerInfo,newTEmpProject); saveTEmployeeContractInfo(newEmployeeContractInfo1, fddContractAttachInfo, settleDomain, fddContractTemplate, tEmployeeInfo,tCustomerInfo,newTEmpProject);
...@@ -588,6 +572,43 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -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) { public String getEmpNo(String deptNo) {
String str = ""; String str = "";
......
...@@ -86,27 +86,11 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap ...@@ -86,27 +86,11 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
@Override @Override
public R<String> getPersonUnionIdUrl(FddPersonAccount fddPersonAccount) throws ApiException { 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(); GetPersonUnionIdUrlReq req = new GetPersonUnionIdUrlReq();
req.setToken(fddUtil.getToken()); req.setToken(fddUtil.getToken());
req.setClientId(entity.getId()); req.setClientId(fddPersonAccount.getId());
req.setAuthScheme(CommonConstants.ZERO_INT); req.setAuthScheme(CommonConstants.ZERO_INT);
NoticeReq notice = new NoticeReq(); NoticeReq notice = new NoticeReq();
//短信发送实名认证链接 //短信发送实名认证链接
...@@ -131,7 +115,8 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap ...@@ -131,7 +115,8 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
reqLogService.saveLog(Thread.currentThread().getStackTrace()[1].getClassName(), Thread.currentThread().getStackTrace()[1].getMethodName(), req, rsp); reqLogService.saveLog(Thread.currentThread().getStackTrace()[1].getClassName(), Thread.currentThread().getStackTrace()[1].getMethodName(), req, rsp);
//校验参数 //校验参数
if (StringUtils.equals(rsp.getCode(), FddUtil.SUCCESS)) { 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()); return new R<>(rsp.getData().getNextUrl());
} else { } else {
return R.failed(rsp.getMsg()); return R.failed(rsp.getMsg());
...@@ -285,4 +270,20 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap ...@@ -285,4 +270,20 @@ public class FddPersonAccountServiceImpl extends ServiceImpl<FddPersonAccountMap
return new R<>(fddCompanyInfoList); 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 ...@@ -123,6 +123,17 @@ public class FddSealInfoServiceImpl extends ServiceImpl<FddSealInfoMapper, FddSe
@Override @Override
public R<String> sealAuth(List<String> id, String fddPersonAccountId) throws ApiException { 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) { for (String sId : id) {
FddSealInfo entity = this.getById(sId); FddSealInfo entity = this.getById(sId);
if (entity == null) { if (entity == null) {
......
...@@ -26,14 +26,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -26,14 +26,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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.constants.EmployeeContractConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; 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.mapper.TEmployeeContractInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.*; 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.*;
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.common.core.constant.CacheConstants; 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.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
...@@ -409,8 +407,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -409,8 +407,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) { if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.dingleDigitIntArray[2]) {
// 作废、终止,不变为在用 // 作废、终止,不变为在用
if (Common.isEmpty(contractInfo.getSituation()) if (Common.isEmpty(contractInfo.getSituation())
|| (!CommonConstants.dingleDigitStrArray[6].equals(contractInfo.getSituation()) || (!EmployeeConstants.SITUATION_SIX.equals(contractInfo.getSituation())
&& !CommonConstants.dingleDigitStrArray[7].equals(contractInfo.getSituation()))) { && !EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation()))) {
tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING); tEmployeeContractInfo.setInUse(CommonConstants.ZERO_STRING);
} }
tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now()); tEmployeeContractInfo.setAuditTimeLast(LocalDateTime.now());
...@@ -736,8 +734,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -736,8 +734,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
String fileName = "员工合同批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "员工合同批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo); List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo);
if (list != null && !list.isEmpty()) {
ServletOutputStream out = null; ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
list = new ArrayList<>();
}
try { try {
ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class); ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class);
for (EmployeeContractExportVO vo : list) { for (EmployeeContractExportVO vo : list) {
...@@ -764,7 +764,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -764,7 +764,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
} }
} }
}
/** /**
* 导出历史合并 * 导出历史合并
...@@ -775,8 +774,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -775,8 +774,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
String fileName = "员工合同批量导出[合并]" + DateUtil.getThisTime() + ".xlsx"; String fileName = "员工合同批量导出[合并]" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo); List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo);
if (list != null && !list.isEmpty()) {
ServletOutputStream out = null; ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
list = new ArrayList<>();
}
try { try {
ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class); ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class);
for (EmployeeContractExportVO vo : list) { for (EmployeeContractExportVO vo : list) {
...@@ -791,17 +792,17 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -791,17 +792,17 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
.sheet("员工合同[合并]").doWrite(list); .sheet("员工合同[合并]").doWrite(list);
out.flush(); out.flush();
} catch (Exception e) { } catch (Exception e) {
log.error("员工合同[合并]导出异常:", e); log.error(EmployeeConstants.CONCART_ALL_EXPORT_EXCEPTION, e);
} finally { } finally {
try { try {
if (out != null) { if (out != null) {
out.close(); out.close();
} }
} catch (IOException e) { } catch (IOException e) {
log.error("员工合同[合并]导出异常:", e); log.error(EmployeeConstants.CONCART_ALL_EXPORT_EXCEPTION, e);
}
} }
} }
} }
} }
......
...@@ -50,6 +50,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; ...@@ -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 com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.bouncycastle.jcajce.provider.asymmetric.ec.KeyFactorySpi;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
...@@ -1968,8 +1969,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -1968,8 +1969,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
//获取要导出的列表 //获取要导出的列表
employeeInfo.setFileStatus(CommonConstants.ZERO_INT); employeeInfo.setFileStatus(CommonConstants.ZERO_INT);
List<EmployeeExportVO> list = baseMapper.getTEmployeeExportList(employeeInfo); List<EmployeeExportVO> list = baseMapper.getTEmployeeExportList(employeeInfo);
if (list != null && !list.isEmpty()) {
ServletOutputStream out = null; ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
list = new ArrayList<>();
}
try { try {
ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class); ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo : list) { for (EmployeeExportVO vo : list) {
...@@ -1984,15 +1987,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -1984,15 +1987,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.sheet("人员档案").doWrite(list); .sheet("人员档案").doWrite(list);
out.flush(); out.flush();
} catch (Exception e) { } catch (Exception e) {
log.error("人员档案导出异常:", e); log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
} finally { } finally {
try { try {
if (out != null) { if (out != null) {
out.close(); out.close();
} }
} catch (IOException e) { } catch (IOException e) {
log.error("档案导出异常:", e); log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
}
} }
} }
} }
...@@ -2008,8 +2010,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2008,8 +2010,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
//获取要导出的列表 //获取要导出的列表
employeeInfo.setFileStatus(CommonConstants.ONE_INT); employeeInfo.setFileStatus(CommonConstants.ONE_INT);
List<EmployeeExportVO> list = baseMapper.getTEmployeeLeaveExportList(employeeInfo); List<EmployeeExportVO> list = baseMapper.getTEmployeeLeaveExportList(employeeInfo);
if (list != null && !list.isEmpty()) {
ServletOutputStream out = null; ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
list = new ArrayList<>();
}
try { try {
ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class); ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo : list) { for (EmployeeExportVO vo : list) {
...@@ -2024,15 +2028,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2024,15 +2028,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.sheet("离职档案").doWrite(list); .sheet("离职档案").doWrite(list);
out.flush(); out.flush();
} catch (Exception e) { } catch (Exception e) {
log.error("离职档案导出异常:", e); log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
} finally { } finally {
try { try {
if (out != null) { if (out != null) {
out.close(); out.close();
} }
} catch (IOException e) { } catch (IOException e) {
log.error("档案导出异常:", e); log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
}
} }
} }
} }
......
...@@ -183,6 +183,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -183,6 +183,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(tEmployeeInfo)) { if (Common.isNotNull(tEmployeeInfo)) {
if (Common.isNotNull(tEmployeeProject.getBankNo())) {
TCheckBankNo check = new TCheckBankNo(); TCheckBankNo check = new TCheckBankNo();
check.setBankNo(tEmployeeProject.getBankNo()); check.setBankNo(tEmployeeProject.getBankNo());
check.setIdNum(tEmployeeProject.getEmpIdcard()); check.setIdNum(tEmployeeProject.getEmpIdcard());
...@@ -190,20 +191,37 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -190,20 +191,37 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
return R.failed(EmployeeConstants.CHECK_NO_RESPONSE); return R.failed(EmployeeConstants.CHECK_NO_RESPONSE);
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
return R.failed(vo.getRes().getMsg()); return R.failed(vo.getRes().getMsg());
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (!Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
return R.failed(check.getMessage()); return R.failed(check.getRemark());
} }
} else { } else {
return R.failed(EmployeeConstants.CHECK_NO_RESPONSE); return R.failed(EmployeeConstants.CHECK_NO_RESPONSE);
} }
}
TEmployeeInfo tEmployeeInfoCompare = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId()); TEmployeeInfo tEmployeeInfoCompare = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
//获取项目和单位信息
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo()).eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tSettleDomain)) {
tEmployeeProject.setDeptId(tSettleDomain.getId());
tEmployeeProject.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
tEmployeeProject.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
tEmployeeProject.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
TCustomerInfo tCustomerInfo = tCustomerInfoMapper.selectById(tSettleDomain.getCustomerId());
if (Common.isNotNull(tCustomerInfo)) {
tEmployeeProject.setUnitId(tCustomerInfo.getId());
tEmployeeProject.setUnitNo(tCustomerInfo.getCustomerCode());
}
}
String empNO = getEmpNo(tEmployeeProject.getDeptNo()); String empNO = getEmpNo(tEmployeeProject.getDeptNo());
tEmployeeProject.setEmpNo(empNO); tEmployeeProject.setEmpNo(empNO);
tEmployeeProject.setEmpId(tEmployeeInfo.getId()); tEmployeeProject.setEmpId(tEmployeeInfo.getId());
...@@ -225,6 +243,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -225,6 +243,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override @Override
public R updateProject(TEmployeeProject tEmployeeProject) { public R updateProject(TEmployeeProject tEmployeeProject) {
if (Common.isNotNull(tEmployeeProject.getBankNo())) {
TCheckBankNo check = new TCheckBankNo(); TCheckBankNo check = new TCheckBankNo();
check.setBankNo(tEmployeeProject.getBankNo()); check.setBankNo(tEmployeeProject.getBankNo());
check.setIdNum(tEmployeeProject.getEmpIdcard()); check.setIdNum(tEmployeeProject.getEmpIdcard());
...@@ -232,18 +251,19 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -232,18 +251,19 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
return R.failed(EmployeeConstants.CHECK_NO_RESPONSE); return R.failed(EmployeeConstants.CHECK_NO_RESPONSE);
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
return R.failed(vo.getRes().getMsg()); return R.failed(vo.getRes().getMsg());
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (!Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
return R.failed(check.getMessage()); return R.failed(check.getRemark());
} }
} else { } else {
return R.failed(EmployeeConstants.CHECK_NO_RESPONSE); return R.failed(EmployeeConstants.CHECK_NO_RESPONSE);
} }
}
TEmployeeProject compareProject = this.getById(tEmployeeProject.getId()); TEmployeeProject compareProject = this.getById(tEmployeeProject.getId());
boolean flag = this.updateById(tEmployeeProject); boolean flag = this.updateById(tEmployeeProject);
TEmployeeProject newProject = this.getById(tEmployeeProject.getId()); TEmployeeProject newProject = this.getById(tEmployeeProject.getId());
...@@ -262,9 +282,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -262,9 +282,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新 //从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet()); Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ZERO_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ONE_STRING))){ } else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else { } else {
tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING);
...@@ -308,7 +328,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -308,7 +328,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(tEmployeeInfo)) { if (Common.isNotNull(tEmployeeInfo)) {
updList.add(tEmployeeInfo); updList.add(tEmployeeInfo);
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(updList,user); doJointTask.doUpdateEmployeeInfo(updList, user);
} }
return R.ok(); return R.ok();
} }
...@@ -351,9 +371,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -351,9 +371,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新 //从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet()); Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ZERO_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ONE_STRING))){ } else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else { } else {
tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING);
...@@ -385,9 +405,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -385,9 +405,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新 //从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet()); Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ZERO_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e-> e.equals(CommonConstants.ONE_STRING))){ } else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else { } else {
tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING);
...@@ -580,13 +600,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -580,13 +600,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
String errorMessage = ""; String errorMessage = "";
if (Common.isNotNull(excel.getEmpName())) { if (Common.isNotNull(excel.getEmpName())) {
errorMessage = errorMessage.concat(excel.getEmpName()).concat(";"); errorMessage = errorMessage.concat(excel.getEmpName()).concat(";");
}else { } else {
errorMessage = " ".concat(";"); errorMessage = " ".concat(";");
} }
errorMessage = errorMessage + excel.getEmpIdcard() + ";" + excel.getDeptNo() + ";" + leaveReason + ";"; errorMessage = errorMessage + excel.getEmpIdcard() + ";" + excel.getDeptNo() + ";" + leaveReason + ";";
if (Common.isNotNull(excel.getLeaveRemark())) { if (Common.isNotNull(excel.getLeaveRemark())) {
errorMessage = errorMessage.concat(excel.getLeaveRemark()).concat(";"); errorMessage = errorMessage.concat(excel.getLeaveRemark()).concat(";");
}else { } else {
errorMessage = errorMessage.concat(" ").concat(";"); errorMessage = errorMessage.concat(" ").concat(";");
} }
if (Common.isNotNull(tEmployeeProject)) { if (Common.isNotNull(tEmployeeProject)) {
...@@ -627,7 +647,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -627,7 +647,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (updList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updList.size() > CommonConstants.dingleDigitIntArray[0]) {
List<TEmployeeInfo> updEmpInfoList = updList.stream().distinct().collect(Collectors.toList()); List<TEmployeeInfo> updEmpInfoList = updList.stream().distinct().collect(Collectors.toList());
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(updEmpInfoList,user); doJointTask.doUpdateEmployeeInfo(updEmpInfoList, user);
} }
// 记录变更日志 // 记录变更日志
if (updateProjectList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updateProjectList.size() > CommonConstants.dingleDigitIntArray[0]) {
...@@ -701,6 +721,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -701,6 +721,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
/** /**
* 新增档案 * 新增档案
*
* @param excelVOList * @param excelVOList
* @param errorMessageList * @param errorMessageList
* @param idAdd * @param idAdd
...@@ -779,21 +800,21 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -779,21 +800,21 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg()));
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (!Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getRemark()));
} }
} else { } else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
} }
} }
updateExcelPost(updateList, tEmployeeInfo); updateExcelPost(updateList, tEmployeeInfo);
insertExcelPro(excel, proInsList,tEmployeeInfo); insertExcelPro(excel, proInsList, tEmployeeInfo);
//档案有(在档人员),项目有(草稿/已审核); //档案有(在档人员),项目有(草稿/已审核);
} else if (Common.isNotNull(tEmployeeInfo) && CommonConstants.dingleDigitIntArray[0] == tEmployeeInfo.getFileStatus() } else if (Common.isNotNull(tEmployeeInfo) && CommonConstants.dingleDigitIntArray[0] == tEmployeeInfo.getFileStatus()
&& Common.isNotNull(tEmployeeProject) && CommonConstants.dingleDigitIntArray[0] == tEmployeeProject.getProjectStatus()) { && Common.isNotNull(tEmployeeProject) && CommonConstants.dingleDigitIntArray[0] == tEmployeeProject.getProjectStatus()) {
...@@ -819,14 +840,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -819,14 +840,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg()));
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (!Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getRemark()));
} }
} else { } else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
...@@ -861,7 +882,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -861,7 +882,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
try { try {
if (updateList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updateList.size() > CommonConstants.dingleDigitIntArray[0]) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(updateList,user); doJointTask.doUpdateEmployeeInfo(updateList, user);
} }
if (proInsList.size() > CommonConstants.dingleDigitIntArray[0]) { if (proInsList.size() > CommonConstants.dingleDigitIntArray[0]) {
baseMapper.insertExcelEmpProject(proInsList); baseMapper.insertExcelEmpProject(proInsList);
...@@ -992,14 +1013,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -992,14 +1013,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId() R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN); , "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) { if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo= checkListR.getData(); CheckBankNoVo vo = checkListR.getData();
check = (null==vo.getRes())?null:vo.getRes().getData(); check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) { if (Common.isEmpty(vo)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) { } else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), vo.getRes().getMsg()));
} else if (Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)){ } else if (!Common.isEmpty(check) && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getMessage())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), check.getRemark()));
} }
} else { } else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CHECK_NO_RESPONSE));
...@@ -1030,7 +1051,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1030,7 +1051,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (updTEmployeeList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updTEmployeeList.size() > CommonConstants.dingleDigitIntArray[0]) {
List<TEmployeeInfo> updEmpInfoList = updTEmployeeList.stream().distinct().collect(Collectors.toList()); List<TEmployeeInfo> updEmpInfoList = updTEmployeeList.stream().distinct().collect(Collectors.toList());
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(updEmpInfoList,user); doJointTask.doUpdateEmployeeInfo(updEmpInfoList, user);
} }
// 记录变更日志 // 记录变更日志
if (updateInfoList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updateInfoList.size() > CommonConstants.dingleDigitIntArray[0]) {
...@@ -1050,7 +1071,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1050,7 +1071,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
/** /**
* 插入excel Pro * 插入excel Pro
*/ */
private void insertExcelPro(EmployeeProjectVO excel, List<TEmployeeProject> proInsList,TEmployeeInfo tEmployeeInfo) { private void insertExcelPro(EmployeeProjectVO excel, List<TEmployeeProject> proInsList, TEmployeeInfo tEmployeeInfo) {
TEmployeeProject insTEmployeePro = new TEmployeeProject(); TEmployeeProject insTEmployeePro = new TEmployeeProject();
BeanUtil.copyProperties(excel, insTEmployeePro); BeanUtil.copyProperties(excel, insTEmployeePro);
...@@ -1135,13 +1156,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1135,13 +1156,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.failed(errorList); return R.failed(errorList);
} else { } else {
if (updList.size() > CommonConstants.dingleDigitIntArray[0]) { if (updList.size() > CommonConstants.dingleDigitIntArray[0]) {
for (TEmployeeProject tEmployeeProject:updList) { for (TEmployeeProject tEmployeeProject : updList) {
baseMapper.updateById(tEmployeeProject); baseMapper.updateById(tEmployeeProject);
} }
} }
if (infoUpdList.size() > CommonConstants.dingleDigitIntArray[0]) { if (infoUpdList.size() > CommonConstants.dingleDigitIntArray[0]) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
doJointTask.doUpdateEmployeeInfo(infoUpdList,user); doJointTask.doUpdateEmployeeInfo(infoUpdList, user);
} }
} }
return R.ok(); return R.ok();
......
...@@ -119,6 +119,6 @@ ...@@ -119,6 +119,6 @@
1=1 1=1
<include refid="fddPersonAccount_where"/> <include refid="fddPersonAccount_where"/>
</where> </where>
GROUP BY a.NAME GROUP BY a.ID_CARD ORDER BY a.CREATE_TIME desc
</select> </select>
</mapper> </mapper>
...@@ -369,6 +369,13 @@ ...@@ -369,6 +369,13 @@
AND a.CONTRACT_SUB_NAME = #{tEmployeeContractInfo.contractSubName} AND a.CONTRACT_SUB_NAME = #{tEmployeeContractInfo.contractSubName}
</if> </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> </if>
</sql> </sql>
<!--tEmployeeContractInfo简单分页查询--> <!--tEmployeeContractInfo简单分页查询-->
......
...@@ -123,6 +123,7 @@ ...@@ -123,6 +123,7 @@
<result property="leaveTime" column="LEAVE_TIME"/> <result property="leaveTime" column="LEAVE_TIME"/>
<result property="leaveReason" column="LEAVE_REASON"/> <result property="leaveReason" column="LEAVE_REASON"/>
<result property="leaveRemark" column="LEAVE_REMARK"/> <result property="leaveRemark" column="LEAVE_REMARK"/>
<result property="status" column="STATUS"/>
</resultMap> </resultMap>
<sql id="baseParam"> <sql id="baseParam">
...@@ -216,6 +217,7 @@ ...@@ -216,6 +217,7 @@
a.SALARY_STATUS, a.SALARY_STATUS,
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.STATUS,
a.CONTACT_ADDRESS a.CONTACT_ADDRESS
</sql> </sql>
......
...@@ -452,6 +452,15 @@ public class SysBaseSetInfo extends BaseEntity { ...@@ -452,6 +452,15 @@ public class SysBaseSetInfo extends BaseEntity {
@ExcelProperty("社保户名称") @ExcelProperty("社保户名称")
private String departName; private String departName;
@ExcelAttribute(name = "执行月份")
@Schema(description = "执行月份")
@ExcelProperty("执行月份")
private String doMonth;
@Schema(description = "适用月")
@TableField(exist = false)
private String applyDate;
@Schema(description = "公积金比例List(保存时前端传参用)") @Schema(description = "公积金比例List(保存时前端传参用)")
@TableField(exist = false) @TableField(exist = false)
private List<SysPayProportion> fundProList; private List<SysPayProportion> fundProList;
......
...@@ -34,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService; ...@@ -34,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -68,13 +69,28 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -68,13 +69,28 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
return R.failed("获取用户登录信息失败!"); return R.failed("获取用户登录信息失败!");
} }
SysBaseSetInfo baseSetInfo = null; SysBaseSetInfo baseSetInfo = null;
SysBaseSetInfo lastBase = null;
if (null != sysBaseSetInfo.getTown()) { if (null != sysBaseSetInfo.getTown()) {
baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda() baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType()) .eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId()) .eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getTown, sysBaseSetInfo.getTown()) .eq(SysBaseSetInfo::getTown, sysBaseSetInfo.getTown())
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate()) .le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()) .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)); .last(CommonConstants.LAST_ONE_SQL));
} }
if (null != sysBaseSetInfo.getCity() && null == sysBaseSetInfo.getTown()) { if (null != sysBaseSetInfo.getCity() && null == sysBaseSetInfo.getTown()) {
...@@ -83,8 +99,23 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -83,8 +99,23 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId()) .eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getCity, sysBaseSetInfo.getCity()) .eq(SysBaseSetInfo::getCity, sysBaseSetInfo.getCity())
.isNull(SysBaseSetInfo::getTown) .isNull(SysBaseSetInfo::getTown)
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate()) .le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()) .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)); .last(CommonConstants.LAST_ONE_SQL));
} }
if (null != sysBaseSetInfo.getProvince() && null == sysBaseSetInfo.getCity()) { if (null != sysBaseSetInfo.getProvince() && null == sysBaseSetInfo.getCity()) {
...@@ -93,14 +124,34 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -93,14 +124,34 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId()) .eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getProvince, sysBaseSetInfo.getProvince()) .eq(SysBaseSetInfo::getProvince, sysBaseSetInfo.getProvince())
.isNull(SysBaseSetInfo::getCity) .isNull(SysBaseSetInfo::getCity)
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate()) .le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()) .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)); .last(CommonConstants.LAST_ONE_SQL));
} }
if (null != baseSetInfo) { if (null != baseSetInfo) {
return R.failed("对应户、地市、有效期的基数配置已存在!"); return R.failed("对应户、地市、有效期的基数配置已存在!");
} }
// 将上一个无截止月的增加截止月
if (lastBase != null) {
lastBase.setApplyEndDate(sysBaseSetInfo.getApplyStartDate());
this.updateById(lastBase);
}
this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo); this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo);
return R.ok(); return R.ok();
} }
...@@ -116,15 +167,23 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -116,15 +167,23 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
return R.failed("根据id未找到基数配置!" + sysBaseSetInfo.getId()); return R.failed("根据id未找到基数配置!" + sysBaseSetInfo.getId());
} }
SysBaseSetInfo baseSetInfo = null; 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()) { if (null != sysBaseSetInfo.getTown()) {
baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda() baseSetInfo = this.getOne(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType()) .eq(SysBaseSetInfo::getBaseType, sysBaseSetInfo.getBaseType())
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId()) .eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getTown, sysBaseSetInfo.getTown()) .eq(SysBaseSetInfo::getTown, sysBaseSetInfo.getTown())
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId()) .ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT) .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)); .last(CommonConstants.LAST_ONE_SQL));
} }
if (null != sysBaseSetInfo.getCity() && null == sysBaseSetInfo.getTown()) { if (null != sysBaseSetInfo.getCity() && null == sysBaseSetInfo.getTown()) {
...@@ -133,8 +192,15 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -133,8 +192,15 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId()) .eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getCity, sysBaseSetInfo.getCity()) .eq(SysBaseSetInfo::getCity, sysBaseSetInfo.getCity())
.isNull(SysBaseSetInfo::getTown) .isNull(SysBaseSetInfo::getTown)
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate()) .le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()) .ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.or()
.isNull(SysBaseSetInfo::getApplyEndDate)))
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId()) .ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT) .eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
...@@ -145,8 +211,15 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -145,8 +211,15 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
.eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId()) .eq(SysBaseSetInfo::getDepartId, sysBaseSetInfo.getDepartId())
.eq(SysBaseSetInfo::getProvince, sysBaseSetInfo.getProvince()) .eq(SysBaseSetInfo::getProvince, sysBaseSetInfo.getProvince())
.isNull(SysBaseSetInfo::getCity) .isNull(SysBaseSetInfo::getCity)
.and(obj -> obj
.and(obj1 -> obj1
.le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate()) .le(SysBaseSetInfo::getApplyStartDate, sysBaseSetInfo.getApplyStartDate())
.and(obj2 -> obj2
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()) .ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate())
.or()
.isNull(SysBaseSetInfo::getApplyEndDate)))
.or()
.ge(SysBaseSetInfo::getApplyEndDate, sysBaseSetInfo.getApplyStartDate()))
.ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId()) .ne(SysBaseSetInfo::getId, sysBaseSetInfo.getId())
.eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT) .eq(SysBaseSetInfo::getStatus, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
......
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
<result property="insuranceIsLatestCardinality" column="INSURANCE_IS_LATEST_CARDINALITY"/> <result property="insuranceIsLatestCardinality" column="INSURANCE_IS_LATEST_CARDINALITY"/>
<result property="deleteFlag" column="DELETE_FLAG"/> <result property="deleteFlag" column="DELETE_FLAG"/>
<result property="departName" column="DEPART_NAME"/> <result property="departName" column="DEPART_NAME"/>
<result property="doMonth" column="DO_MONTH"/>
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
...@@ -82,10 +83,7 @@ ...@@ -82,10 +83,7 @@
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a a.ID,
.
ID
,
a.PROVINCE, a.PROVINCE,
a.CITY, a.CITY,
a.TOWN, a.TOWN,
...@@ -136,6 +134,7 @@ ...@@ -136,6 +134,7 @@
a.INSURANCE_IS_LATEST_CARDINALITY, a.INSURANCE_IS_LATEST_CARDINALITY,
a.DELETE_FLAG, a.DELETE_FLAG,
a.DEPART_NAME, a.DEPART_NAME,
a.DO_MONTH,
a.CREATE_BY, a.CREATE_BY,
a.UPDATE_BY, a.UPDATE_BY,
a.CREATE_NAME, a.CREATE_NAME,
...@@ -295,7 +294,13 @@ ...@@ -295,7 +294,13 @@
AND a.DELETE_FLAG = #{sysBaseSetInfo.deleteFlag} AND a.DELETE_FLAG = #{sysBaseSetInfo.deleteFlag}
</if> </if>
<if test="sysBaseSetInfo.departName != null and sysBaseSetInfo.departName.trim() != ''"> <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>
<if test="sysBaseSetInfo.createBy != null and sysBaseSetInfo.createBy.trim() != ''"> <if test="sysBaseSetInfo.createBy != null and sysBaseSetInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{sysBaseSetInfo.createBy} AND a.CREATE_BY = #{sysBaseSetInfo.createBy}
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
AND a.ORGAN_ID = #{sysHouseHoldInfo.organId} AND a.ORGAN_ID = #{sysHouseHoldInfo.organId}
</if> </if>
<if test="sysHouseHoldInfo.name != null and sysHouseHoldInfo.name.trim() != ''"> <if test="sysHouseHoldInfo.name != null and sysHouseHoldInfo.name.trim() != ''">
AND a.NAME = #{sysHouseHoldInfo.name} AND a.NAME like CONCAT('%',#{sysHouseHoldInfo.name},'%')
</if> </if>
<if test="sysHouseHoldInfo.createTime != null"> <if test="sysHouseHoldInfo.createTime != null">
AND a.CREATE_TIME = #{sysHouseHoldInfo.createTime} AND a.CREATE_TIME = #{sysHouseHoldInfo.createTime}
...@@ -125,5 +125,6 @@ ...@@ -125,5 +125,6 @@
1=1 1=1
<include refid="sysHouseHoldInfo_where"/> <include refid="sysHouseHoldInfo_where"/>
</where> </where>
order by a.CREATE_TIME desc
</select> </select>
</mapper> </mapper>
...@@ -123,7 +123,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa ...@@ -123,7 +123,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
String nowSql; String nowSql;
// 处理创建人 // 处理创建人
if (menuCreateList != null && !menuCreateList.isEmpty()) { if (menuCreateList != null && !menuCreateList.isEmpty()) {
nowSql = " or a.create_by = #create_by "; nowSql = " or a.create_by = '#create_by' ";
for (SysDataAuthMenuRel menu : menuCreateList) { for (SysDataAuthMenuRel menu : menuCreateList) {
mapSql = authSqlMap.get(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId()); mapSql = authSqlMap.get(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId());
if (!Common.isEmpty(mapSql)) { if (!Common.isEmpty(mapSql)) {
...@@ -334,7 +334,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa ...@@ -334,7 +334,7 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
String nowSql; String nowSql;
// 处理创建人 // 处理创建人
if (menuCreateList != null && !menuCreateList.isEmpty()) { if (menuCreateList != null && !menuCreateList.isEmpty()) {
nowSql = " or a.create_by = #create_by "; nowSql = " or a.create_by = '#create_by' ";
sysDataAuth.setIsCreateAuth(1); sysDataAuth.setIsCreateAuth(1);
for (SysDataAuthMenuRel menu : menuCreateList) { for (SysDataAuthMenuRel menu : menuCreateList) {
mapSql = authSqlMap.get(linkId + CommonConstants.DOWN_LINE_STRING + menu.getMenuId()); 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