Commit 0d27fdac authored by hongguangwu's avatar hongguangwu

Merge branch 'MVP1.5.3-SALARY' into MVP1.5.3

parents 9d059fbf 9742c078
......@@ -12,5 +12,7 @@ public class CASproperties {
*/
public static String CAS_SERVER_PATH = "http://192.168.1.62:8443/cas";
public static String SPRING_SECURITY_CAS_SERVER = "http://192.168.1.62:8443/cas/v1/tickets";
}
......@@ -71,9 +71,9 @@ public class PasswordDecoderFilter extends UsernamePasswordAuthenticationFilter
wholeForm.clear();
wholeForm.add("service", CASproperties.CLIENT_LOGIN_PAGE);
wholeForm.add("ticket", st);
obj = restTemplate.exchange(CASproperties.CAS_SERVER_PATH + "/p3/serviceValidate?service=" + CASproperties.CLIENT_LOGIN_PAGE + "&ticket=" + st + "&format=JSON"
, HttpMethod.GET,entity, String.class);
log.info("cas返回用户信息》》》", JSON.toJSONString(obj));
obj = restTemplate.getForEntity(CASproperties.CAS_SERVER_PATH + "/p3/serviceValidate?service=" + CASproperties.CLIENT_LOGIN_PAGE + "&ticket=" + st + "&format=JSON"
, String.class,CASproperties.CLIENT_LOGIN_PAGE,st,"JSON");
log.info("cas返回用户信息》》》",JSON.toJSONString(obj));
if(obj.getStatusCode().value() == 200){
try {
JSONObject result = JSON.parseObject(obj.getBody());
......
......@@ -134,7 +134,7 @@ emp.dispatch.fund.percent.not.exist=\u6D3E\u589E\u5F02\u5E38\uFF1A\u672A\u627E\u
emp.dispatch.social.and.fund.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A\u6B64\u4E3A\u793E\u4FDD\u516C\u79EF\u91D1\u6D3E\u5355\u6A21\u677F\uFF0C\u5982\u5355\u6D3E\u6863\u6848\uFF0C\u8BF7\u81F3\u201C\u5728\u6863\u4EBA\u5458\u201D\u83DC\u5355\u5904\u64CD\u4F5C
emp.dispatch.project.not.found=\u6D3E\u589E\u5F02\u5E38\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u4FE1\u606F
emp.dispatch.project.not.found=\u6D3E\u5355\u5F02\u5E38\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u4FE1\u606F
emp.dispatch.add.emp.error=\u6D3E\u589E\u5F02\u5E38\uFF1A\u6D3E\u5355\u65B0\u589E\u6863\u6848\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5
......
......@@ -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.util.SalaryCommonUtil;
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.WageProofDto;
import io.swagger.v3.oas.annotations.Operation;
......@@ -412,4 +413,16 @@ public class TSalaryAccountController {
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 {
YifuUser user = SecurityUtils.getUser();
if (user != null) {
// 添加流程进展明细
tSalaryStandardService.saveRecordLog(s, user, CommonConstants.TWO_STRING, "提交审核");
tSalaryStandardService.saveRecordLog(s, user, CommonConstants.TWO_STRING, "提交,并自动生成收入");
tSalaryStandard.setSubmitTime(new Date());
tSalaryStandard.setStatus(CommonConstants.ONE_INT);
tSalaryStandard.setStatus(CommonConstants.dingleDigitIntArray[11]);
tSalaryStandard.setIncomeStartTime(new Date());
tSalaryStandardService.updateById(tSalaryStandard);
tSalaryStandard = tSalaryStandardService.getById(tSalaryStandard.getId());
// 生成收入
tSalaryStandardService.doIncome(tSalaryStandard);
return R.ok("提交成功!");
} else {
return R.failed("请登录!");
......
......@@ -125,4 +125,12 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/
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
}
@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: 删除
* @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