Commit 9742c078 authored by hongguangwu's avatar hongguangwu

MVP1.3-salary薪资

parent b8f6ecb7
...@@ -42,6 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService; ...@@ -42,6 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryCommonUtil; import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryCommonUtil;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSumVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.WageProofDto; import com.yifu.cloud.plus.v1.yifu.salary.vo.WageProofDto;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -412,4 +413,16 @@ public class TSalaryAccountController { ...@@ -412,4 +413,16 @@ public class TSalaryAccountController {
return R.ok(tSalaryAccountService.allYearExport(tSalaryAccount)); return R.ok(tSalaryAccountService.allYearExport(tSalaryAccount));
} }
/**
* @param salaryId
* @Description: 提交时获取应发实发
* @Author: hgw
* @Date: 2023/4/18 16:30
**/
@Operation(description = "提交时获取应发实发")
@GetMapping("/getAccountSumBySalaryId")
public R<TSalaryAccountSumVo> getAccountSumBySalaryId(@RequestParam String salaryId) {
return R.ok(tSalaryAccountService.getAccountSumBySalaryId(salaryId));
}
} }
...@@ -192,10 +192,15 @@ public class TSalaryStandardController { ...@@ -192,10 +192,15 @@ public class TSalaryStandardController {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user != null) { if (user != null) {
// 添加流程进展明细 // 添加流程进展明细
tSalaryStandardService.saveRecordLog(s, user, CommonConstants.TWO_STRING, "提交审核"); tSalaryStandardService.saveRecordLog(s, user, CommonConstants.TWO_STRING, "提交,并自动生成收入");
tSalaryStandard.setSubmitTime(new Date()); tSalaryStandard.setSubmitTime(new Date());
tSalaryStandard.setStatus(CommonConstants.ONE_INT); tSalaryStandard.setStatus(CommonConstants.dingleDigitIntArray[11]);
tSalaryStandard.setIncomeStartTime(new Date());
tSalaryStandardService.updateById(tSalaryStandard); tSalaryStandardService.updateById(tSalaryStandard);
tSalaryStandard = tSalaryStandardService.getById(tSalaryStandard.getId());
// 生成收入
tSalaryStandardService.doIncome(tSalaryStandard);
return R.ok("提交成功!"); return R.ok("提交成功!");
} else { } else {
return R.failed("请登录!"); return R.failed("请登录!");
......
...@@ -125,4 +125,12 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> { ...@@ -125,4 +125,12 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/ **/
R<String> saveSalaryDiff(List<AccountByEkpDiffVo> voList); R<String> saveSalaryDiff(List<AccountByEkpDiffVo> voList);
/**
* @Description: 提交后触发生成收入
* @Author: hgw
* @Date: 2023/4/18 16:44
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> doIncome(TSalaryStandard tSalaryStandard);
} }
...@@ -242,6 +242,28 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -242,6 +242,28 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
@Override
public R<String> doIncome(TSalaryStandard tSalaryStandard) {
if (Common.isNotNull(tSalaryStandard)) {
R<TSettleDomainSelectVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/tsettledomain/inner/getSettleDomainVoById", tSalaryStandard.getDeptId()
, TSettleDomainSelectVo.class, SecurityConstants.FROM_IN);
// 结算主体
TSettleDomainSelectVo dept;
if (sdr != null && sdr.getData() != null) {
dept = sdr.getData();
} else {
return R.failed("获取项目信息失败,请联管理员!");
}
List<TSalaryAccount> salaryAccountList = salaryAccountService.getListByIncome(tSalaryStandard.getId());
if (salaryAccountList != null && !salaryAccountList.isEmpty()) {
// 异步-收入相关
doSalaryAsync.doIncomeDetail(dept, salaryAccountList, tSalaryStandard.getId(), tSalaryStandard);
}
}
return R.ok();
}
/** /**
* @Description: 删除 * @Description: 删除
* @Author: hgw * @Author: hgw
......
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