Commit bbbdd686 authored by hongguangwu's avatar hongguangwu

优化、新接口、帮雨辰提交一个时间格式

parent 196ebb65
......@@ -17,12 +17,16 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
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.log.annotation.SysLog;
......@@ -52,6 +56,7 @@ import java.util.List;
public class TSettleDomainController {
private final TSettleDomainService tSettleDomainService;
private final TDepartSettlementInfoService tDepartSettlementInfoService;
/**
* 分页查询
......@@ -199,4 +204,40 @@ public class TSettleDomainController {
public SetInfoVo getSetInfoByCodes(@RequestBody(required = true) List<String> codes) {
return tSettleDomainService.getSetInfoByCodes(codes);
}
/**
* @param id 项目主键
* @Description: 通过id获取结算主体及单位部分信息
* @Author: hgw
* @Date: 2022/8/10 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/getSettleDomainVoById")
public TSettleDomainSelectVo getSettleDomainVoById(String id) {
return tSettleDomainService.getSettleDomainVoById(id);
}
/**
* @param deptId 结算主体id
* @Description: 根据结算主体查询结算配置
* @Author: hgw
* @Date: 2022-8-10 18:14:31
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrms.api.entity.TDepartSettlementInfo>
**/
@Inner
@PostMapping("/inner/getInnerBySettlementId")
public TDepartSettlementInfo getInnerBySettlementId(@RequestParam String deptId) {
TDepartSettlementInfo departSettlementInfo = new TDepartSettlementInfo();
departSettlementInfo.setSettleId(deptId);
QueryWrapper<TDepartSettlementInfo> queryWrapperDs = new QueryWrapper<>();
queryWrapperDs.setEntity(departSettlementInfo);
List<TDepartSettlementInfo> dsList = tDepartSettlementInfoService.list(queryWrapperDs);
TDepartSettlementInfo ds = null;
if (dsList != null && !dsList.isEmpty()) {
ds = dsList.get(CommonConstants.ZERO_INT);
}
return ds;
}
}
......@@ -43,6 +43,15 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
**/
TSettleDomainSelectVo selectSettleDomainSelectVosById(@Param("departNo") String departNo);
/**
* @param id 项目主键
* @Description: 通过id获取结算主体及单位部分信息
* @Author: hgw
* @Date: 2022/8/10 17:00
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
**/
TSettleDomainSelectVo getSettleDomainVoById(@Param("id") String id);
/**
* 获取所有客户单位的项目信息
* @Author fxj
......
/*
* 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.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
/**
* 项目表
*
* @author hgw
* @date 2022-06-20 10:02:28
*/
public interface TDepartSettlementInfoService extends IService<TDepartSettlementInfo> {
}
......@@ -57,6 +57,9 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
**/
TSettleDomainSelectVo selectSettleDomainSelectVosById(TSettleDomainSelectVo settleDomainSelectVo);
TSettleDomainSelectVo getSettleDomainVoById(String id);
/**
* 获取所有客户单位的项目信息
* @param
......
......@@ -98,6 +98,11 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return baseMapper.selectSettleDomainSelectVosById(settleDomainSelectVo.getDepartNo());
}
@Override
public TSettleDomainSelectVo getSettleDomainVoById(String id) {
return baseMapper.selectSettleDomainSelectVosById(id);
}
@Override
public List<TSettleDomainSelectVo> selectAllSettleDomainSelectVos() {
List<TSettleDomainSelectVo> sdList = baseMapper.selectAllSettleDomainSelectVos();
......
......@@ -179,6 +179,25 @@
WHERE a.DEPART_NO=#{departNo} GROUP BY a.DEPART_NO
</select>
<select id="getSettleDomainVoById"
resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
SELECT
<include refid="Base_Column_List"/>,
c.customerId,
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode',
c.INDUSTRY_BELONG as 'industryBelong'
FROM
t_settle_domain a
LEFT JOIN (
select ID AS 'customerId',
CUSTOMER_NAME,
INDUSTRY_BELONG,
CUSTOMER_CODE from t_customer_info
) c ON a.CUSTOMER_ID = c.customerId
WHERE a.id=#{id} GROUP BY a.id
</select>
<select id="selectAllSettleDomainSelectVos" resultMap="tSettleDomainSelectVoMap">
SELECT
<include refid="Base_Column_List"/>,
......
......@@ -282,7 +282,7 @@ public class DateUtil {
if (format == null) {
df = new SimpleDateFormat();
} else {
df = new SimpleDateFormat(format);
df = new SimpleDateFormat(ISO_DATE_FORMAT);
}
// setLenient avoids allowing dates like 9/32/2001
......
......@@ -53,6 +53,11 @@
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-insurances-api</artifactId>
......
......@@ -20,16 +20,19 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -208,4 +211,16 @@ public class TPaymentInfoController {
return tPaymentInfoService.removeBatchByInfo(empIdCard, socialHouseId,
fundHouseId, socialCreateMonth, socialPayMonth);
}
/**
* @Description: 薪资获取缴费库
* @Author: hgw
* @Date: 2022/8/10 18:06
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo>
**/
@Inner
@PostMapping("/inner/selectTPaymentBySalaryVo")
public TPaymentVo selectTPaymentBySalaryVo(@RequestBody TPaymentBySalaryVo tPaymentBySalaryVo) {
return tPaymentInfoService.selectTPaymentBySalaryVo(tPaymentBySalaryVo);
}
}
......@@ -20,6 +20,7 @@ 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.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
......@@ -86,4 +87,11 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* */
List<TPaymentInfo> selectListForPaymentImport(@Param("months")List<String> months, @Param("idcards")List<String> idcards);
/**
* 薪资获取缴费库
* @Author hgw
* @Date 2022-8-10 18:06:13
**/
List<TPaymentBySalaryVo> selectTPaymentBySalaryVo(@Param("tPaymentInfo") TPaymentBySalaryVo tPaymentInfo);
}
......@@ -15,12 +15,14 @@ package com.yifu.cloud.plus.v1.yifu.social.service;/*
* Author: lengleng (wangiegie@gmail.com)
*/
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
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.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import javax.servlet.http.HttpServletResponse;
......@@ -113,4 +115,11 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
R removeBatchByInfo(String empIdCard, String socialHouseId, String fundHouseId,
String socialCreateMonth, String socialPayMonth);
/**
* 薪资获取缴费库
* @Author hgw
* @Date 2022-8-10 18:06:13
**/
TPaymentVo selectTPaymentBySalaryVo(TPaymentBySalaryVo tPaymentBySalaryVo);
}
......@@ -1940,7 +1940,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List<TSocialFundInfo> socialFundInfoList = socialFundInfoMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda());
if (socialFundInfoList != null && !socialFundInfoList.isEmpty()) {
String payMonth = DateUtil.addMonth(1);
int all = socialFundInfoList.size();
int i=1;
for (TSocialFundInfo socialFundInfo : socialFundInfoList) {
System.out.println("预估生成,当前第:"+ i + "条,总数:" + all + "条。当前身份证:"+ socialFundInfo.getEmpIdcard());
i++;
everyMonthCreateForecastLibaryCore(payMonth, socialFundInfo);
}
}
......
......@@ -30,6 +30,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.social.concurrent.threadpool.YFSocialImportThreadPoolExecutor;
import com.yifu.cloud.plus.v1.yifu.social.constants.PaymentConstants;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
......@@ -2272,4 +2274,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
return null;
}
/**
* 薪资获取缴费库
* @Author hgw
* @Date 2022-8-10 18:06:13
**/
@Override
public TPaymentVo selectTPaymentBySalaryVo(TPaymentBySalaryVo tPaymentBySalaryVo) {
List<TPaymentBySalaryVo> list = baseMapper.selectTPaymentBySalaryVo(tPaymentBySalaryVo);
TPaymentVo vo = new TPaymentVo();
vo.setPaymentList(list);
return vo;
}
}
......@@ -1002,4 +1002,63 @@
</if>
</where>
</select>
<!--洪光武2022-8-10 18:05:42-->
<resultMap id="tPaymentBySalaryMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo">
<id property="id" column="ID"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="unitBitmailmentFee" column="UNIT_BIGMAILMENT_MONEY"/>
<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
<result property="personalSocialSum" column="SOCIAL_SECURITY_PERSONAL_SUM"/>
<result property="unitFundSum" column="UNIT_PROVIDENT_SUM"/>
<result property="personalFundSum" column="PERSONAL_PROVIDENT_SUM"/>
<result property="salarySocialFlag" column="SALARY_SOCIAL_FLAG"/>
<result property="salaryFundFlag" column="SALARY_FUND_FLAG"/>
<result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/>
<result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/>
<result property="providentPayMonth" column="PROVIDENT_PAY_MONTH"/>
<result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
<result property="settleDomainId" column="SETTLE_DOMAIN_ID"/>
</resultMap>
<!-- 薪资获取缴费库 -->
<select id="selectTPaymentBySalaryVo" resultMap="tPaymentBySalaryMap">
SELECT
a.id,
a.EMP_IDCARD,
sum(ifnull(a.UNIT_BIGMAILMENT_MONEY,0)) UNIT_BIGMAILMENT_MONEY,
sum(ifnull(a.UNIT_SOCIAL_SUM,0)) UNIT_SOCIAL_SUM,
sum(ifnull(a.SOCIAL_SECURITY_PERSONAL_SUM,0)) SOCIAL_SECURITY_PERSONAL_SUM,
sum(ifnull(a.UNIT_PROVIDENT_SUM,0)) UNIT_PROVIDENT_SUM,
sum(ifnull(a.PERSONAL_PROVIDENT_SUM,0)) PERSONAL_PROVIDENT_SUM,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH,
a.SETTLE_DOMAIN_ID
FROM t_payment_info a
<where>
1=1
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if>
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND a.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
</if>
<if test="tPaymentInfo.providentPayMonth != null and tPaymentInfo.providentPayMonth.trim() != ''">
AND a.PROVIDENT_PAY_MONTH = #{tPaymentInfo.providentPayMonth}
</if>
<if test="tPaymentInfo.providentCreateMonth != null and tPaymentInfo.providentCreateMonth.trim() != ''">
AND a.PROVIDENT_CREATE_MONTH = #{tPaymentInfo.providentCreateMonth}
</if>
<if test="tPaymentInfo.settleDomainId != null and tPaymentInfo.settleDomainId.trim() != ''">
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
</if>
</where>
GROUP BY a.EMP_IDCARD
</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