Commit 007ddb19 authored by hongguangwu's avatar hongguangwu

MVP1.7.12-导出人

parent ed358836
/*
* 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.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
@Data
@TableName("t_dispatch_export_log")
@Schema(description = "社保导出花名册记录表")
public class TDispatchExportLog {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 派单ID
*/
@ExcelAttribute(name = "派单ID", isNotEmpty = true, errorInfo = "派单ID不能为空", maxLength = 32)
@NotBlank(message = "派单ID不能为空")
@Length(max = 32, message = "派单ID不能超过32个字符")
@ExcelProperty("派单ID")
@Schema(description = "派单ID")
private String dispatchId;
/**
* 用户ID
*/
@ExcelAttribute(name = "用户ID", isNotEmpty = true, errorInfo = "用户ID不能为空", maxLength = 32)
@NotBlank(message = "用户ID不能为空")
@Length(max = 32, message = "用户ID不能超过32个字符")
@ExcelProperty("用户ID")
@Schema(description = "用户ID")
private String userId;
/**
* 用户名
*/
@ExcelAttribute(name = "用户名", isNotEmpty = true, errorInfo = "用户名不能为空", maxLength = 32)
@NotBlank(message = "用户名不能为空")
@Length(max = 32, message = "用户名不能超过32个字符")
@ExcelProperty("用户名")
@Schema(description = "用户名")
private String userName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("创建时间")
@ColumnWidth(18)
private LocalDateTime createTime;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
......@@ -495,4 +496,16 @@ public class SocialHandleExportVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保停缴日期" )
private String socialReduceDate;
// 备注——社保导出花名册,用来显示异常信息的(例如不是办理人却导出)
@ExcelAttribute(name = "备注")
@ContentStyle(dataFormat = 49)
@Schema(description = "备注")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("备注" )
private String errorRemark;
// 记录导出花名册的人使用
@ExcelIgnore
private String dispatchId;
}
/*
* 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.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchExportLog;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchExportLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tdispatchexportlog")
@Tag(name = "社保导出花名册记录表管理")
public class TDispatchExportLogController {
private final TDispatchExportLogService tDispatchExportLogService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tDispatchExportLog 社保导出花名册记录表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TDispatchExportLog>> getTDispatchExportLogPage(Page<TDispatchExportLog> page, TDispatchExportLog tDispatchExportLog) {
return new R<>(tDispatchExportLogService.getTDispatchExportLogPage(page, tDispatchExportLog));
}
}
......@@ -679,12 +679,15 @@ public class TDispatchInfoController {
@RequestBody SocialHandleSearchVo searchVo) {
searchVo.setDeleteFlag(CommonConstants.ZERO_STRING);
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return;
}
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
searchVo.setCreateBy(user.getId());
tDispatchInfoService.doexportSocialRecordRoster(response,searchVo,searchVo.getIdStr(),null);
tDispatchInfoService.doexportSocialRecordRoster(response,searchVo,searchVo.getIdStr(),null, user);
}
/**
......
/*
* 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.TDispatchExportLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
@Mapper
public interface TDispatchExportLogMapper extends BaseMapper<TDispatchExportLog> {
/**
* 社保导出花名册记录表简单分页查询
*
* @param tDispatchExportLog 社保导出花名册记录表
* @return
*/
IPage<TDispatchExportLog> getTDispatchExportLogPage(Page<TDispatchExportLog> page
, @Param("tDispatchExportLog") TDispatchExportLog tDispatchExportLog);
}
......@@ -56,4 +56,6 @@ public interface TSocialfundHouseResMapper extends BaseMapper<TSocialfundHouseRe
**/
void deleteByUserIdAndHuName(@Param("tSocialfundHouseRes") TSocialfundHouseRes tSocialfundHouseRes);
List<String> getSocialListByUserId(@Param("userId") String userId);
}
/*
* 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.social.entity.TDispatchExportLog;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
public interface TDispatchExportLogService extends IService<TDispatchExportLog> {
/**
* 社保导出花名册记录表简单分页查询
*
* @param tDispatchExportLog 社保导出花名册记录表
* @return
*/
IPage<TDispatchExportLog> getTDispatchExportLogPage(Page<TDispatchExportLog> page, TDispatchExportLog tDispatchExportLog);
}
......@@ -106,7 +106,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
* @return: void
**/
void doExportSocialSoldierAll(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields);
void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields);
void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields, YifuUser user);
/**
* @Description: 社保士兵办理列表查询
......
......@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
/**
* 社保公积金户权限配置表
......@@ -66,4 +67,12 @@ public interface TSocialfundHouseResService extends IService<TSocialfundHouseRes
R<List<ErrorMessage>> importDiy(InputStream inputStream);
R<List<ErrorMessage>> importDiyAll(InputStream inputStream, String type);
/**
* @Description: 获取登录人的社保办理权限
* @Author: hgw
* @Date: 2025/6/16 11:31
* @return: java.util.Map<java.lang.String, java.lang.Integer>
**/
Map<String, Integer> getMapByHandleUser(String userId);
}
/*
* 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.social.entity.TDispatchExportLog;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchExportLogMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchExportLogService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 社保导出花名册记录表
*
* @author hgw
* @date 2025-06-16 14:29:13
*/
@Log4j2
@Service
public class TDispatchExportLogServiceImpl extends ServiceImpl<TDispatchExportLogMapper, TDispatchExportLog> implements TDispatchExportLogService {
/**
* 社保导出花名册记录表简单分页查询
*
* @param tDispatchExportLog 社保导出花名册记录表
* @return
*/
@Override
public IPage<TDispatchExportLog> getTDispatchExportLogPage(Page<TDispatchExportLog> page, TDispatchExportLog tDispatchExportLog) {
return baseMapper.getTDispatchExportLogPage(page, tDispatchExportLog);
}
}
......@@ -61,10 +61,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.constants.PreDispatchConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchSocialFundInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFreindSetService;
import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.util.DoSocialTask;
import com.yifu.cloud.plus.v1.yifu.social.util.ExcelMergeImage;
import com.yifu.cloud.plus.v1.yifu.social.util.ExcelToImage;
......@@ -82,7 +79,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -154,6 +150,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Autowired
private TAttaInfoMapper attaInfoMapper;
private final TSocialfundHouseResService tSocialfundHouseResService;
private final TDispatchExportLogService tDispatchExportLogService;
/**
* 派单信息记录表简单分页查询
*
......@@ -5559,7 +5558,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @return
**/
@Override
public void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields) {
public void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr
, String[] exportFields, YifuUser user) {
String fileName = DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+ DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<SocialHandleExportVo> list = new ArrayList<>();
......@@ -5572,21 +5572,52 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, SocialHandleExportVo.class).build();
int index = 0;
String userId = user.getId();
String userName = user.getNickname();
if (count > CommonConstants.ZERO_INT){
// 加上非办理人,导出只有姓名身份证和异常
Map<String, Integer> socialHuMap = tSocialfundHouseResService.getMapByHandleUser(userId);
WriteSheet writeSheet;
ExcelUtil<SocialHandleExportVo> util;
String errorRemark = "暂无权限";
// 导出日志list
List<TDispatchExportLog> logList;
TDispatchExportLog exportLog;
SocialHandleExportVo newErrorVo;
SocialHandleExportVo vo;
for (int i = 0; i <= count; ) {
logList = new ArrayList<>();
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = getRecordRosterList(searchVo,idStr);
if (Common.isNotNull(list)){
if (Common.isNotNull(list)) {
util = new ExcelUtil<>(SocialHandleExportVo.class);
for (SocialHandleExportVo vo:list){
util.convertEntity(vo,null,null,null);
for (int j =0;j< list.size(); j++) {
vo = list.get(j);
util.convertEntity(vo, null, null, null);
if (Common.isNotNull(vo.getSocialHouseholdName())) {
if (socialHuMap.get(vo.getSocialHouseholdName()) == null) {
newErrorVo = new SocialHandleExportVo();
newErrorVo.setEmpName(vo.getEmpName());
newErrorVo.setEmpMobile(vo.getEmpMobile());
newErrorVo.setErrorRemark(errorRemark);
// 将list的该vo替换成新vo
list.set(j, newErrorVo);
} else {
exportLog = new TDispatchExportLog();
exportLog.setDispatchId(vo.getDispatchId());
exportLog.setCreateTime(LocalDateTime.now());
exportLog.setUserId(userId);
exportLog.setUserName(userName);
logList.add(exportLog);
}
}
}
}
if (Common.isNotNull(list)){
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet(DispatchConstants.SOCIAL_RECORD_ROSTER_EXPORT+index).build();
excelWriter.write(list,writeSheet);
index++;
......@@ -5596,6 +5627,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list.clear();
}
updateSocialRecords(searchVo,idStr);
// 新增导出人记录
if (!logList.isEmpty()) {
tDispatchExportLogService.saveBatch(logList);
}
}
excelWriter.finish();
}else {
......
......@@ -550,4 +550,25 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN,excel));
}
}
/**
* @Description: 获取登录人的社保办理权限
* @Author: hgw
* @Date: 2025/6/16 11:31
* @return: java.util.Map<java.lang.String, java.lang.Integer>
**/
@Override
public Map<String, Integer> getMapByHandleUser(String userId) {
Map<String, Integer> map = new HashMap<>();
if (Common.isNotNull(userId)){
List<String> socialList = baseMapper.getSocialListByUserId(userId);
if (Common.isNotNull(socialList)){
for (String social : socialList) {
map.put(social, CommonConstants.ONE_INT);
}
}
}
return map;
}
}
<?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.TDispatchExportLogMapper">
<resultMap id="tDispatchExportLogMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchExportLog">
<id property="id" column="ID"/>
<result property="dispatchId" column="DISPATCH_ID"/>
<result property="userId" column="USER_ID"/>
<result property="userName" column="USER_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.DISPATCH_ID,
a.USER_ID,
a.USER_NAME,
a.CREATE_TIME
</sql>
<sql id="tDispatchExportLog_where">
<if test="tDispatchExportLog != null">
<if test="tDispatchExportLog.id != null and tDispatchExportLog.id.trim() != ''">
AND a.ID = #{tDispatchExportLog.id}
</if>
<if test="tDispatchExportLog.dispatchId != null and tDispatchExportLog.dispatchId.trim() != ''">
AND a.DISPATCH_ID = #{tDispatchExportLog.dispatchId}
</if>
<if test="tDispatchExportLog.userId != null and tDispatchExportLog.userId.trim() != ''">
AND a.USER_ID = #{tDispatchExportLog.userId}
</if>
<if test="tDispatchExportLog.userName != null and tDispatchExportLog.userName.trim() != ''">
AND a.USER_NAME = #{tDispatchExportLog.userName}
</if>
<if test="tDispatchExportLog.createTime != null">
AND a.CREATE_TIME = #{tDispatchExportLog.createTime}
</if>
</if>
</sql>
<!--tDispatchExportLog简单分页查询-->
<select id="getTDispatchExportLogPage" resultMap="tDispatchExportLogMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_dispatch_export_log a
<where>
1=1
<include refid="tDispatchExportLog_where"/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
......@@ -1192,6 +1192,7 @@
<result property="graduationTime" column="GRADUATION_TIME"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="socialReduceDate" column="SOCIAL_REDUCE_DATE"/>
<result property="dispatchId" column="DISPATCH_ID"/>
</resultMap>
<resultMap id="fundHandleMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.FundHandleExportVo">
......@@ -1284,7 +1285,9 @@
a.FIRST_PAY_TIME,
a.GRADUATION_TIME,
IF(a.LEAVE_DATE is not null,DATE_FORMAT(a.LEAVE_DATE,"%Y-%m-%d"),"") as "LEAVE_DATE",
IF(a.SOCIAL_REDUCE_DATE is not null,DATE_FORMAT(a.SOCIAL_REDUCE_DATE,"%Y-%m-%d"),"") as "SOCIAL_REDUCE_DATE"
IF(a.SOCIAL_REDUCE_DATE is not null,DATE_FORMAT(a.SOCIAL_REDUCE_DATE,"%Y-%m-%d"),"") as "SOCIAL_REDUCE_DATE",
a.ID as "DISPATCH_ID"
FROM t_dispatch_info a
left join t_social_info s on a.SOCIAL_ID = s.id
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
......@@ -1436,6 +1439,19 @@
left join t_dispatch_social_fund_info h on a.id = h.REDUCE_SOCIAL_FUND_ID
set a.EXPORT_SOCIAL_FLAG = 1
<include refid="where_getSocialRecordRoster"/>
<if test="tDispatchInfo == null or tDispatchInfo.createBy == null or tDispatchInfo.createBy.trim() == ''">
and 1=2
</if>
<if test="tDispatchInfo != null and tDispatchInfo.createBy != null and tDispatchInfo.createBy.trim() != ''">
AND (s.SOCIAL_HOUSEHOLD_NAME IS NOT NULL
AND s.SOCIAL_HOUSEHOLD_NAME IN (
SELECT SOCIAL_HOUSEHOLD FROM t_socialfund_house_res
WHERE user_id = #{tDispatchInfo.createBy} AND STATUS = '0'
AND AUTH_TYPE = '1' AND HOUSE_NAME_TYPE = '0'
)
)
</if>
</update>
<!--tDispatchInfo 社保花名册数据查询count-->
......
......@@ -126,4 +126,8 @@
</if>
</delete>
<select id="getSocialListByUserId" resultType="java.lang.String">
SELECT a.SOCIAL_HOUSEHOLD FROM t_socialfund_house_res a WHERE user_id = #{userId} AND STATUS = '0' AND AUTH_TYPE = '1' AND HOUSE_NAME_TYPE = '0'
</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