Commit 067b1cd7 authored by hongguangwu's avatar hongguangwu

薪资收入

parent f52d19d1
...@@ -186,7 +186,7 @@ public class TSalaryStandardController { ...@@ -186,7 +186,7 @@ public class TSalaryStandardController {
if (user != null) { if (user != null) {
TApprovalRecord tApprovalRecord = new TApprovalRecord(); TApprovalRecord tApprovalRecord = new TApprovalRecord();
tApprovalRecord.setApprovalResult(CommonConstants.TWO_STRING); tApprovalRecord.setApprovalResult(CommonConstants.TWO_STRING);
tApprovalRecord.setApprovalOpinion("提交审核"); tApprovalRecord.setApprovalOpinion(s.getRemark());
tApprovalRecord.setSalaryId(tSalaryStandard.getId()); tApprovalRecord.setSalaryId(tSalaryStandard.getId());
tApprovalRecord.setNodeId("提交审核"); tApprovalRecord.setNodeId("提交审核");
tApprovalRecord.setApprovalMan(user.getId()); tApprovalRecord.setApprovalMan(user.getId());
......
...@@ -102,6 +102,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> { ...@@ -102,6 +102,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo, List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList")List<String> idList); @Param("idList")List<String> idList);
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
* @Date: 2022/9/2 17:07
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List<TSalaryAccount> getListByIncome(@Param("salaryId") String salaryId);
int noPageCountDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo, int noPageCountDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList")List<String> idList); @Param("idList")List<String> idList);
} }
...@@ -46,6 +46,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> { ...@@ -46,6 +46,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
void listExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo); void listExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo);
/**
* @param salaryId
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
* @Date: 2022/9/2 16:48
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List<TSalaryAccount> getListByIncome(String salaryId);
List<TSalaryAccount> noPageDiy(TSalaryAccountSearchVo searchVo); List<TSalaryAccount> noPageDiy(TSalaryAccountSearchVo searchVo);
/** /**
......
...@@ -73,8 +73,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -73,8 +73,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private final TSalaryLockService salaryLockService; private final TSalaryLockService salaryLockService;
private final MSalaryPaymentResService salaryPaymentResService;
private final TSalaryAttaService tSalaryAttaService; private final TSalaryAttaService tSalaryAttaService;
private final TApprovalRecordService auditLogService; private final TApprovalRecordService auditLogService;
...@@ -117,7 +115,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -117,7 +115,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 2020-3-29 11:24:14变更为结算主体的封面抬头 // 2020-3-29 11:24:14变更为结算主体的封面抬头
String invoiceTitle = dept.getBusinessSubjectName(); String invoiceTitle = dept.getBusinessSubjectName();
if (Common.isEmpty(invoiceTitle)) { if (Common.isEmpty(invoiceTitle)) {
return R.failed("上传失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入"); return R.failed("上传失败-获取结算主体的-封面抬头-信息为空,请去<EKP系统-项目>模块,编辑封面抬头后再导入");
} }
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
...@@ -301,7 +299,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -301,7 +299,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
String invoiceTitle = dept.getBusinessSubjectName(); String invoiceTitle = dept.getBusinessSubjectName();
if (Common.isEmpty(invoiceTitle)) { if (Common.isEmpty(invoiceTitle)) {
return R.failed("新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入"); return R.failed("新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<EKP系统-项目>模块,编辑封面抬头后再导入");
} }
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) { if (null == user || null == user.getId()) {
...@@ -491,7 +489,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -491,7 +489,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
R<TDepartSettlementInfo> deptSetR = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId() R<TDepartSettlementInfo> deptSetR = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/tsettledomain/inner/getInnerBySettlementId", dept.getId(), TDepartSettlementInfo.class, SecurityConstants.FROM_IN); , "/tsettledomain/inner/getInnerBySettlementId", dept.getId(), TDepartSettlementInfo.class, SecurityConstants.FROM_IN);
if (deptSetR == null || deptSetR.getData() == null || Common.isEmpty(deptSetR.getData().getId())) { if (deptSetR == null || deptSetR.getData() == null || Common.isEmpty(deptSetR.getData().getId())) {
return R.failed("请去客户管理模块编辑结算主体 " + dept.getDepartName() + "(" + dept.getDepartNo() + ")的结算配置!"); return R.failed("请去EKP系统-项目模块编辑结算主体 " + dept.getDepartName() + "(" + dept.getDepartNo() + ")的结算配置!");
} else { } else {
deptSet = deptSetR.getData(); deptSet = deptSetR.getData();
} }
......
...@@ -130,6 +130,17 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -130,6 +130,17 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
} }
} }
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
* @Date: 2022/9/2 17:07
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
@Override
public List<TSalaryAccount> getListByIncome(String salaryId) {
return baseMapper.getListByIncome(salaryId);
}
@Override @Override
public List<TSalaryAccount> noPageDiy(TSalaryAccountSearchVo searchVo) { public List<TSalaryAccount> noPageDiy(TSalaryAccountSearchVo searchVo) {
return baseMapper.noPageDiy(searchVo,searchVo.getIdList()); return baseMapper.noPageDiy(searchVo,searchVo.getIdList());
......
...@@ -24,13 +24,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -24,13 +24,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
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.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; 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.common.security.util.SecurityUtils;
...@@ -49,6 +48,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService; ...@@ -49,6 +48,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants; import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo; 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.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -58,10 +59,9 @@ import org.springframework.stereotype.Service; ...@@ -58,10 +59,9 @@ import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
/** /**
* 标准薪酬工资表 * 标准薪酬工资表
...@@ -71,7 +71,7 @@ import java.util.List; ...@@ -71,7 +71,7 @@ import java.util.List;
*/ */
@Log4j2 @Log4j2
@Service @Service
@EnableConfigurationProperties({DaprSocialProperties.class}) @EnableConfigurationProperties({DaprArchivesProperties.class, DaprSocialProperties.class})
public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMapper, TSalaryStandard> implements TSalaryStandardService { public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMapper, TSalaryStandard> implements TSalaryStandardService {
@Autowired @Autowired
...@@ -86,6 +86,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -86,6 +86,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Autowired @Autowired
private DaprSocialProperties socialProperties; private DaprSocialProperties socialProperties;
@Autowired
private DaprArchivesProperties archivesProperties;
@Autowired @Autowired
private EkpSalaryUtil ekpSalaryUtil; private EkpSalaryUtil ekpSalaryUtil;
...@@ -200,6 +203,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -200,6 +203,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
tSalaryStandard.setStatus(CommonConstants.TWO_INT); tSalaryStandard.setStatus(CommonConstants.TWO_INT);
tApprovalRecord.setApprovalResult(CommonConstants.ZERO_STRING); tApprovalRecord.setApprovalResult(CommonConstants.ZERO_STRING);
tApprovalRecord.setNodeId("审核通过"); tApprovalRecord.setNodeId("审核通过");
// 收入相关
R<String> failed = doIncomeDetail(id, tSalaryStandard);
if (failed != null) return failed;
} else { } else {
tSalaryStandard.setStatus(CommonConstants.FIVE_INT); tSalaryStandard.setStatus(CommonConstants.FIVE_INT);
tApprovalRecord.setApprovalResult(CommonConstants.ONE_STRING); tApprovalRecord.setApprovalResult(CommonConstants.ONE_STRING);
...@@ -223,6 +229,174 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -223,6 +229,174 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
/**
* @param id
* @param tSalaryStandard
* @Description: 处理收入明细
* @Author: hgw
* @Date: 2022/9/2 17:35
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private R<String> doIncomeDetail(String id, TSalaryStandard tSalaryStandard) {
R<TSettleDomainSelectVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/tsettledomain/inner/getSettleDomainVoById", tSalaryStandard.getDeptId()
, TSettleDomainSelectVo.class, SecurityConstants.FROM_IN);
// 结算主体
TSettleDomainSelectVo dept = null;
if (sdr != null && sdr.getData() != null) {
dept = sdr.getData();
} else {
return R.failed("获取项目信息失败,请联管理员!");
}
// 含有薪资,则计算收入
if (Common.isNotNull(dept.getMrServerItem()) && dept.getMrServerItem().contains(CommonConstants.FOUR_STRING)) {
// 管理费
if (CommonConstants.ZERO_STRING.equals(dept.getManagementTag())) {
// 金额-人数
if (CommonConstants.TWO_STRING.equals(dept.getManagementType())) {
// 收入相关
TIncomeDetail detail = new TIncomeDetail();
detail.setPayMonth(tSalaryStandard.getSalaryMonth());
R<TIncomeDetailReturnVo> detailR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tincomedetail/inner/getTIncomeDetailExist", detail
, TIncomeDetailReturnVo.class, SecurityConstants.FROM_IN);
Map<String, Integer> detailMap = new HashMap<>();
Integer value;
if (detailR != null) {
if (detailR.getData() != null && detailR.getData().getDetailList() != null && !detailR.getData().getDetailList().isEmpty()) {
TIncomeDetailReturnVo vo = detailR.getData();
List<TIncomeDetail> detailList = vo.getDetailList();
for (TIncomeDetail incomeDetail : detailList) {
value = detailMap.get(incomeDetail.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + incomeDetail.getFeeType());
if (Common.isEmpty(value)) {
value = CommonConstants.ZERO_INT;
}
if (CommonConstants.ZERO_STRING.equals(incomeDetail.getRedData())) {
value++;
} else {
value--;
}
detailMap.put(incomeDetail.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + incomeDetail.getFeeType(), value);
}
}
} else {
return R.failed("获取收入明细的详情出错,请联系管理员!");
}
// 保存明细
R<String> failed = saveIncomeDetail(id, tSalaryStandard, dept, detailMap, dept.getManagementType(), CommonConstants.ONE_STRING);
if (failed != null) return failed;
} else {
// 保存明细
R<String> failed = saveIncomeDetail(id, tSalaryStandard, dept, new HashMap<>(), dept.getManagementType(), CommonConstants.ONE_STRING);
if (failed != null) return failed;
}
}
// 风险金
if (CommonConstants.ZERO_STRING.equals(dept.getRiskFundTag())) {
// 金额-人数
if (CommonConstants.TWO_STRING.equals(dept.getRiskFundType())) {
// 收入相关
TIncomeDetail detail = new TIncomeDetail();
detail.setPayMonth(tSalaryStandard.getSalaryMonth());
R<TIncomeDetailReturnVo> detailR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tincomedetail/inner/getTIncomeDetailExist", detail
, TIncomeDetailReturnVo.class, SecurityConstants.FROM_IN);
Map<String, Integer> detailMap = new HashMap<>();
Integer value;
if (detailR != null) {
if (detailR.getData() != null && detailR.getData().getDetailList() != null && !detailR.getData().getDetailList().isEmpty()) {
TIncomeDetailReturnVo vo = detailR.getData();
List<TIncomeDetail> detailList = vo.getDetailList();
for (TIncomeDetail incomeDetail : detailList) {
value = detailMap.get(incomeDetail.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + incomeDetail.getFeeType());
if (Common.isEmpty(value)) {
value = CommonConstants.ZERO_INT;
}
if (CommonConstants.ZERO_STRING.equals(incomeDetail.getRedData())) {
value++;
} else {
value--;
}
detailMap.put(incomeDetail.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + incomeDetail.getFeeType(), value);
}
}
} else {
return R.failed("获取收入明细的详情出错,请联系管理员!");
}
// 保存明细
R<String> failed = saveIncomeDetail(id, tSalaryStandard, dept, detailMap, dept.getRiskFundType(), CommonConstants.TWO_STRING);
if (failed != null) return failed;
} else {
// 保存明细
R<String> failed = saveIncomeDetail(id, tSalaryStandard, dept, new HashMap<>(), dept.getRiskFundType(), CommonConstants.TWO_STRING);
if (failed != null) return failed;
}
}
}
return null;
}
/**
* @param feeType 1按比例2金额-人数3金额-人次
* @param isManage 1 管理费2 风险金
* @Description: 保存明细
* @Author: hgw
* @Date: 2022/9/2 17:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private R<String> saveIncomeDetail(String id, TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept
, Map<String, Integer> detailMap, String feeType, String isManage) {
TIncomeDetail detail;
Integer value;
List<TSalaryAccount> salaryAccountList = salaryAccountService.getListByIncome(id);
if (salaryAccountList != null && !salaryAccountList.isEmpty()) {
BigDecimal money;
for (TSalaryAccount account : salaryAccountList) {
value = detailMap.get(account.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + isManage);
if (Common.isEmpty(value) || value == 0) {
detail = new TIncomeDetail();
detail.setPayMonth(account.getSalaryMonth());
detail.setCharges(String.valueOf(dept.getManagementFee()));
detail.setDeptId(account.getDeptId());
detail.setDeptName(account.getDeptName());
detail.setDeptNo(account.getDeptNo());
detail.setUnitId(tSalaryStandard.getUnitId());
detail.setUnitName(tSalaryStandard.getUnitName());
detail.setUnitNo(tSalaryStandard.getUnitNo());
detail.setCreateMonth(account.getSalaryMonth());
detail.setEmpIdcard(account.getEmpIdcard());
detail.setEmpName(account.getEmpName());
detail.setFeeMode(dept.getManagementType());
detail.setFeeType(isManage);
money = dept.getManagementFee();
if (CommonConstants.TWO_STRING.equals(isManage)) {
money = dept.getRiskFundFee();
}
if (CommonConstants.ONE_STRING.equals(feeType)) {
money = BigDecimalUtils.safeMultiply(account.getRelaySalary(), money, CommonConstants.ONE_OF_PERCENT);
}
detail.setMoney(money);
detail.setMrSettleType(dept.getMrSettleType());
detail.setRedData(CommonConstants.ZERO_STRING);
detail.setSourceId(account.getId());
detail.setSourceType(CommonConstants.FOUR_STRING);
R<Boolean> saveR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tincome/inner/saveDetail", detail, Boolean.class, SecurityConstants.FROM_IN);
if (saveR == null || saveR.getData() == null || Boolean.FALSE.equals(saveR.getData())) {
return R.failed("保存收入明细以及统计出错!");
}
}
}
}
return null;
}
/**
* @Description: 删除
* @Author: hgw
* @Date: 2022/9/2 17:16
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override @Override
public R<String> deleteSalaryById(String id) { public R<String> deleteSalaryById(String id) {
if (id != null) { if (id != null) {
...@@ -325,6 +499,12 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -325,6 +499,12 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return R.failed("id 不可为空"); return R.failed("id 不可为空");
} }
/**
* @Description: 推送
* @Author: hgw
* @Date: 2022/9/2 17:16
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override @Override
public R<String> doSend(String id) { public R<String> doSend(String id) {
TSalaryStandard s = this.getById(id); TSalaryStandard s = this.getById(id);
......
...@@ -537,6 +537,25 @@ ...@@ -537,6 +537,25 @@
</where> </where>
</select> </select>
<!-- 计算收入需要的报账明细 -->
<select id="getListByIncome" resultMap="tSalaryAccountMap">
SELECT
a.ID,
a.SALARY_MONTH,
a.EMP_NAME,
a.EMP_IDCARD,
a.DEPT_ID,
a.DEPT_NO,
a.DEPT_NAME,
ifnull(if(a.FORM_TYPE='4',a.RELAY_SALARY_UNIT,a.RELAY_SALARY),0)
-ifnull(personalSocial.SALARY_MONEY,0)
-ifnull(personalFund.SALARY_MONEY,0) RELAY_SALARY
FROM t_salary_account a
left join t_salary_account_item personalSocial on personalSocial.SALARY_ACCOUNT_ID = a.id and personalSocial.JAVA_FIED_NAME='personalSocial'
left join t_salary_account_item personalFund on personalFund.SALARY_ACCOUNT_ID = a.id and personalFund.JAVA_FIED_NAME='personalFund'
where a.DELETE_FLAG = 0 and a.SALARY_FORM_ID = #{salaryId}
</select>
<select id="noPageCountDiy" resultType="java.lang.Integer"> <select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT SELECT
count(1) count(1)
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import lombok.Data;
import java.util.List;
/**
* @author hgw
* @description 收入明细详情的Vo
* @date 2022/8/10
*/
@Data
public class TIncomeDetailReturnVo {
List<TIncomeDetail> detailList;
}
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -22,6 +22,7 @@ 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.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; 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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService; import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
...@@ -155,9 +156,8 @@ public class TIncomeController { ...@@ -155,9 +156,8 @@ public class TIncomeController {
* @Date: 2022/8/31 16:34 * @Date: 2022/8/31 16:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/ **/
@Operation(summary = "新增收入明细-详细表,同时统计", description = "新增收入明细表") @Inner
@SysLog("新增收入明细-详细表,同时统计") @PostMapping("/inner/saveDetail")
@PostMapping("/saveDetail")
public R<Boolean> saveDetail(@RequestBody TIncomeDetail tIncomeDetail) { public R<Boolean> saveDetail(@RequestBody TIncomeDetail tIncomeDetail) {
return R.ok(tIncomeService.saveDetail(tIncomeDetail)); return R.ok(tIncomeService.saveDetail(tIncomeDetail));
} }
......
/*
* 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.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 收入明细-详细表
*
* @author hgw
* @date 2022-9-2 15:55:09
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tincomedetail")
@Tag(name = "收入明细-详细表管理")
public class TIncomeDetailController {
private final TIncomeDetailService tIncomeDetailService;
/**
* @Description: 查询list(建议传参项目id、月份,一次性获取大批量,自行组装Map来使用)
* @Author: hgw
* @Date: 2022-9-2 15:56:28
**/
@Inner
@PostMapping("/inner/getTIncomeDetailList")
public TIncomeDetailReturnVo getTIncomeDetailList(@RequestBody TIncomeDetail detail) {
TIncomeDetailReturnVo vo = new TIncomeDetailReturnVo();
vo.setDetailList(tIncomeDetailService.getTIncomeDetailList(detail));
return vo;
}
}
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