Commit 4b8b7c36 authored by hongguangwu's avatar hongguangwu

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

parents b9b4e623 5544ec9a
...@@ -144,9 +144,9 @@ public class TEmployeeProject extends BaseEntity { ...@@ -144,9 +144,9 @@ public class TEmployeeProject extends BaseEntity {
private Integer isLeaveEmployee; private Integer isLeaveEmployee;
/** /**
* 已产生未结算费用 0:划转 1:不划转 * 已产生未结算费用 0:不划转 1:划转
*/ */
@Schema(description ="已产生未结算费用(0:划转 1:不划转)") @Schema(description ="已产生未结算费用(0:不划转 1:划转)")
@TableField(exist = false) @TableField(exist = false)
private String unsettleDeal; private String unsettleDeal;
......
...@@ -78,7 +78,6 @@ public class TEmpChangeInfoVO implements Serializable { ...@@ -78,7 +78,6 @@ public class TEmpChangeInfoVO implements Serializable {
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="已产生未结算费用") @ExcelProperty(value ="已产生未结算费用")
@NotNull(message = "已产生未结算费用不能为空")
private String unsettleDeal; private String unsettleDeal;
/** /**
......
...@@ -139,8 +139,8 @@ public class TEmpChangeInfoController { ...@@ -139,8 +139,8 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有项目名称", description = "获取所有项目名称") @Operation(summary = "获取所有项目名称", description = "获取所有项目名称")
@SysLog("获取所有项目名称" ) @SysLog("获取所有项目名称" )
@GetMapping("/getAllDept" ) @GetMapping("/getAllDept" )
public R<List<TSettleDomain>> getAllDept() { public R<List<TSettleDomain>> getAllDept(@RequestParam(required = false,name = "customerName") String customerName) {
return tEmpChangeInfoService.getAllDept(); return tEmpChangeInfoService.getAllDept(customerName);
} }
/** /**
...@@ -152,8 +152,8 @@ public class TEmpChangeInfoController { ...@@ -152,8 +152,8 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有单位名称", description = "获取所有单位名称") @Operation(summary = "获取所有单位名称", description = "获取所有单位名称")
@SysLog("获取所有单位名称" ) @SysLog("获取所有单位名称" )
@GetMapping("/getAllUint" ) @GetMapping("/getAllUint" )
public R<List<TCustomerInfo>> getAllUint() { public R<List<TCustomerInfo>> getAllUint(@RequestParam(required = false,name = "customerName") String customerName) {
return tEmpChangeInfoService.getAllUint(); return tEmpChangeInfoService.getAllUint(customerName);
} }
/** /**
......
...@@ -223,7 +223,6 @@ public class TEmployeeContractInfoController { ...@@ -223,7 +223,6 @@ public class TEmployeeContractInfoController {
if (Common.isNotNull(tEmployeeContractInfo.getAuditRemark()) && tEmployeeContractInfo.getAuditRemark().length() > 200) { if (Common.isNotNull(tEmployeeContractInfo.getAuditRemark()) && tEmployeeContractInfo.getAuditRemark().length() > 200) {
return R.failed("审核说明不可超过200字!"); return R.failed("审核说明不可超过200字!");
} }
tEmployeeContractInfo.setAuditRemark(Common.isBlankToNullString(tEmployeeContractInfo.getReason()) + tEmployeeContractInfo.getAuditRemark());
return tEmployeeContractInfoService.auditContract(tEmployeeContractInfo); return tEmployeeContractInfoService.auditContract(tEmployeeContractInfo);
} }
......
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -32,5 +33,5 @@ import java.util.List; ...@@ -32,5 +33,5 @@ import java.util.List;
@Mapper @Mapper
public interface TCustomerInfoMapper extends BaseMapper<TCustomerInfo> { public interface TCustomerInfoMapper extends BaseMapper<TCustomerInfo> {
List<TCustomerInfo> getAllUnit(); List<TCustomerInfo> getAllUnit(@Param("customerName") String customerName);
} }
...@@ -30,5 +30,5 @@ import java.util.List; ...@@ -30,5 +30,5 @@ import java.util.List;
*/ */
public interface TCustomerInfoService extends IService<TCustomerInfo> { public interface TCustomerInfoService extends IService<TCustomerInfo> {
List<TCustomerInfo> getAllUnit(); List<TCustomerInfo> getAllUnit(String customerName);
} }
...@@ -57,16 +57,18 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> { ...@@ -57,16 +57,18 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
* @param customerName
*/ */
R<List<TSettleDomain>> getAllDept(); R<List<TSettleDomain>> getAllDept(String customerName);
/** /**
* 获取所有单位名称 * 获取所有单位名称
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
* @param customerName
*/ */
R<List<TCustomerInfo>> getAllUint(); R<List<TCustomerInfo>> getAllUint(String customerName);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId); IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId);
} }
...@@ -34,7 +34,7 @@ import java.util.List; ...@@ -34,7 +34,7 @@ import java.util.List;
public class TCustomerInfoServiceImpl extends ServiceImpl<TCustomerInfoMapper, TCustomerInfo> implements TCustomerInfoService { public class TCustomerInfoServiceImpl extends ServiceImpl<TCustomerInfoMapper, TCustomerInfo> implements TCustomerInfoService {
@Override @Override
public List<TCustomerInfo> getAllUnit() { public List<TCustomerInfo> getAllUnit(String customerName) {
return baseMapper.getAllUnit(); return baseMapper.getAllUnit(customerName);
} }
} }
...@@ -165,7 +165,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -165,7 +165,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
} }
errorMsg = new HashSet<>(); errorMsg = new HashSet<>();
TEmpChangeInfoVO excel = excelVOList.get(i); TEmpChangeInfoVO excel = excelVOList.get(i);
excel.setUnsettleDeal(CommonConstants.IS_NO_CHANGE);
if (Common.isNotNull(excel.getChangeStartMonth()) && excel.getChangeStartMonth().length() > CommonConstants.dingleDigitIntArray[6]) { if (Common.isNotNull(excel.getChangeStartMonth()) && excel.getChangeStartMonth().length() > CommonConstants.dingleDigitIntArray[6]) {
errorMsg.add("划转起始月长度不能超过6位"); errorMsg.add("划转起始月长度不能超过6位");
} }
...@@ -227,7 +227,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -227,7 +227,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeePro.setUnitName(tCustomerInfo.getCustomerName()); updateTEmployeePro.setUnitName(tCustomerInfo.getCustomerName());
} }
updateTEmployeePro.setChangeStartMonth(excel.getChangeStartMonth()); updateTEmployeePro.setChangeStartMonth(excel.getChangeStartMonth());
updateTEmployeePro.setUnsettleDeal(excel.getUnsettleDeal()); updateTEmployeePro.setUnsettleDeal(CommonConstants.IS_NO_CHANGE);
updateList.add(updateTEmployeePro); updateList.add(updateTEmployeePro);
// 记录变更日志 // 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro); tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro);
...@@ -276,11 +276,18 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -276,11 +276,18 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
* @param customerName
*/ */
@Override @Override
public R<List<TSettleDomain>> getAllDept() { public R<List<TSettleDomain>> getAllDept(String customerName) {
List<TSettleDomain> list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL) List<TSettleDomain> list = null;
if (Common.isNotNull(customerName)){
list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL).eq(TSettleDomain::getCustomerName,customerName));
}else {
list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL)); .eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
}
return R.ok(list); return R.ok(list);
} }
...@@ -289,11 +296,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -289,11 +296,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
* @param customerName
*/ */
@Override @Override
public R<List<TCustomerInfo>> getAllUint() { public R<List<TCustomerInfo>> getAllUint(String customerName) {
//List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL)); //List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
List<TCustomerInfo> list = tCustomerInfoService.getAllUnit(); List<TCustomerInfo> list = tCustomerInfoService.getAllUnit(customerName);
return R.ok(list); return R.ok(list);
} }
......
...@@ -62,6 +62,13 @@ ...@@ -62,6 +62,13 @@
</resultMap> </resultMap>
<select id="getAllUnit" resultMap="tCustomerInfoMap"> <select id="getAllUnit" resultMap="tCustomerInfoMap">
select a.CUSTOMER_ID AS "ID",a.CUSTOMER_NAME AS "CUSTOMER_NAME",a.CUSTOMER_NO AS "CUSTOMER_CODE" from t_settle_domain a GROUP BY A.CUSTOMER_NO select a.CUSTOMER_ID AS "ID",a.CUSTOMER_NAME AS "CUSTOMER_NAME",a.CUSTOMER_NO AS "CUSTOMER_CODE" from t_settle_domain a
<where>
1=1
<if test="customerName != null and customerName != null">
and a.CUSTOMER_NAME like concat(#{customerName},'%')
</if>
</where>
GROUP BY A.CUSTOMER_NO
</select> </select>
</mapper> </mapper>
...@@ -392,6 +392,8 @@ public interface CommonConstants { ...@@ -392,6 +392,8 @@ public interface CommonConstants {
// 是否 // 是否
String IS_CHANGE = "划转"; String IS_CHANGE = "划转";
String IS_NO_CHANGE = "不划转";
// 年 // 年
String YEAR = "年"; String YEAR = "年";
// 月 // 月
......
...@@ -618,7 +618,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -618,7 +618,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
errorMessageList), yfSocialImportThreadPoolExecutor); errorMessageList), yfSocialImportThreadPoolExecutor);
completableFutureList.add(listCompletableFuture); completableFutureList.add(listCompletableFuture);
} }
// 阻塞当前线程,等待所有的线程执行完毕 // 阻塞当前线程,等待所有的线程执行完毕
boolean computeFlag; boolean computeFlag;
do { do {
...@@ -634,12 +633,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -634,12 +633,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
log.error("社保缴费库数据批量导入异常:" + e); log.error("社保缴费库数据批量导入异常:" + e);
redisUtil.remove(key); redisUtil.remove(key);
} }
// -----------------------------线程池处理list,批量保存社保信息结束--------------------------------
//最后一个推送
log.info("社保批量导入耗时:{}", (System.currentTimeMillis() - start) + "");
redisUtil.remove(key);
} }
} }
redisUtil.remove(key);
} }
} }
......
...@@ -40,8 +40,6 @@ public interface SysDeptMapper extends BaseMapper<SysDept> { ...@@ -40,8 +40,6 @@ public interface SysDeptMapper extends BaseMapper<SysDept> {
*/ */
List<SysDept> listDepts(); List<SysDept> listDepts();
List<String> selectDnList();
SysDept selectCountId(@Param("deptId")Long deptId); SysDept selectCountId(@Param("deptId")Long deptId);
int updateDeptById(@Param("dept") SysDept dept); int updateDeptById(@Param("dept") SysDept dept);
......
...@@ -183,15 +183,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl ...@@ -183,15 +183,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
@Override @Override
public R<Boolean> updateDeptByLdap() { public R<Boolean> updateDeptByLdap() {
List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay(); List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay();
//获取ldap所有的dn
List<String> entryDnList = entryList.stream().map(SearchResultEntry::getDN).collect(Collectors.toList());
//获取本地dept表中所有的dn
List<String> dnList = baseMapper.selectDnList();
List<String> delList = dnList.stream().filter(p-> !entryDnList.contains(p)).collect(Collectors.toList());
//删除ldap中不存在的dn的数据
if (!delList.isEmpty()) {
baseMapper.delete(Wrappers.<SysDept>query().lambda().in(SysDept::getDeptDn, delList));
}
List<Map<String,Object>> updUserList = new ArrayList<>(); List<Map<String,Object>> updUserList = new ArrayList<>();
for (SearchResultEntry entry : entryList) { for (SearchResultEntry entry : entryList) {
String dn = entry.getDN(); String dn = entry.getDN();
...@@ -273,7 +264,9 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl ...@@ -273,7 +264,9 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
} }
} }
//更新用户信息 //更新用户信息
if (!updUserList.isEmpty()) {
sysUserMapper.updateUser(updUserList); sysUserMapper.updateUser(updUserList);
}
return R.ok(); return R.ok();
} }
} }
...@@ -437,15 +437,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -437,15 +437,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
} }
} }
List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay(); List<SearchResultEntry> entryList = ldapUtil.getAllPersonNamesWithTraditionalWay();
//获取ldap所有的dn
List<String> entryDnList = entryList.stream().map(SearchResultEntry::getDN).collect(Collectors.toList());
//获取本地dept表中所有的dn
List<String> dnList = sysDeptMapper.selectDnList();
List<String> delList = dnList.stream().filter(p-> !entryDnList.contains(p)).collect(Collectors.toList());
//删除ldap中不存在的dn的数据
if (!delList.isEmpty()) {
sysDeptMapper.delete(Wrappers.<SysDept>query().lambda().in(SysDept::getDeptDn, delList));
}
List<Map<String,Object>> updUserList = new ArrayList<>(); List<Map<String,Object>> updUserList = new ArrayList<>();
for (SearchResultEntry entry : entryList) { for (SearchResultEntry entry : entryList) {
String dn = entry.getDN(); String dn = entry.getDN();
...@@ -474,6 +465,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -474,6 +465,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if (Common.isNotNull(entry.getAttributeValue("x-ouid"))) { if (Common.isNotNull(entry.getAttributeValue("x-ouid"))) {
insertSysDept.setDeptId(Long.valueOf(entry.getAttributeValue("x-ouid"))); insertSysDept.setDeptId(Long.valueOf(entry.getAttributeValue("x-ouid")));
} }
insertSysDept.setDelFlag(CommonConstants.ZERO_STRING);
sysDeptMapper.insert(insertSysDept); sysDeptMapper.insert(insertSysDept);
} }
} }
...@@ -482,7 +474,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -482,7 +474,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
sysDeptMapper.updateDeptById(sysDept); sysDeptMapper.updateDeptById(sysDept);
} }
} else { } else {
SysDept sysDept = sysDeptMapper.selectOne(Wrappers.<SysDept>query().lambda().eq(SysDept::getDeptDn, dn.substring(dn.indexOf("ou=", 2), dn.length()))); SysDept sysDept = sysDeptMapper.selectDeptDn(dn.substring(dn.indexOf("ou=", 2), dn.length()));
if (null != sysDept) { if (null != sysDept) {
SysDept sysDeptCount = sysDeptMapper.selectDeptDn(dn); SysDept sysDeptCount = sysDeptMapper.selectDeptDn(dn);
if (null == sysDeptCount) { if (null == sysDeptCount) {
...@@ -501,6 +493,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -501,6 +493,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if (Common.isNotNull(entry.getAttributeValue("x-ouid"))) { if (Common.isNotNull(entry.getAttributeValue("x-ouid"))) {
insertSysDept.setDeptId(Long.valueOf(entry.getAttributeValue("x-ouid"))); insertSysDept.setDeptId(Long.valueOf(entry.getAttributeValue("x-ouid")));
} }
insertSysDept.setDelFlag(CommonConstants.ZERO_STRING);
sysDeptMapper.insert(insertSysDept); sysDeptMapper.insert(insertSysDept);
} }
} }
......
...@@ -31,14 +31,6 @@ ...@@ -31,14 +31,6 @@
<result column="del_flag" property="delFlag"/> <result column="del_flag" property="delFlag"/>
</resultMap> </resultMap>
<!--查询所有dn-->
<select id="selectDnList" resultType="String">
SELECT a.dept_dn
FROM sys_dept a
WHERE a.del_flag = 0
AND a.dept_dn IS NOT NULL
</select>
<select id="selectCountId" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept"> <select id="selectCountId" resultType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept">
SELECT SELECT
* *
...@@ -63,6 +55,7 @@ ...@@ -63,6 +55,7 @@
<if test="dept.name != null">name=#{dept.name},</if> <if test="dept.name != null">name=#{dept.name},</if>
<if test="dept.parentId != null">parent_id=#{dept.parentId},</if> <if test="dept.parentId != null">parent_id=#{dept.parentId},</if>
<if test="dept.deptDn != null">dept_dn=#{dept.deptDn},</if> <if test="dept.deptDn != null">dept_dn=#{dept.deptDn},</if>
del_flag = '0',
update_time = now() update_time = now()
</trim> </trim>
WHERE dept_id=#{dept.deptId} WHERE dept_id=#{dept.deptId}
......
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