Commit 067b1cd7 authored by hongguangwu's avatar hongguangwu

薪资收入

parent f52d19d1
......@@ -186,7 +186,7 @@ public class TSalaryStandardController {
if (user != null) {
TApprovalRecord tApprovalRecord = new TApprovalRecord();
tApprovalRecord.setApprovalResult(CommonConstants.TWO_STRING);
tApprovalRecord.setApprovalOpinion("提交审核");
tApprovalRecord.setApprovalOpinion(s.getRemark());
tApprovalRecord.setSalaryId(tSalaryStandard.getId());
tApprovalRecord.setNodeId("提交审核");
tApprovalRecord.setApprovalMan(user.getId());
......
......@@ -102,6 +102,14 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@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,
@Param("idList")List<String> idList);
}
......@@ -46,6 +46,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
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);
/**
......
......@@ -73,8 +73,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private final TSalaryLockService salaryLockService;
private final MSalaryPaymentResService salaryPaymentResService;
private final TSalaryAttaService tSalaryAttaService;
private final TApprovalRecordService auditLogService;
......@@ -117,7 +115,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 2020-3-29 11:24:14变更为结算主体的封面抬头
String invoiceTitle = dept.getBusinessSubjectName();
if (Common.isEmpty(invoiceTitle)) {
return R.failed("上传失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入");
return R.failed("上传失败-获取结算主体的-封面抬头-信息为空,请去<EKP系统-项目>模块,编辑封面抬头后再导入");
}
YifuUser user = SecurityUtils.getUser();
......@@ -301,7 +299,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
String invoiceTitle = dept.getBusinessSubjectName();
if (Common.isEmpty(invoiceTitle)) {
return R.failed("新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<客户管理-结算主体>模块,编辑封面抬头后再导入");
return R.failed("新建工资主表失败-获取结算主体的-封面抬头-信息为空,请去<EKP系统-项目>模块,编辑封面抬头后再导入");
}
YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) {
......@@ -491,7 +489,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
R<TDepartSettlementInfo> deptSetR = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/tsettledomain/inner/getInnerBySettlementId", dept.getId(), TDepartSettlementInfo.class, SecurityConstants.FROM_IN);
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 {
deptSet = deptSetR.getData();
}
......
......@@ -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
public List<TSalaryAccount> noPageDiy(TSalaryAccountSearchVo searchVo) {
return baseMapper.noPageDiy(searchVo,searchVo.getIdList());
......
......@@ -537,6 +537,25 @@
</where>
</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
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;
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.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
......@@ -155,9 +156,8 @@ public class TIncomeController {
* @Date: 2022/8/31 16:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Operation(summary = "新增收入明细-详细表,同时统计", description = "新增收入明细表")
@SysLog("新增收入明细-详细表,同时统计")
@PostMapping("/saveDetail")
@Inner
@PostMapping("/inner/saveDetail")
public R<Boolean> saveDetail(@RequestBody TIncomeDetail 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