Commit 5245a800 authored by fangxinjiang's avatar fangxinjiang

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

parents 16b98bd8 3d6110d4
...@@ -20,11 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller; ...@@ -20,11 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeXProjectVO;
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.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -34,7 +32,6 @@ import io.swagger.v3.oas.annotations.tags.Tag; ...@@ -34,7 +32,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
......
...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.service; ...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeLog; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeLog;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
/** /**
* 档案变更日志表 * 档案变更日志表
...@@ -40,4 +41,17 @@ public interface TEmployeeLogService extends IService<TEmployeeLog> { ...@@ -40,4 +41,17 @@ public interface TEmployeeLogService extends IService<TEmployeeLog> {
* @return * @return
**/ **/
<T> TEmployeeLog saveModificationRecord(Integer type, String empId, String projectId, T oldInfo, T newInfo); <T> TEmployeeLog saveModificationRecord(Integer type, String empId, String projectId, T oldInfo, T newInfo);
/**
* 生成修改记录
* @Author pwang
* @Date 2022-06-22 11:32
* @param type 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新
* @param empId 档案id
* @param projectId 项目id
* @param oldInfo
* @param newInfo
* @return
**/
<T> TEmployeeLog saveModificationRecord(Integer type, String empId, String projectId, T oldInfo, T newInfo, YifuUser user);
} }
...@@ -169,13 +169,13 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -169,13 +169,13 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
try { try {
zipFile = new ZipFile(srcFile, CharsetUtil.CHARSET_GBK); zipFile = new ZipFile(srcFile, CharsetUtil.CHARSET_GBK);
Enumeration<?> entries = zipFile.entries(); Enumeration<?> entries = zipFile.entries();
Enumeration<?> entriesCheck = zipFile.entries();
Map<String,String> insMap = new HashMap<>(); Map<String,String> insMap = new HashMap<>();
List<TElecEmployeeInfo> infolist = new ArrayList<>(); List<TElecEmployeeInfo> infolist = new ArrayList<>();
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
while (entries.hasMoreElements()) { while (entriesCheck.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement(); ZipEntry entry = (ZipEntry) entriesCheck.nextElement();
//添加进filesName //添加进filesName
String empInfo = entry.getName(); String empInfo = entry.getName();
// 如果是文件夹,就创建个文件夹 // 如果是文件夹,就创建个文件夹
......
...@@ -86,18 +86,25 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -86,18 +86,25 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//划转,更新项目信息 //划转,更新项目信息
TEmployeeProject updateTEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() TEmployeeProject updateTEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptName,tEmpChangeInfo.getOldSettle()) .eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptName,tEmpChangeInfo.getOldSettle())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL)); .eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(updateTEmployeeProject)) { if (Common.isNotNull(updateTEmployeeProject)) {
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmpChangeInfo.getDeptNo()).eq(TSettleDomain::getDepartName, tEmpChangeInfo.getNewSettle())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING).eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeeProject.getId());
updateTEmployeeProject.setDeptNo(tEmpChangeInfo.getDeptNo()); updateTEmployeeProject.setDeptNo(tEmpChangeInfo.getDeptNo());
updateTEmployeeProject.setDeptId(tEmpChangeInfo.getDeptId()); updateTEmployeeProject.setDeptId(tEmpChangeInfo.getDeptId());
updateTEmployeeProject.setDeptName(tEmpChangeInfo.getNewSettle()); updateTEmployeeProject.setDeptName(tEmpChangeInfo.getNewSettle());
updateTEmployeeProject.setUnitId(tEmpChangeInfo.getUnitId()); updateTEmployeeProject.setUnitId(tEmpChangeInfo.getUnitId());
updateTEmployeeProject.setUnitNo(tEmpChangeInfo.getUnitNo()); updateTEmployeeProject.setUnitNo(tEmpChangeInfo.getUnitNo());
updateTEmployeeProject.setUnitName(tEmpChangeInfo.getNewDept()); updateTEmployeeProject.setUnitName(tEmpChangeInfo.getNewDept());
updateTEmployeeProject.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
updateTEmployeeProject.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
updateTEmployeeProject.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
tEmployeeProjectService.updateById(updateTEmployeeProject); tEmployeeProjectService.updateById(updateTEmployeeProject);
tEmpChangeInfo.setProId(updateTEmployeeProject.getId()); tEmpChangeInfo.setProId(updateTEmployeeProject.getId());
// 记录变更日志 // 记录变更日志
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeeProject.getId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), tEmployeeProjectOld, updateTEmployeeProject); tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), tEmployeeProjectOld, updateTEmployeeProject);
} }
//保存档案划转记录 //保存档案划转记录
...@@ -168,9 +175,13 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -168,9 +175,13 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) { if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode())); errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
} else if (Common.isNotNull(tSettleDomain)) { } else if (Common.isNotNull(tSettleDomain)) {
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeePro.getId());
updateTEmployeePro.setDeptNo(tSettleDomain.getDepartNo()); updateTEmployeePro.setDeptNo(tSettleDomain.getDepartNo());
updateTEmployeePro.setDeptId(tSettleDomain.getId()); updateTEmployeePro.setDeptId(tSettleDomain.getId());
updateTEmployeePro.setDeptName(tSettleDomain.getDepartName()); updateTEmployeePro.setDeptName(tSettleDomain.getDepartName());
updateTEmployeePro.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
updateTEmployeePro.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
updateTEmployeePro.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
TCustomerInfo tCustomerInfo = tCustomerInfoService.getById(tSettleDomain.getCustomerId()); TCustomerInfo tCustomerInfo = tCustomerInfoService.getById(tSettleDomain.getCustomerId());
if (Common.isNotNull(tCustomerInfo)) { if (Common.isNotNull(tCustomerInfo)) {
updateTEmployeePro.setUnitId(tCustomerInfo.getId()); updateTEmployeePro.setUnitId(tCustomerInfo.getId());
...@@ -179,7 +190,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -179,7 +190,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
} }
updateList.add(updateTEmployeePro); updateList.add(updateTEmployeePro);
// 记录变更日志 // 记录变更日志
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeePro.getId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro); tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro);
} }
} else { } else {
......
...@@ -954,13 +954,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -954,13 +954,13 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
} }
Map<String, Integer> deptMap = new HashMap<>();
if (!deptNoList.isEmpty()) {
List<TSettleDomain> deptList = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda() List<TSettleDomain> deptList = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL) .eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL) .eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL)
.in(TSettleDomain::getDepartNo, deptNoList) .in(TSettleDomain::getDepartNo, deptNoList)
); );
Map<String, Integer> deptMap = new HashMap<>();
if (deptList == null || deptList.isEmpty()) { if (deptList == null || deptList.isEmpty()) {
errorMsg = new HashSet<>(); errorMsg = new HashSet<>();
errorMsg.add(EmployeeConstants.DEPT_NO_EXIST); errorMsg.add(EmployeeConstants.DEPT_NO_EXIST);
...@@ -971,6 +971,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -971,6 +971,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
deptMap.put(dept.getDepartNo(), CommonConstants.ONE_INT); deptMap.put(dept.getDepartNo(), CommonConstants.ONE_INT);
} }
} }
}
// 查找档案库 // 查找档案库
Map<String, TEmployeeInfo> existEmpMap = new HashMap<>(); Map<String, TEmployeeInfo> existEmpMap = new HashMap<>();
......
...@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeLogMapper; ...@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeLogMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator; import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -64,6 +65,35 @@ public class TEmployeeLogServiceImpl extends ServiceImpl<TEmployeeLogMapper, TEm ...@@ -64,6 +65,35 @@ public class TEmployeeLogServiceImpl extends ServiceImpl<TEmployeeLogMapper, TEm
return null; return null;
} }
@Override
public <T> TEmployeeLog saveModificationRecord(Integer type, String empId, String projectId, T oldInfo, T newInfo,YifuUser user) {
try{
//比较记录不影响业务逻辑,用try套住
//比较差异
String differenceKey = HrEquator.comparisonValue(oldInfo, newInfo);
//如果有差异保存差异
if(!Common.isEmpty(differenceKey)){
TEmployeeLog employeeLog = new TEmployeeLog();
employeeLog.setProjectId(projectId);
employeeLog.setType(type);
employeeLog.setEmpId(empId);
employeeLog.setCreateTime(LocalDateTime.now());
if (Common.isNotNull(user)) {
employeeLog.setCreateBy(user.getId());
employeeLog.setCreateName(user.getNickname());
}
employeeLog.setOldInfo(JSON.toJSONString(oldInfo,features));
employeeLog.setNewInfo(JSON.toJSONString(newInfo,features));
employeeLog.setDifferenceInfo(differenceKey);
baseMapper.insert(employeeLog);
return employeeLog;
}
}catch (Exception e){
log.error(JSON.toJSON(oldInfo)+"插入修改记录报错>>>",e);
}
return null;
}
private SerializerFeature[] features = new SerializerFeature[] { private SerializerFeature[] features = new SerializerFeature[] {
WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty, WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty,
WriteNullStringAsEmpty,WriteDateUseDateFormat WriteNullStringAsEmpty,WriteDateUseDateFormat
......
...@@ -8,6 +8,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService; ...@@ -8,6 +8,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
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.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
...@@ -43,7 +44,7 @@ public class DoJointTask { ...@@ -43,7 +44,7 @@ public class DoJointTask {
* @return: void * @return: void
**/ **/
@Async @Async
public void doUpdateEmployeeInfo(List<TEmployeeInfo> tEmployeeInfoList) { public void doUpdateEmployeeInfo(List<TEmployeeInfo> tEmployeeInfoList, YifuUser user) {
log.info("档案-批量更新人员档案-线程开始"); log.info("档案-批量更新人员档案-线程开始");
try { try {
for(TEmployeeInfo tEmployeeInfo:tEmployeeInfoList) { for(TEmployeeInfo tEmployeeInfo:tEmployeeInfoList) {
...@@ -55,10 +56,10 @@ public class DoJointTask { ...@@ -55,10 +56,10 @@ public class DoJointTask {
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
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.ONE_STRING))) { if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else 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))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else { } else {
tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING); tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING);
} }
...@@ -68,7 +69,7 @@ public class DoJointTask { ...@@ -68,7 +69,7 @@ public class DoJointTask {
} }
tEmployeeInfoService.updateById(tEmployeeInfo); tEmployeeInfoService.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0] tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0]
, tEmployeeInfo.getId(), "", tEmployeeInfoOld, tEmployeeInfo); , tEmployeeInfo.getId(), "", tEmployeeInfoOld, tEmployeeInfo,user);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("档案-批量更新人员档案错误", e); log.error("档案-批量更新人员档案错误", e);
......
...@@ -615,7 +615,8 @@ ...@@ -615,7 +615,8 @@
insert into t_employee_project insert into t_employee_project
(ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST, (ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,
DEPT_ID,DEPT_NAME,UNIT_ID,UNIT_NAME,UNIT_NO,EMP_NO,TRY_PERIOD,ENJOIN_DATE,BANK_NAME,BANK_NO,BANK_SUB_NAME, DEPT_ID,DEPT_NAME,UNIT_ID,UNIT_NAME,UNIT_NO,EMP_NO,TRY_PERIOD,ENJOIN_DATE,BANK_NAME,BANK_NO,BANK_SUB_NAME,
WORKING_HOURS,PROJECT_SOURCE,DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME,INSURANCE_STATUS,SOCIAL_STATUS,FUND_STATUS) BUSINESS_PRIMARY_TYPE,BUSINESS_SECOND_TYPE,BUSINESS_THIRD_TYPE,WORKING_HOURS,PROJECT_SOURCE,DELETE_FLAG,
CREATE_BY,CREATE_NAME,CREATE_TIME,INSURANCE_STATUS,SOCIAL_STATUS,FUND_STATUS)
VALUES VALUES
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
( (
...@@ -641,6 +642,9 @@ ...@@ -641,6 +642,9 @@
#{item.bankName,jdbcType=VARCHAR}, #{item.bankName,jdbcType=VARCHAR},
#{item.bankNo,jdbcType=VARCHAR}, #{item.bankNo,jdbcType=VARCHAR},
#{item.bankSubName,jdbcType=VARCHAR}, #{item.bankSubName,jdbcType=VARCHAR},
#{item.businessPrimaryType,jdbcType=VARCHAR},
#{item.businessSecondType,jdbcType=VARCHAR},
#{item.businessThirdType,jdbcType=VARCHAR},
#{item.workingHours,jdbcType=VARCHAR}, #{item.workingHours,jdbcType=VARCHAR},
#{item.projectSource,jdbcType=VARCHAR}, #{item.projectSource,jdbcType=VARCHAR},
#{item.deleteFlag,jdbcType=VARCHAR}, #{item.deleteFlag,jdbcType=VARCHAR},
......
dapr.upms.appUrl=http://localhost:3500/v1.0/invoke/ dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms dapr.upms.appId=yifu-upms
dapr.upms.appPort=4000 dapr.upms.appPort=4000
dapr.upms.httpPort=3500 dapr.upms.httpPort=3500
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 社保户公积金户数据
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
@Data
@TableName("sys_house_hold_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "社保户公积金户数据")
public class SysHouseHoldInfo extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelAttribute(name = "id" )
@Schema(description ="id")
@ExcelProperty("id")
private String id;
/**
* 所属机构ID
*/
@ExcelAttribute(name = "所属机构ID" )
@Schema(description ="所属机构ID")
@ExcelProperty("所属机构ID")
private String organId;
/**
* 户名
*/
@ExcelAttribute(name = "户名" )
@Schema(description ="户名")
@ExcelProperty("户名")
private String name;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间" )
@Schema(description ="创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
/**
* 创建人ID
*/
@ExcelAttribute(name = "创建人ID" )
@Schema(description ="创建人ID")
@ExcelProperty("创建人ID")
private String createUser;
/**
* 创建人姓名
*/
@ExcelAttribute(name = "创建人姓名" )
@Schema(description ="创建人姓名")
@ExcelProperty("创建人姓名")
private String createUserName;
/**
* 0启用1禁用
*/
@ExcelAttribute(name = "0启用1禁用" )
@Schema(description ="0启用1禁用")
@ExcelProperty("0启用1禁用")
private String delFlag;
/**
* 账户性质:0社保 1公积金
*/
@ExcelAttribute(name = "账户性质:0社保 1公积金" )
@Schema(description ="账户性质:0社保 1公积金")
@ExcelProperty("账户性质:0社保 1公积金")
private String type;
/**
* 缴纳地-省
*/
@ExcelAttribute(name = "缴纳地-省" )
@Schema(description ="缴纳地-省")
@ExcelProperty("缴纳地-省")
private String province;
/**
* 缴纳地-市
*/
@ExcelAttribute(name = "缴纳地-市" )
@Schema(description ="缴纳地-市")
@ExcelProperty("缴纳地-市")
private String city;
/**
* 缴纳地-县
*/
@ExcelAttribute(name = "缴纳地-县" )
@Schema(description ="缴纳地-县")
@ExcelProperty("缴纳地-县")
private String town;
/**
* 备注
*/
@ExcelAttribute(name = "备注" )
@Schema(description ="备注")
@ExcelProperty("备注")
private String rmark;
/**
* 所属机构名称
*/
@ExcelAttribute(name = "所属机构名称" )
@Schema(description ="所属机构名称")
@ExcelProperty("所属机构名称")
private String organName;
/**
* 创建者
*/
@ExcelAttribute(name = "创建者" )
@Schema(description ="创建者")
@ExcelProperty("创建者")
private String createBy;
/**
* 更新人
*/
@ExcelAttribute(name = "更新人" )
@Schema(description ="更新人")
@ExcelProperty("更新人")
private String updateBy;
/**
* 创建人姓名
*/
@ExcelAttribute(name = "创建人姓名" )
@Schema(description ="创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间" )
@Schema(description ="更新时间")
@ExcelProperty("更新时间")
private LocalDateTime updateTime;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 预估临时政策配置表
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
@Data
@TableName("t_agent_config")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "预估临时政策配置表")
public class TAgentConfig extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelAttribute(name = "主键" )
@Schema(description ="主键")
@ExcelProperty("主键")
private String id;
/**
* 是否启用(0启用/1禁用)
*/
@ExcelAttribute(name = "是否启用(0启用/1禁用)" )
@Schema(description ="是否启用(0启用/1禁用)")
@ExcelProperty("是否启用(0启用/1禁用)")
private Integer openFlag;
/**
* 适用对象(0单位/1个人/2全部)
*/
@ExcelAttribute(name = "适用对象(0单位/1个人/2全部)" )
@Schema(description ="适用对象(0单位/1个人/2全部)")
@ExcelProperty("适用对象(0单位/1个人/2全部)")
private Integer target;
/**
* 适用省份
*/
@ExcelAttribute(name = "适用省份" )
@Schema(description ="适用省份")
@ExcelProperty("适用省份")
private String province;
/**
* 适用地市
*/
@ExcelAttribute(name = "适用地市" )
@Schema(description ="适用地市")
@ExcelProperty("适用地市")
private String city;
/**
* 医疗收取(0全额/1减半/2不收取)
*/
@ExcelAttribute(name = "医疗收取(0全额/1减半/2不收取)" )
@Schema(description ="医疗收取(0全额/1减半/2不收取)")
@ExcelProperty("医疗收取(0全额/1减半/2不收取)")
private String medical;
/**
* 工伤收取(0全额/1减半/2不收取)
*/
@ExcelAttribute(name = "工伤收取(0全额/1减半/2不收取)" )
@Schema(description ="工伤收取(0全额/1减半/2不收取)")
@ExcelProperty("工伤收取(0全额/1减半/2不收取)")
private String injury;
/**
* 生育收取(0全额/1减半/2不收取)
*/
@ExcelAttribute(name = "生育收取(0全额/1减半/2不收取)" )
@Schema(description ="生育收取(0全额/1减半/2不收取)")
@ExcelProperty("生育收取(0全额/1减半/2不收取)")
private String bear;
/**
* 养老收取(0全额/1减半/2不收取)
*/
@ExcelAttribute(name = "养老收取(0全额/1减半/2不收取)" )
@Schema(description ="养老收取(0全额/1减半/2不收取)")
@ExcelProperty("养老收取(0全额/1减半/2不收取)")
private String pension;
/**
* 失业收取(0全额/1减半/2不收取)
*/
@ExcelAttribute(name = "失业收取(0全额/1减半/2不收取)" )
@Schema(description ="失业收取(0全额/1减半/2不收取)")
@ExcelProperty("失业收取(0全额/1减半/2不收取)")
private String unemployed;
/**
* 适用年
*/
@ExcelAttribute(name = "适用年" )
@Schema(description ="适用年")
@ExcelProperty("适用年")
private String year;
/**
* createTime
*/
@ExcelAttribute(name = "createTime" )
@Schema(description ="createTime")
@ExcelProperty("createTime")
private LocalDateTime createTime;
/**
* createUser
*/
@ExcelAttribute(name = "createUser" )
@Schema(description ="createUser")
@ExcelProperty("createUser")
private String createUser;
/**
* 生效起月份 包含
*/
@ExcelAttribute(name = "生效起月份 包含" )
@Schema(description ="生效起月份 包含")
@ExcelProperty("生效起月份 包含")
private String startMonth;
/**
* 生效止月份 包含
*/
@ExcelAttribute(name = "生效止月份 包含" )
@Schema(description ="生效止月份 包含")
@ExcelProperty("生效止月份 包含")
private String endMonth;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 社保户公积金户数据
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/syshouseholdinfo" )
@Tag(name = "社保户公积金户数据管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class SysHouseHoldInfoController {
private final SysHouseHoldInfoService sysHouseHoldInfoService;
/**
* 简单分页查询
* @param page 分页对象
* @param sysHouseHoldInfo 社保户公积金户数据
* @return
*/
@Operation(summary = "简单分页查询", description = "简单分页查询")
@GetMapping("/page")
public R<IPage<SysHouseHoldInfo>> getSysHouseHoldInfoPage(Page<SysHouseHoldInfo> page, SysHouseHoldInfo sysHouseHoldInfo) {
return new R<>(sysHouseHoldInfoService.getSysHouseHoldInfoPage(page,sysHouseHoldInfo));
}
/**
* 不分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
public R<List<SysHouseHoldInfo>> getSysHouseHoldInfoNoPage(@RequestBody SysHouseHoldInfo sysHouseHoldInfo) {
return R.ok(sysHouseHoldInfoService.list(Wrappers.query(sysHouseHoldInfo)));
}
/**
* 通过id查询社保户公积金户数据
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_syshouseholdinfo_get')")
@GetMapping("/{id}" )
public R<SysHouseHoldInfo> getById(@PathVariable("id" ) String id) {
return R.ok(sysHouseHoldInfoService.getById(id));
}
/**
* 新增社保户公积金户数据
* @param sysHouseHoldInfo 社保户公积金户数据
* @return R
*/
@Operation(summary = "新增社保户公积金户数据", description = "新增社保户公积金户数据:hasPermission('demo_syshouseholdinfo_add')")
@SysLog("新增社保户公积金户数据" )
@PostMapping
@PreAuthorize("@pms.hasPermission('demo_syshouseholdinfo_add')" )
public R save(@RequestBody SysHouseHoldInfo sysHouseHoldInfo) {
return R.ok(sysHouseHoldInfoService.saveInfo(sysHouseHoldInfo));
}
/**
* 修改社保户公积金户数据
* @param sysHouseHoldInfo 社保户公积金户数据
* @return R
*/
@Operation(summary = "修改社保户公积金户数据", description = "修改社保户公积金户数据:hasPermission('demo_syshouseholdinfo_edit')")
@SysLog("修改社保户公积金户数据" )
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_syshouseholdinfo_edit')" )
public R<Boolean> updateById(@RequestBody SysHouseHoldInfo sysHouseHoldInfo) {
return R.ok(sysHouseHoldInfoService.updateById(sysHouseHoldInfo));
}
/**
* 通过id删除社保户公积金户数据
* @param id id
* @return R
*/
@Operation(summary = "通过id删除社保户公积金户数据", description = "通过id删除社保户公积金户数据:hasPermission('demo_syshouseholdinfo_del')")
@SysLog("通过id删除社保户公积金户数据" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_syshouseholdinfo_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(sysHouseHoldInfoService.removeById(id));
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig;
import com.yifu.cloud.plus.v1.yifu.social.service.TAgentConfigService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 预估临时政策配置表
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tagentconfig" )
@Tag(name = "预估临时政策配置表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TAgentConfigController {
private final TAgentConfigService tAgentConfigService;
/**
* 简单分页查询
* @param page 分页对象
* @param tAgentConfig 预估临时政策配置表
* @return
*/
@Operation(summary = "简单分页查询", description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TAgentConfig>> getTAgentConfigPage(Page<TAgentConfig> page, TAgentConfig tAgentConfig) {
return new R<>(tAgentConfigService.getTAgentConfigPage(page,tAgentConfig));
}
/**
* 不分页查询
* @param tAgentConfig 预估临时政策配置表
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tagentconfig_get')" )
public R<List<TAgentConfig>> getTAgentConfigNoPage(@RequestBody TAgentConfig tAgentConfig) {
return R.ok(tAgentConfigService.list(Wrappers.query(tAgentConfig)));
}
/**
* 通过id查询预估临时政策配置表
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_tagentconfig_get')")
@GetMapping("/{id}" )
public R<TAgentConfig> getById(@PathVariable("id" ) String id) {
return R.ok(tAgentConfigService.getById(id));
}
/**
* 新增预估临时政策配置表
* @param tAgentConfig 预估临时政策配置表
* @return R
*/
@Operation(summary = "新增预估临时政策配置表", description = "新增预估临时政策配置表:hasPermission('demo_tagentconfig_add')")
@SysLog("新增预估临时政策配置表" )
@PostMapping
@PreAuthorize("@pms.hasPermission('social_tagentconfig_add')" )
public R<Boolean> save(@RequestBody TAgentConfig tAgentConfig) {
return R.ok(tAgentConfigService.save(tAgentConfig));
}
/**
* 修改预估临时政策配置表
* @param tAgentConfig 预估临时政策配置表
* @return R
*/
@Operation(summary = "修改预估临时政策配置表", description = "修改预估临时政策配置表:hasPermission('demo_tagentconfig_edit')")
@SysLog("修改预估临时政策配置表" )
@PutMapping
@PreAuthorize("@pms.hasPermission('social_tagentconfig_edit')" )
public R<Boolean> updateById(@RequestBody TAgentConfig tAgentConfig) {
return R.ok(tAgentConfigService.updateById(tAgentConfig));
}
/**
* 通过id删除预估临时政策配置表
* @param id id
* @return R
*/
@Operation(summary = "通过id删除预估临时政策配置表", description = "通过id删除预估临时政策配置表:hasPermission('demo_tagentconfig_del')")
@SysLog("通过id删除预估临时政策配置表" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_tagentconfig_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tAgentConfigService.removeById(id));
}
/**
* 修改开启关闭状态
* @param id
* @return R
*/
@Operation(summary = "通过id删除预估临时政策配置表", description = "通过id删除预估临时政策配置表:hasPermission('demo_tagentconfig_del')")
@PostMapping("/updateOpenFlagById")
@PreAuthorize("@pms.hasPermission('social:tagentconfig_edit')")
public R updateOpenFlagById(@RequestParam String id) {
return tAgentConfigService.updateFlagById(id);
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 社保户公积金户数据
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
@Mapper
public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> {
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
* @return
*/
IPage<SysHouseHoldInfo> getSysHouseHoldInfoPage(Page<SysHouseHoldInfo> page, @Param("sysHouseHoldInfo") SysHouseHoldInfo sysHouseHoldInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 预估临时政策配置表
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
@Mapper
public interface TAgentConfigMapper extends BaseMapper<TAgentConfig> {
/**
* 预估临时政策配置表简单分页查询
* @param tAgentConfig 预估临时政策配置表
* @return
*/
IPage<TAgentConfig> getTAgentConfigPage(Page<TAgentConfig> page, @Param("tAgentConfig") TAgentConfig tAgentConfig);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
/**
* 社保户公积金户数据
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> {
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
* @return
*/
IPage<SysHouseHoldInfo> getSysHouseHoldInfoPage(Page<SysHouseHoldInfo> page, SysHouseHoldInfo sysHouseHoldInfo);
/**
* 户新增
* @param sysHouseHoldInfo 社保户公积金户数据
* @return R
*/
R saveInfo (SysHouseHoldInfo sysHouseHoldInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig;
/**
* 预估临时政策配置表
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
public interface TAgentConfigService extends IService<TAgentConfig> {
/**
* 预估临时政策配置表简单分页查询
* @param tAgentConfig 预估临时政策配置表
* @return
*/
IPage<TAgentConfig> getTAgentConfigPage(Page<TAgentConfig> page, TAgentConfig tAgentConfig);
/**
* 修改开启关闭状态
* @param id 预估临时政策配置表id
* @return
*/
R updateFlagById(String id);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
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.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* 社保户公积金户数据
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
@Service
@RequiredArgsConstructor
public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMapper, SysHouseHoldInfo> implements SysHouseHoldInfoService {
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
* @return
*/
@Override
public IPage<SysHouseHoldInfo> getSysHouseHoldInfoPage(Page<SysHouseHoldInfo> page, SysHouseHoldInfo sysHouseHoldInfo){
return baseMapper.getSysHouseHoldInfoPage(page,sysHouseHoldInfo);
}
/**
* 户新增
* @param sysHouseHoldInfo 社保户公积金户数据
* @return
*/
@Override
public R saveInfo(SysHouseHoldInfo sysHouseHoldInfo) {
SysHouseHoldInfo info = null;
if (null != sysHouseHoldInfo.getTown()){
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,info.getType())
.eq(SysHouseHoldInfo::getName,info.getName())
.eq(SysHouseHoldInfo::getTown,info.getTown())
.eq(SysHouseHoldInfo::getOrganName,info.getOrganName())
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysHouseHoldInfo.getCity() && null == sysHouseHoldInfo.getTown()){
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,info.getType())
.eq(SysHouseHoldInfo::getName,info.getName())
.eq(SysHouseHoldInfo::getCity,info.getCity())
.eq(SysHouseHoldInfo::getOrganName,info.getOrganName())
.isNull(SysHouseHoldInfo::getTown)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != sysHouseHoldInfo.getProvince() && null == sysHouseHoldInfo.getCity()){
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,info.getType())
.eq(SysHouseHoldInfo::getName,info.getName())
.eq(SysHouseHoldInfo::getProvince,info.getProvince())
.eq(SysHouseHoldInfo::getOrganName,info.getOrganName())
.isNull(SysHouseHoldInfo::getCity)
.last(CommonConstants.LAST_ONE_SQL));
}
if (null != info){
return R.failed("对应户、地市、所属机构的配置已存在!");
}
baseMapper.insert(sysHouseHoldInfo);
return R.ok();
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TAgentConfigMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TAgentConfigService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* 预估临时政策配置表
*
* @author fxj
* @date 2022-07-12 08:53:19
*/
@Service
@RequiredArgsConstructor
public class TAgentConfigServiceImpl extends ServiceImpl<TAgentConfigMapper, TAgentConfig> implements TAgentConfigService {
/**
* 预估临时政策配置表简单分页查询
* @param tAgentConfig 预估临时政策配置表
* @return
*/
@Override
public IPage<TAgentConfig> getTAgentConfigPage(Page<TAgentConfig> page, TAgentConfig tAgentConfig){
return baseMapper.getTAgentConfigPage(page,tAgentConfig);
}
@Override
public R updateFlagById(String id) {
if (!Common.isNotNull(id)){
return R.failed("id不可为空!");
}
TAgentConfig tAgentConfig = this.getById(id);
if (null == tAgentConfig){
return R.failed("找不到对应ID的配置数据");
}
// 启用改禁用 或 禁用改启用
if (null != tAgentConfig.getOpenFlag() && tAgentConfig.getOpenFlag().intValue() == CommonConstants.ZERO_INT){
tAgentConfig.setOpenFlag(CommonConstants.ONE_INT);
}else if (null != tAgentConfig.getOpenFlag() && tAgentConfig.getOpenFlag().intValue() == CommonConstants.ONE_INT){
tAgentConfig.setOpenFlag(CommonConstants.ZERO_INT);
}
if (this.updateById(tAgentConfig)){
return R.ok();
}else {
return R.failed("更新失败!");
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper">
<resultMap id="sysHouseHoldInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo">
<id property="id" column="ID"/>
<result property="organId" column="ORGAN_ID"/>
<result property="name" column="NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="createUser" column="CREATE_USER"/>
<result property="createUserName" column="CREATE_USER_NAME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="type" column="TYPE"/>
<result property="province" column="PROVINCE"/>
<result property="city" column="CITY"/>
<result property="town" column="TOWN"/>
<result property="rmark" column="RMARK"/>
<result property="organName" column="ORGAN_NAME"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.ORGAN_ID,
a.NAME,
a.CREATE_TIME,
a.CREATE_USER,
a.CREATE_USER_NAME,
a.DEL_FLAG,
a.TYPE,
a.PROVINCE,
a.CITY,
a.TOWN,
a.RMARK,
a.ORGAN_NAME,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME
</sql>
<sql id="sysHouseHoldInfo_where">
<if test="sysHouseHoldInfo != null">
<if test="sysHouseHoldInfo.id != null and sysHouseHoldInfo.id.trim() != ''">
AND a.ID = #{sysHouseHoldInfo.id}
</if>
<if test="sysHouseHoldInfo.organId != null and sysHouseHoldInfo.organId.trim() != ''">
AND a.ORGAN_ID = #{sysHouseHoldInfo.organId}
</if>
<if test="sysHouseHoldInfo.name != null and sysHouseHoldInfo.name.trim() != ''">
AND a.NAME = #{sysHouseHoldInfo.name}
</if>
<if test="sysHouseHoldInfo.createTime != null">
AND a.CREATE_TIME = #{sysHouseHoldInfo.createTime}
</if>
<if test="sysHouseHoldInfo.createUser != null and sysHouseHoldInfo.createUser.trim() != ''">
AND a.CREATE_USER = #{sysHouseHoldInfo.createUser}
</if>
<if test="sysHouseHoldInfo.createUserName != null and sysHouseHoldInfo.createUserName.trim() != ''">
AND a.CREATE_USER_NAME = #{sysHouseHoldInfo.createUserName}
</if>
<if test="sysHouseHoldInfo.delFlag != null and sysHouseHoldInfo.delFlag.trim() != ''">
AND a.DEL_FLAG = #{sysHouseHoldInfo.delFlag}
</if>
<if test="sysHouseHoldInfo.type != null and sysHouseHoldInfo.type.trim() != ''">
AND a.TYPE = #{sysHouseHoldInfo.type}
</if>
<if test="sysHouseHoldInfo.province != null and sysHouseHoldInfo.province.trim() != ''">
AND a.PROVINCE = #{sysHouseHoldInfo.province}
</if>
<if test="sysHouseHoldInfo.city != null and sysHouseHoldInfo.city.trim() != ''">
AND a.CITY = #{sysHouseHoldInfo.city}
</if>
<if test="sysHouseHoldInfo.town != null and sysHouseHoldInfo.town.trim() != ''">
AND a.TOWN = #{sysHouseHoldInfo.town}
</if>
<if test="sysHouseHoldInfo.rmark != null and sysHouseHoldInfo.rmark.trim() != ''">
AND a.RMARK = #{sysHouseHoldInfo.rmark}
</if>
<if test="sysHouseHoldInfo.organName != null and sysHouseHoldInfo.organName.trim() != ''">
AND a.ORGAN_NAME = #{sysHouseHoldInfo.organName}
</if>
<if test="sysHouseHoldInfo.createBy != null and sysHouseHoldInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{sysHouseHoldInfo.createBy}
</if>
<if test="sysHouseHoldInfo.updateBy != null and sysHouseHoldInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{sysHouseHoldInfo.updateBy}
</if>
<if test="sysHouseHoldInfo.createName != null and sysHouseHoldInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{sysHouseHoldInfo.createName}
</if>
<if test="sysHouseHoldInfo.updateTime != null">
AND a.UPDATE_TIME = #{sysHouseHoldInfo.updateTime}
</if>
</if>
</sql>
<!--sysHouseHoldInfo简单分页查询-->
<select id="getSysHouseHoldInfoPage" resultMap="sysHouseHoldInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_house_hold_info a
<where>
1=1
<include refid="sysHouseHoldInfo_where"/>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TAgentConfigMapper">
<resultMap id="tAgentConfigMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TAgentConfig">
<id property="id" column="ID"/>
<result property="openFlag" column="OPEN_FLAG"/>
<result property="target" column="TARGET"/>
<result property="province" column="PROVINCE"/>
<result property="city" column="CITY"/>
<result property="medical" column="MEDICAL"/>
<result property="injury" column="INJURY"/>
<result property="bear" column="BEAR"/>
<result property="pension" column="PENSION"/>
<result property="unemployed" column="UNEMPLOYED"/>
<result property="year" column="YEAR"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="createUser" column="CREATE_USER"/>
<result property="startMonth" column="START_MONTH"/>
<result property="endMonth" column="END_MONTH"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.OPEN_FLAG,
a.TARGET,
a.PROVINCE,
a.CITY,
a.MEDICAL,
a.INJURY,
a.BEAR,
a.PENSION,
a.UNEMPLOYED,
a.YEAR,
a.CREATE_TIME,
a.CREATE_USER,
a.START_MONTH,
a.END_MONTH
</sql>
<sql id="tAgentConfig_where">
<if test="tAgentConfig != null">
<if test="tAgentConfig.id != null and tAgentConfig.id.trim() != ''">
AND a.ID = #{tAgentConfig.id}
</if>
<if test="tAgentConfig.openFlag != null">
AND a.OPEN_FLAG = #{tAgentConfig.openFlag}
</if>
<if test="tAgentConfig.target != null">
AND a.TARGET = #{tAgentConfig.target}
</if>
<if test="tAgentConfig.province != null and tAgentConfig.province.trim() != ''">
AND a.PROVINCE = #{tAgentConfig.province}
</if>
<if test="tAgentConfig.city != null and tAgentConfig.city.trim() != ''">
AND a.CITY = #{tAgentConfig.city}
</if>
<if test="tAgentConfig.medical != null and tAgentConfig.medical.trim() != ''">
AND a.MEDICAL = #{tAgentConfig.medical}
</if>
<if test="tAgentConfig.injury != null and tAgentConfig.injury.trim() != ''">
AND a.INJURY = #{tAgentConfig.injury}
</if>
<if test="tAgentConfig.bear != null and tAgentConfig.bear.trim() != ''">
AND a.BEAR = #{tAgentConfig.bear}
</if>
<if test="tAgentConfig.pension != null and tAgentConfig.pension.trim() != ''">
AND a.PENSION = #{tAgentConfig.pension}
</if>
<if test="tAgentConfig.unemployed != null and tAgentConfig.unemployed.trim() != ''">
AND a.UNEMPLOYED = #{tAgentConfig.unemployed}
</if>
<if test="tAgentConfig.year != null and tAgentConfig.year.trim() != ''">
AND a.YEAR = #{tAgentConfig.year}
</if>
<if test="tAgentConfig.createTime != null">
AND a.CREATE_TIME = #{tAgentConfig.createTime}
</if>
<if test="tAgentConfig.createUser != null and tAgentConfig.createUser.trim() != ''">
AND a.CREATE_USER = #{tAgentConfig.createUser}
</if>
<if test="tAgentConfig.startMonth != null and tAgentConfig.startMonth.trim() != ''">
AND a.START_MONTH = #{tAgentConfig.startMonth}
</if>
<if test="tAgentConfig.endMonth != null and tAgentConfig.endMonth.trim() != ''">
AND a.END_MONTH = #{tAgentConfig.endMonth}
</if>
</if>
</sql>
<!--tAgentConfig简单分页查询-->
<select id="getTAgentConfigPage" resultMap="tAgentConfigMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_agent_config a
<where>
1=1
<include refid="tAgentConfig_where"/>
</where>
</select>
</mapper>
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