Commit 8b6bbac4 authored by fangxinjiang's avatar fangxinjiang

人员花名册

parent f09bec24
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* @Author fxj
* @Description 人员花名册 信息
* @Date 11:58 2023/6/19
* @Param
* @return
**/
@Data
public class TSalaryEmpRosterVo {
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号不能为空", maxLength = 32)
@NotBlank(message = "身份证号不能为空")
@Length(max = 32, message = "身份证号不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
private String bankCity;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
private String bankNo;
}
......@@ -26,13 +26,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryEmployeeImportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeEkpUpdateVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -210,5 +208,17 @@ public class TSalaryEmployeeController {
public R updateEmployeeFromEkp(TSalaryEmployeeEkpUpdateVo vo) {
return tSalaryEmployeeService.updateEmployeeFromEkp(vo);
}
/**
* @Author fxj
* @Description 获取员工花名册信息信息
* @Date 10:57 2023/6/19
* @Param
* @return
**/
@Operation(summary = "获取员工花名册信息信息", description = "获取员工花名册信息信息")
@Inner
@PostMapping("/inner/getSalaryEmpRoster")
public List<TSalaryEmpRosterVo> getSalaryEmpRoster(@RequestBody List<String> idCardList) {
return tSalaryEmployeeService.getSalaryEmpRoster(idCardList);
}
}
......@@ -21,6 +21,7 @@ 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.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
import org.apache.ibatis.annotations.Mapper;
......@@ -48,4 +49,6 @@ public interface TSalaryEmployeeMapper extends BaseMapper<TSalaryEmployee> {
List<TSalaryEmployee> getListByIdCard(@Param("idCardList") List<String> idCardList);
TSalaryEmployee getByEmpIdCard(@Param("empIdCard") String empIdCard);
List<TSalaryEmpRosterVo> getSalaryEmpRoster(@Param("idCards") List<String> idCardList);
}
......@@ -23,10 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
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.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryEmployeeImportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeEkpUpdateVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
......@@ -121,4 +118,6 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
* @return {@link R}
**/
R updateEmployeeFromEkp(TSalaryEmployeeEkpUpdateVo vo);
List<TSalaryEmpRosterVo> getSalaryEmpRoster(List<String> idCardList);
}
......@@ -910,4 +910,18 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
}
return R.ok();
}
/**
* @Author fxj
* @Description 获取员工花名册信息信息
* @Date 12:08 2023/6/19
* @Param
* @return
**/
@Override
public List<TSalaryEmpRosterVo> getSalaryEmpRoster(List<String> idCardList){
if (Common.isNotNull(idCardList)){
return baseMapper.getSalaryEmpRoster(idCardList);
}
return null;
}
}
......@@ -67,6 +67,14 @@
<result property="taxMonth" column="TAX_MONTH"/>
<result property="fileStatus" column="FILE_STATUS"/>
</resultMap>
<resultMap id="salaryEmpRosterMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo">
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.EMP_NAME,
......@@ -256,4 +264,20 @@
where a.EMP_IDCARD = #{empIdCard}
ORDER BY a.BANK_CITY DESC LIMIT 1
</select>
<!-- 人员花名册薪资信息 -->
<select id="getSalaryEmpRoster" resultMap="salaryEmpRosterMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo">
select a.EMP_IDCARD,BANK_NO,BANK_NAME,BANK_SUB_NAME,a1.AREA_NAME,a2.AREA_NAME from t_salary_employee a
LEFT JOIN sys_area a1 on a.BANK_PROVINCE=a1.id
LEFT JOIN sys_area a2 on a.BANK_CITY= a2.id
<where>
1=1
<if test="idCards != null and idCards.size>0">
AND a.EMP_IDCARD in
<foreach item="idCard" index="index" collection="idCards" open="(" separator="," close=")">
#{idCard}
</foreach>
</if>
</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