Commit b88f259e authored by hongguangwu's avatar hongguangwu

MVP1.5.3-身份证导出

parent 06731025
......@@ -396,5 +396,20 @@ public class TSalaryAccountController {
wp.setSalary(salary.divide(new BigDecimal(realMonthCount), SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
return wp;
}
/**
* 报账跨年查询导出
* @author hgw
* @date 2023-3-30 15:36:00
**/
@Operation(description = "报账跨年查询导出 hasPermission('account_all_year_export')")
@PostMapping("/allYearExport")
@PreAuthorize("@pms.hasPermission('account_all_year_export')")
public List<TSalaryAccount> allYearExport(@RequestBody TSalaryAccountSearchVo tSalaryAccount) {
if (Common.isEmpty(tSalaryAccount.getEmpIdcard())) {
return null;
}
return tSalaryAccountService.allYearExport(tSalaryAccount);
}
}
......@@ -184,4 +184,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
, @Param("emIdCard") String emIdCard, @Param("settleDepartId") String settleDepartId);
TSalaryAccountSumVo getAccountSumBySalaryId(@Param("salaryId") String salaryId);
/**
* @param tSalaryAccount
* @Description: 报账按身份证导出,可以导出2个报账年份表
* @Author: hgw
* @Date: 2023/3/31 15:14
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List<TSalaryAccount> allYearExport(@Param("tSalaryAccount") TSalaryAccountSearchVo tSalaryAccount);
}
......@@ -205,4 +205,6 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo
**/
TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId);
List<TSalaryAccount> allYearExport(TSalaryAccountSearchVo tSalaryAccount);
}
......@@ -379,4 +379,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
public TSalaryAccountSumVo getAccountSumBySalaryId(String salaryId) {
return baseMapper.getAccountSumBySalaryId(salaryId);
}
@Override
public List<TSalaryAccount> allYearExport(TSalaryAccountSearchVo tSalaryAccount) {
return baseMapper.allYearExport(tSalaryAccount);
}
}
......@@ -1180,4 +1180,34 @@
left join t_salary_account_item enterpriseAnnuityUnit on enterpriseAnnuityUnit.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuityUnit.JAVA_FIED_NAME='enterpriseAnnuityUnit'
where a.DELETE_FLAG='0' and a.SALARY_FORM_ID = #{salaryId}
</select>
<!-- 根据idList获取报账信息 -->
<select id="allYearExport" resultMap="tSalaryAccountMap">
select * from (
select
a.id,a.DEPT_NAME,a.DEPT_NO,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.BANK_NO
,a.BANK_NAME,a.BANK_PROVINCE,a.BANK_CITY,a.BANK_SUB_NAME,a.FORM_TYPE
,a.SALARY_MONTH,a.SETTLEMENT_MONTH,a.RELAY_SALARY,a.ACTUAL_SALARY,a.SALARY_TAX
FROM
t_salary_account a
where a.DELETE_FLAG = 0 AND a.EMP_IDCARD = #{tSalaryAccount.empIdcard}
union all
select
a.id,a.DEPT_NAME,a.DEPT_NO,a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.BANK_NO
,a.BANK_NAME,a.BANK_PROVINCE,a.BANK_CITY,a.BANK_SUB_NAME,a.FORM_TYPE
,a.SALARY_MONTH,a.SETTLEMENT_MONTH,relaySalary.SALARY_MONEY RELAY_SALARY
,actualSalarySum.SALARY_MONEY ACTUAL_SALARY,salaryTax.SALARY_MONEY SALARY_TAX
FROM
t_salary_account_hro_2021 a
left join t_salary_account_item_hro_2021 relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
left join t_salary_account_item_hro_2021 actualSalarySum on actualSalarySum.SALARY_ACCOUNT_ID = a.id and actualSalarySum.JAVA_FIED_NAME='actualSalarySum'
left join t_salary_account_item_hro_2021 salaryTax on salaryTax.SALARY_ACCOUNT_ID = a.id and salaryTax.JAVA_FIED_NAME='salaryTax'
where a.DELETE_FLAG = 0 AND a.EMP_IDCARD = #{tSalaryAccount.empIdcard}
) a
where 1=1
<include refid="tSalaryAccount_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