Commit 0254a835 authored by huyuchen's avatar huyuchen

huych-商险接口推送优化

parent 7c44e233
......@@ -36,6 +36,7 @@ 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.vo.TInsuranceUnpurchasePersonCardVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardUnprojectVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -367,4 +368,17 @@ public class TEmployeeProjectController {
public Boolean selectExitEmpProject(@RequestBody TInsuranceUnpurchasePersonCardVo cardVo) {
return tEmployeeProjectService.selectExitEmpProject(cardVo);
}
/**
* @param id 项目主键
* @Description: 通过id获取结算主体及单位部分信息
* @Author: huyc
* @Date: 2025/2/25 17:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo>
**/
@Inner
@PostMapping("/inner/getUnProjectEmpList")
public List<TSalaryStandardUnprojectVo> getUnProjectEmpList(@RequestBody List<TSalaryStandardUnprojectVo> voList) {
return tEmployeeProjectService.getUnProjectEmpList(voList);
}
}
......@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
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.vo.TInsuranceUnpurchasePersonCardVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardUnprojectVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
......@@ -40,7 +41,7 @@ import java.util.Map;
* @date 2022-06-20 09:19:40
*/
public interface TEmployeeProjectService extends IService<TEmployeeProject> {
List<TSalaryStandardUnprojectVo> getUnProjectEmpList(List<TSalaryStandardUnprojectVo> voList);
/**
* @param tEmployeeProject
* @Description: 新增项目档案校验
......
......@@ -53,6 +53,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardUnprojectVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -112,6 +113,28 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Autowired
private TEmployeeContractAuditService tEmployeeContractAuditService;
@Override
public List<TSalaryStandardUnprojectVo> getUnProjectEmpList(List<TSalaryStandardUnprojectVo> voList) {
List<TSalaryStandardUnprojectVo> unProjectList = new ArrayList<>();
if (!voList.isEmpty()) {
TEmployeeProject employeeProject;
for (TSalaryStandardUnprojectVo vo : voList) {
employeeProject = this.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, vo.getEmpIdcard())
.eq(TEmployeeProject::getDeptNo, vo.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
);
if (Common.isEmpty(employeeProject)) {
unProjectList.add(vo);
}
}
return unProjectList;
} else {
return null;
}
}
@Override
public R addCheck(TEmployeeProject tEmployeeProject) {
......
......@@ -44,6 +44,9 @@ public class IdCardUtil {
Calendar cal = Calendar.getInstance();
// 把出生日期放入Calendar类型的bir对象中,进行Calendar和Date类型进行转换
Calendar bir = Calendar.getInstance();
if (null == birthday) {
return 1;
}
bir.setTime(birthday);
// 如果生日大于当前日期,则抛出异常:出生日期不能大于当前日期
if (cal.before(birthday)) {
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Date 2022/8/8
* @Description
* @Version 1.0
*/
@Data
public class TSalaryStandardUnprojectVo implements Serializable {
/**
* 工资表id
*/
private String salaryId;
/**
* 项目名称
*/
private String deptName;
/**
* 项目编码
*/
private String deptNo;
/**
* 申请编号
*/
private String applyNo;
/**
* 工资月份(YYYYMM)
*/
private String salaryMonth;
/**
* 结算月
*/
private String settlementMonth;
/**
* 应发薪酬(劳务费、稿酬)
*/
private BigDecimal relaySalary;
/**
* 实发(个人实收)
*/
private BigDecimal actualSalary;
/**
* 员工姓名
*/
private String empName;
/**
* 员工身份证号
*/
private String empIdcard;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
private String createName;
}
......@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountByEkpDiffVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardUnprojectVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -57,6 +58,7 @@ public class TSalaryStandardController {
private final TSalaryStandardService tSalaryStandardService;
private final MenuUtil menuUtil;
/**
* 简单分页查询-申请
*
......@@ -310,4 +312,17 @@ public class TSalaryStandardController {
return tSalaryStandardService.saveSalaryDiff(voList);
}
/**
* 获取不在项人员发薪人员列表
*
* @return
*/
@SysLog("获取不在项人员发薪人员列表")
@Operation(description = "获取不在项人员发薪人员列表")
@GetMapping("/getUnDeptSalaryList")
public R<IPage<TSalaryStandardUnprojectVo>> getUnDeptSalaryList(Page<TSalaryStandardUnprojectVo> page, String deptNo) {
return new R<>(tSalaryStandardService.getUnDeptSalaryList(page, deptNo));
}
}
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardUnprojectVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -44,6 +45,11 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
IPage<TSalaryStandard> getTSalaryStandardPage(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard);
IPage<TSalaryStandard> getTSalaryStandardPageApply(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard);
List<TSalaryStandardUnprojectVo> getSalaryEmpUnprojectList(@Param("deptNo") String deptNo);
IPage<TSalaryStandardUnprojectVo> getSalaryStandardUnprojectList(Page<TSalaryStandardUnprojectVo> page, @Param("salaryId") String salaryId, @Param("idCardList") List<String> idCardList);
/**
* 标准薪酬工资表审核页面简单分页查询
* @param tSalaryStandard 标准薪酬工资表
......
......@@ -23,10 +23,7 @@ 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.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountByEkpDiffVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
......@@ -154,4 +151,11 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/
R<List<SalaryRiskVo>> judgeRisk(TSalaryStandard s, YifuUser user);
/**
* @Description: 分页查询-不在项人员工资明细
* @Author: huych
* @Date: 2025/2/25 19:32
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardUnprojectVo>
**/
IPage<TSalaryStandardUnprojectVo> getUnDeptSalaryList(Page<TSalaryStandardUnprojectVo> page, String deptNo);
}
......@@ -67,6 +67,7 @@ import java.io.IOException;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.util.*;
import java.util.stream.Collectors;
/**
* 标准薪酬工资表
......@@ -124,6 +125,30 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return baseMapper.getTSalaryStandardPage(page, tSalaryStandard);
}
@Override
public IPage<TSalaryStandardUnprojectVo> getUnDeptSalaryList(Page<TSalaryStandardUnprojectVo> page, String deptNo) {
List<TSalaryStandardUnprojectVo> voList = baseMapper.getSalaryEmpUnprojectList(deptNo);
String salaryId;
if (null != voList && !voList.isEmpty()) {
salaryId = voList.get(0).getSalaryId();
} else {
return null;
}
//找到不在项人员的身份证信息
R<List<TSalaryStandardUnprojectVo>> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/temployeeproject/inner/getUnProjectEmpList", voList, TSalaryStandardUnprojectVo.class, SecurityConstants.FROM_IN);
// 结算主体
List<TSalaryStandardUnprojectVo> unEmpList = new ArrayList<>();
if (sdr != null && sdr.getData() != null) {
unEmpList = sdr.getData();
}
if (null != unEmpList && !unEmpList.isEmpty()) {
List<String> idCardList = unEmpList.stream().map(TSalaryStandardUnprojectVo::getEmpIdcard).collect(Collectors.toList());
return baseMapper.getSalaryStandardUnprojectList(page,salaryId, idCardList);
}
return null;
}
/**
* 标准薪酬工资表批量导出
*
......
......@@ -389,6 +389,20 @@
<result property="formType" column="FORM_TYPE"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<resultMap id="salaryStandardUnprojectMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardUnprojectVo">
<result property="salaryId" column="ID"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="createName" column="CREATE_NAME"/>
<result property="salaryMonth" column="SALARY_MONTH"/>
<result property="settlementMonth" column="SETTLEMENT_MONTH"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="relaySalary" column="RELAY_SALARY"/>
<result property="actualSalary" column="ACTUAL_SALARY"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
</resultMap>
<!--tSalaryStandard简单分页查询-->
<select id="getSalaryStandardExport" resultMap="salaryStandardExportMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo">
SELECT
......@@ -536,4 +550,63 @@
</if>
</select>
<!-- 获取薪资条数 -->
<select id="getSalaryEmpUnprojectList" resultMap="salaryStandardUnprojectMap">
SELECT
acc.DEPT_NO,
acc.EMP_IDCARD,
lll.id
FROM
t_salary_standard lll
LEFT JOIN t_salary_account acc ON lll.id = acc.SALARY_FORM_ID AND acc.DELETE_FLAG = 0
WHERE
lll.id IN (
SELECT
b.id
FROM
(
SELECT
a.DEPT_NO,
a.id,
max( a.CREATE_TIME ) CREATE_TIME
FROM
t_salary_standard a
WHERE
a.DELETE_FLAG = 0
AND length(ifnull( a.DEPT_NO, '')) > 0
AND a.dept_no = #{deptNo}
GROUP BY
a.DEPT_NO
) hh
INNER JOIN t_salary_standard b ON hh.DEPT_NO = b.DEPT_NO
AND hh.CREATE_TIME = b.CREATE_TIME
)
</select>
<!-- 获取薪资条数 -->
<select id="getSalaryStandardUnprojectList" resultMap="salaryStandardUnprojectMap">
SELECT
acc.SALARY_MONTH,
acc.SETTLEMENT_MONTH,
acc.DEPT_NAME,
acc.DEPT_NO,
acc.EMP_NAME,
acc.EMP_IDCARD,
acc.EMP_NAME,
acc.RELAY_SALARY,
acc.ACTUAL_SALARY,
lll.APPLY_NO,
lll.CREATE_NAME,
lll.CREATE_TIME
FROM
t_salary_standard lll
LEFT JOIN t_salary_account acc ON lll.id = acc.SALARY_FORM_ID AND acc.DELETE_FLAG = 0
WHERE
lll.id = #{salaryId}
and acc.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
</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