Commit c4601820 authored by fangxinjiang's avatar fangxinjiang

Merge branch 'develop'

parents 28652402 ee5df90e
......@@ -29,6 +29,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.DecimalMax;
import java.math.BigDecimal;
import java.time.LocalDateTime;
......@@ -469,4 +470,14 @@ public class TSettleDomain extends BaseEntity {
@ExcelProperty("风险金的收取服务项目:1社保2公积金3商险4薪酬")
private String riskServerItem;
/**
* 单位大病比例
* hgw 2022-9-8 15:40:18
* 从t_depart_settlement_info表迁移过来的
*/
@ExcelAttribute(name = "单位大病比例")
@DecimalMax(value = "100.00", message = "单位大病比例不能大于100.00")
@Schema(description = "单位大病比例", name = "unitSeriousIllnessProp")
private BigDecimal unitSeriousIllnessProp;
}
......@@ -88,6 +88,7 @@
<result property="riskFundType" column="RISK_FUND_TYPE"/>
<result property="manageServerItem" column="MANAGE_SERVER_ITEM"/>
<result property="riskServerItem" column="RISK_SERVER_ITEM"/>
<result property="unitSeriousIllnessProp" column="UNIT_SERIOUS_ILLNESS_PROP"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -159,7 +160,8 @@
a.RISK_FUND_FEE,
a.RISK_FUND_TYPE,
a.MANAGE_SERVER_ITEM,
a.RISK_SERVER_ITEM
a.RISK_SERVER_ITEM,
a.UNIT_SERIOUS_ILLNESS_PROP
</sql>
<resultMap id="tSettleDomainSelectVoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
......@@ -218,7 +220,7 @@
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode',
c.INDUSTRY_BELONG as 'industryBelong',
t.COVER_NAME as 'businessSubjectName'
a.INVOICE_TITLE_SALARY as 'businessSubjectName'
FROM
t_settle_domain a
LEFT JOIN (
......@@ -227,7 +229,6 @@
INDUSTRY_BELONG,
CUSTOMER_CODE from t_customer_info
) c ON a.CUSTOMER_ID = c.customerId
LEFT JOIN t_table_head_salary_cover t on a.id=t.DEPART_ID and t.type = 0
WHERE a.id=#{id} GROUP BY a.id
</select>
......
......@@ -91,7 +91,15 @@ public interface CommonConstants {
*/
Integer SUCCESS = 200;
/**
* 商险导出最大值
*/
Integer EXPORT_TWENTY_THOUSAND = 20000;
/**
* 商险导入最大值
*/
Integer IMPORT_TWENTY_THOUSAND = 20000;
/**
* 失败标记
......
......@@ -5,6 +5,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.config.EkpIncomeProperties;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import io.micrometer.core.instrument.util.StringUtils;
import lombok.extern.log4j.Log4j2;
import org.codehaus.jackson.map.ObjectMapper;
......@@ -29,13 +31,12 @@ public class EkpIncomeUtil {
/**
* @param param 内容传参
* @param type 1:管理费2:风险金
* @Description:
* @Author: hgw
* @Date: 2022/9/5 16:12
* @return: java.lang.String
**/
public String sendToEKP(EkpIncomeParam param, String type) {
public String sendToEkpManage(EkpIncomeParamManage param) {
log.info("推送EKP开始--收入明细数据");
RestTemplate yourRestTemplate = new RestTemplate();
try {
......@@ -48,13 +49,45 @@ public class EkpIncomeUtil {
wholeForm.add("docSubject", ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus());
if (CommonConstants.ONE_STRING.equals(type)) {
wholeForm.add("fdModelId", ekpProperties.getFdModelIdManage());
wholeForm.add("fdFlowId", ekpProperties.getFdFlowIdManage());
wholeForm.add("fdModelId", ekpProperties.getFdModelIdManage());
wholeForm.add("fdFlowId", ekpProperties.getFdFlowIdManage());
wholeForm.add("formValues", formValues);
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword") 是VO,则使用APPLICATION_JSON
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity<MultiValueMap<String, Object>> entity = new HttpEntity<>(wholeForm, headers);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity<String> obj = yourRestTemplate.exchange(ekpProperties.getUrl(), HttpMethod.POST, entity, String.class);
String body = obj.getBody();
if (StringUtils.isBlank(body)) {
log.error(EkpConstants.SEND_FAILED);
return EkpConstants.SEND_FAILED;
} else {
wholeForm.add("fdModelId", ekpProperties.getFdModelIdRisk());
wholeForm.add("fdFlowId", ekpProperties.getFdFlowIdRisk());
log.info(EkpConstants.SEND_SUCCESS + body);
return body;
}
} catch (Exception e) {
log.info(e.getMessage());
return e.getMessage();
}
}
public String sendToEkpRisk(EkpIncomeParamRisk param) {
log.info("推送EKP开始--收入明细数据");
RestTemplate yourRestTemplate = new RestTemplate();
try {
String formValues = new ObjectMapper().writeValueAsString(param);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
loginName.append("LoginName", ekpProperties.getLoginName());
MultiValueMap<String, Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject", ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("fdModelId", ekpProperties.getFdModelIdRisk());
wholeForm.add("fdFlowId", ekpProperties.getFdFlowIdRisk());
wholeForm.add("formValues", formValues);
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
......@@ -67,14 +100,14 @@ public class EkpIncomeUtil {
String body = obj.getBody();
if (StringUtils.isBlank(body)) {
log.error(EkpConstants.SEND_FAILED);
return null;
return EkpConstants.SEND_FAILED;
} else {
log.info(EkpConstants.SEND_SUCCESS + body);
return body;
}
} catch (Exception e) {
log.info(e.getMessage());
return null;
return e.getMessage();
}
}
......
package com.yifu.cloud.plus.v1.yifu.ekp.util;
import cn.hutool.json.JSONObject;
import com.yifu.cloud.plus.v1.yifu.ekp.config.EkpSalaryProperties;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
......@@ -12,7 +13,6 @@ import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import cn.hutool.json.JSONObject;
/**
* @Author fxj
......@@ -35,38 +35,36 @@ public class EkpSalaryUtil {
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
loginName.append("LoginName",ekpProperties.getLoginName());
String loginData = new ObjectMapper().writeValueAsString(loginName);
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") );
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") )
wholeForm.add("docSubject",ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
//wholeForm.add("docCreator", loginData);
//wholeForm.add("docCreator", loginData)
wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("fdModelId", ekpProperties.getFdModelId());
wholeForm.add("fdFlowId", ekpProperties.getFdFlowId());
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"))
wholeForm.add("formValues", formValues);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System.out.println("wholeForm:"+wholeForm);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") )
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<MultiValueMap<String,Object>>(wholeForm,headers);
HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<>(wholeForm,headers);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity<String> obj = yourRestTemplate.exchange(ekpProperties.getUrl(), HttpMethod.POST, entity, String.class);
String body = obj.getBody();
if (StringUtils.isBlank(body)){
log.error(EkpConstants.SEND_FAILED);
return null;
return EkpConstants.SEND_FAILED;
}else{
log.info(EkpConstants.SEND_SUCCESS+body);
return body;
}
}catch (Exception e){
log.info(e.getMessage());
return null;
return e.getMessage();
}
}
......
......@@ -48,14 +48,6 @@ public class EkpIncomeParam implements Serializable {
* 身份证号
**/
private String fd_3adfef94dcdbb4;
/**
* 生成月份
**/
private String fd_3ae0c3032cffc8;
/**
* 结算月份
**/
private String fd_3ae0c3044e5958;
/**
* 管理费、风险金金额
**/
......@@ -72,12 +64,4 @@ public class EkpIncomeParam implements Serializable {
* 收款状态
**/
private String fd_3adfefaaef583e;
/**
* 结算单号
**/
private String fd_3aead7204bb594;
/**
* 收款单号
**/
private String fd_3aeae59b70fe5a;
}
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
/**
* @Author hgw
* @Date 2022-9-6 15:06:24
* @Description 收入明细对应参数
* @Version 1.0
*/
@Data
public class EkpIncomeParamManage extends EkpIncomeParam {
/**
* 生成月份
**/
private String fd_3ae0c23b2e9a92;
/**
* 结算月份
**/
private String fd_3ae0c23cb3fccc;
/**
* 结算单号
**/
private String fd_3aead3c68b1078;
/**
* 收款单号
**/
private String fd_3aeae58b14691c;
}
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
/**
* @Author hgw
* @Date 2022-9-6 15:06:24
* @Description 收入明细对应参数
* @Version 1.0
*/
@Data
public class EkpIncomeParamRisk extends EkpIncomeParam {
/**
* 生成月份
**/
private String fd_3ae0c3032cffc8;
/**
* 结算月份
**/
private String fd_3ae0c3044e5958;
/**
* 结算单号
**/
private String fd_3aead7204bb594;
/**
* 收款单号
**/
private String fd_3aeae59b70fe5a;
}
......@@ -13,6 +13,10 @@ import java.io.Serializable;
@Data
public class EkpSalaryParam implements Serializable {
/**
* 工资id
**/
private String fd_3b10af838eab5c;
/**
* 项目编码
**/
......
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public class EkpSalaryParamVo extends EkpSalaryParam {
/**
* 报账表id
**/
private String salaryAccountId;
}
income.url=http://119.96.227.251.8080/api/sys-modeling/appModelRestService/addModel
income.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
income.fdModelIdManage=181d76db26e419a88dba97b0c406689e
income.fdFlowIdManage=182d3b6e522b2690119e70d4ff082136
income.fdModelIdRisk=181d76db26e419a88dba97b0c406689e
income.fdFlowIdRisk=182d3b6e522b2690119e70d4ff082136
income.fdModelIdRisk=181d76db26e4112e14b9bb4274d06ba1
income.fdFlowIdRisk=182d3bdadab3a52be024e154e99b5f8b
income.docStatus=20
income.loginName=admin
income.docSubject=\u6536\u5165\u660E\u7EC6\u6570\u636E\u63A5\u53E3
......
......@@ -1066,6 +1066,35 @@ public class InsurancesConstants {
public static final String SYSTEM_TRIGGER = "系统触发";
/**
* 一次性导出不可超过20000条,请分批导出
*/
public static final String EXPORT_TOO_LONG = "一次性导出不可超过20000条,请分批导出";
/**
* 一次性导入不可超过20000条,请分批导入
*/
public static final String IMPORT_TOO_LONG = "一次性导入不可超过20000条,请分批导入";
/**
* 结算类型不一致
*/
public static final String SETTLE_TYPE_ATYPISM = "结算类型不一致";
/**
* 预估已推送
*/
public static final String ESTIMATE_IS_PUSH = "预估已推送";
/**
* 实缴已推送,请分批导入
*/
public static final String ACTUAL_IS_PUSH = "实缴已推送";
/**
* 结算id不一致,请分批导入
*/
public static final String SETTLE_ID_ATYPISM = "结算id不一致";
......
......@@ -38,7 +38,7 @@ public class TInsuranceEkp implements Serializable {
/**
* 单据类型 (0、与薪资合并结算 1、单独结算)
*/
private Integer settleType;
private String settleType;
/**
* 项目编码
......@@ -138,7 +138,7 @@ public class TInsuranceEkp implements Serializable {
/**
* 单据状态
*/
private Integer interactiveType;
private String interactiveType;
/**
* 重发标识
......@@ -161,6 +161,12 @@ public class TInsuranceEkp implements Serializable {
@Schema(description = "推送类型(1推送预估费用,2推送实缴费用,3变更结算信息,4推送作废信息,5推送预估红冲信息,6推送实缴红冲信息)")
private Integer pushType;
/**
* 不重发原因
*/
private String notResendMessage;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
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.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
......@@ -94,7 +95,7 @@ public class TInsuranceDetailController {
@PostMapping("/getInsuranceList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insure_export')")
public R<List<InsuranceListVO>> getInsuranceList(@RequestBody InsuranceListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceList(param));
return tInsuranceDetailService.getInsuranceList(param);
}
/**
......@@ -255,6 +256,9 @@ public class TInsuranceDetailController {
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
}
if(param.size() > CommonConstants.IMPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.IMPORT_TOO_LONG);
}
return tInsuranceDetailService.insuranceHandleImport(user,param);
}
......@@ -355,8 +359,8 @@ public class TInsuranceDetailController {
@Operation(summary = "已投保列表不分页查询", description = "已投保列表不分页查询")
@PostMapping("/getInsuredList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_insured_export')")
public R<List<InsuredListVo>> getInsuredList(@RequestBody InsuredParam param) {
return R.ok(tInsuranceDetailService.getInsuredList(param),"查询成功");
public R getInsuredList(@RequestBody InsuredParam param) {
return tInsuranceDetailService.getInsuredList(param);
}
/**
......@@ -382,8 +386,8 @@ public class TInsuranceDetailController {
@Operation(summary = "已减员列表导出", description = "已减员列表导出")
@PostMapping("/getInsuranceRefundList")
@PreAuthorize("@pms.hasPermission('insurance_custserve_reduction_export')")
public R<List<InsuranceRefundListVo>> getInsuranceRefundList(@RequestBody InsuranceRefundParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundList(param));
public R getInsuranceRefundList(@RequestBody InsuranceRefundParam param) {
return tInsuranceDetailService.getInsuranceRefundList(param);
}
......@@ -410,7 +414,7 @@ public class TInsuranceDetailController {
@Operation(summary = "导出减员列表", description = "导出减员列表")
@PostMapping("/getInsuranceRefundHandlingList")
@PreAuthorize("@pms.hasPermission('handle_down_export')")
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) {
public R getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) {
return tInsuranceDetailService.getInsuranceRefundHandlingList(param);
}
......
......@@ -54,9 +54,9 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*
* @author licancan
* @param param
* @return {@link List<InsuranceListVO>}
* @return {@link R<List<InsuranceListVO>>}
*/
List<InsuranceListVO> getInsuranceList(InsuranceListParam param);
R<List<InsuranceListVO>> getInsuranceList(InsuranceListParam param);
/**
* 投保办理分页查询
......@@ -206,7 +206,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param param 查询参数
* @return {@link List< InsuredListVo>}
*/
List<InsuredListVo> getInsuredList(InsuredParam param);
R getInsuredList(InsuredParam param);
/**
* 已减员列表分页查询
......@@ -225,7 +225,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param param 查询参数
* @return {@link List< InsuranceRefundListVo >}
*/
List<InsuranceRefundListVo> getInsuranceRefundList(InsuranceRefundParam param);
R getInsuranceRefundList(InsuranceRefundParam param);
/**
* 减员办理列表分页查询
......
......@@ -32,7 +32,8 @@
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="pushTime" column="PUSH_TIME" jdbcType="TIMESTAMP"/>
<result property="pushType" column="PUSH_TYPE" jdbcType="TINYINT"/>
<result property="settleType" column="SETTLE_TYPE" jdbcType="VARCHAR"/>
<result property="notResendMessage" column="NOT_RESEND_MESSAGE" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -44,7 +45,7 @@
POLICY_END,BUY_STANDARD,MEDICAL_QUOTA,
DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG,
CREATE_TIME,PUSH_TIME,PUSH_TYPE
CREATE_TIME,PUSH_TIME,PUSH_TYPE,SETTLE_TYPE,NOT_RESEND_MESSAGE
</sql>
<select id="getEkpRefundList" resultMap="BaseResultMap">
......@@ -54,6 +55,7 @@
t_insurance_ekp
where
RESEND_FLAG = 0
order by CREATE_TIME asc
</select>
......
......@@ -110,4 +110,8 @@ public class OrderConstants {
* 附件超出上传上限
*/
public static final String ENCLOSURE_SIZE_ERROR = "附件超出上传上限";
/**
* 一次性导出不可超过20000条,请分批导出
*/
public static final String EXPORT_TOO_LONG = "一次性导出不可超过20000条,请分批导出";
}
......@@ -60,7 +60,7 @@ public class OrderController {
@GetMapping("/getOrderList")
@PreAuthorize("@pms.hasPermission('order:order_getOrderList')")
public R<List<OrderListVO>> getOrderList(OrderListParam param) {
return R.ok(tOrderService.getOrderList(param));
return tOrderService.getOrderList(param);
}
/**
......
......@@ -34,9 +34,9 @@ public interface TOrderService extends IService<TOrder> {
*
* @author licancan
* @param param
* @return {@link List<OrderListVO>}
* @return {@link R<List<OrderListVO>>}
*/
List<OrderListVO> getOrderList(OrderListParam param);
R<List<OrderListVO>> getOrderList(OrderListParam param);
/**
* 变更订单状态
......
......@@ -83,7 +83,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
* @author licancan
*/
@Override
public List<OrderListVO> getOrderList(OrderListParam param) {
public R<List<OrderListVO>> getOrderList(OrderListParam param) {
YifuUser user = SecurityUtils.getUser();
List<OrderListVO> list;
if (CollectionUtils.isNotEmpty(param.getIdList())){
......@@ -91,7 +91,12 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}else {
list = baseMapper.getOrderList(param,user.getUsername());
}
return list;
if (CollectionUtils.isNotEmpty(list)){
if(list.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(OrderConstants.EXPORT_TOO_LONG);
}
}
return R.ok(list);
}
/**
......
......@@ -21,14 +21,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
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;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService;
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.vo.TSalaryStandardSearchVo;
......@@ -56,9 +53,6 @@ public class TSalaryStandardController {
private final TSalaryStandardService tSalaryStandardService;
private final TApprovalRecordService auditLogService;
/**
* 简单分页查询-申请
*
......@@ -184,15 +178,8 @@ public class TSalaryStandardController {
|| s.getStatus() == SalaryConstants.STATUS[7]) {
YifuUser user = SecurityUtils.getUser();
if (user != null) {
TApprovalRecord tApprovalRecord = new TApprovalRecord();
tApprovalRecord.setApprovalResult(CommonConstants.TWO_STRING);
tApprovalRecord.setApprovalOpinion(tSalaryStandard.getRemark());
tApprovalRecord.setSalaryId(tSalaryStandard.getId());
tApprovalRecord.setNodeId("提交审核");
tApprovalRecord.setApprovalMan(user.getId());
tApprovalRecord.setApprovalManName(user.getNickname());
tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime());
auditLogService.save(tApprovalRecord);
// 添加流程进展明细
tSalaryStandardService.saveRecordLog(s, user, CommonConstants.TWO_STRING, "提交审核");
tSalaryStandard.setSubmitTime(new Date());
tSalaryStandard.setStatus(CommonConstants.ONE_INT);
tSalaryStandardService.updateById(tSalaryStandard);
......
......@@ -58,6 +58,16 @@ public interface TSalaryAccountItemMapper extends BaseMapper<TSalaryAccountItem>
**/
List<TSalaryAccountItem> getAllItemVoList(@Param("idCardList") List<String> idCardList, @Param("invoiceTitle") String invoiceTitle);
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: hgw
* @Date: 2022/1/27 17:04
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>
**/
List<TSalaryAccountItem> getSalaryItemVoList(@Param("idCardList") List<String> idCardList, @Param("invoiceTitle") String invoiceTitle);
/**
* @param deptId 结算主体id
* @param javaFiedName 属性名
......
......@@ -20,7 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.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.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
......@@ -38,25 +38,26 @@ import java.util.List;
*/
@Mapper
public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
/**
* 工资报账主表(工资条)简单分页查询
* @param tSalaryAccount 工资报账主表(工资条)
* @return
*/
IPage<TSalaryAccount> getTSalaryAccountPage(Page<TSalaryAccount> page, @Param("tSalaryAccount") TSalaryAccount tSalaryAccount);
/**
* 工资报账主表(工资条)简单分页查询
*
* @param tSalaryAccount 工资报账主表(工资条)
* @return
*/
IPage<TSalaryAccount> getTSalaryAccountPage(Page<TSalaryAccount> page, @Param("tSalaryAccount") TSalaryAccount tSalaryAccount);
/**
* @param settleId
* @param settleMonth
* @Description: 版本2.6.6判重:对同一“结算主体”、同一“结算月份”、同一“报表类型”、同一“工资月份”、同一“身份证号”、同一“应发金额”进行校验
*
* <p>
* 校验导入数据重复的Map格式:# 身份证号_工资月份_报表类型_应发金额
*
* @Author: hgw
* @Date: 2021/9/17 18:06
* @return: java.util.List<java.lang.String>
**/
List<AccountCheckVo> getAccountCheckList(@Param("settleId") String settleId, @Param("settleMonth") String settleMonth);
List<AccountCheckVo> getAccountSpecialList(@Param("invoiceTitle") String invoiceTitle, @Param("unitId") String unitId, @Param("salaryMonth") String salaryMonth);
List<AccountCheckVo> getAccountCheckListLabor(@Param("settleId") String settleId, @Param("settleMonth") String settleMonth);
......@@ -72,15 +73,15 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
String getMinTaxMonthByNowYear(@Param("empIdCard") String empIdCard, @Param("nowYear") int nowYear);
/**
* @return
* @Author fxj
* @Description 获取有工资无社保数据
* @Date 17:23 2022/8/16
* @Param
* @return
**/
List<THaveSalaryNosocial> getLastMonthTHaveSalaryNosocial(@Param("month")String month,
@Param("month2")String month2,
@Param("month3")String month3);
**/
List<THaveSalaryNosocial> getLastMonthTHaveSalaryNosocial(@Param("month") String month,
@Param("month2") String month2,
@Param("month3") String month3);
/**
* @Description: 薪资类型互斥校验 获取本年度身份证号列表
......@@ -97,10 +98,10 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
* @Date: 2022/8/29 16:52
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List<EkpSalaryParamVo> getEkpSalaryParamList(@Param("salaryId") String salaryId);
List<EkpSalaryParam> getEkpSalaryParamList(@Param("salaryId") String salaryId);
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList")List<String> idList);
@Param("idList") List<String> idList);
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
......@@ -111,5 +112,5 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List<TSalaryAccount> getListByIncome(@Param("salaryId") String salaryId);
int noPageCountDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList")List<String> idList);
@Param("idList") List<String> idList);
}
......@@ -41,6 +41,15 @@ public interface TSalaryAccountItemService extends IService<TSalaryAccountItem>
**/
Map<String, List<TSalaryAccountItem>> getAllItemVoList(List<String> idCardList, String invoiceTitle);
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: huyc
* @Date: 2022/1/27 17:25
* @return: java.util.Map<java.lang.String, java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>>
**/
Map<String, List<TSalaryAccountItem>> getSalaryItemVoList(List<String> idCardList, String invoiceTitle);
/**
* 工资报账表附加-工资明细简单分页查询
......
......@@ -20,7 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
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.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
......@@ -104,5 +104,5 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @Date: 2022/8/29 16:54
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List<EkpSalaryParamVo> getEkpSalaryParamList(String salaryId);
List<EkpSalaryParam> getEkpSalaryParamList(String salaryId);
}
......@@ -21,6 +21,7 @@ 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.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
......@@ -79,5 +80,19 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/
R<String> doSend(String id);
/**
* @Description: 分页查询-申请
* @Author: hgw
* @Date: 2022/9/6 16:02
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard>
**/
IPage<TSalaryStandard> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard);
/**
* @Description: 添加流程进展明细
* @Author: hgw
* @Date: 2022/9/6 15:59
* @return: void
**/
void saveRecordLog(TSalaryStandard tSalaryStandard, YifuUser user, String status, String nodeId);
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.TSettleDomain;
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.SecurityConstants;
......@@ -484,15 +485,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
String checkYearFinalStyle; //薪资和年终奖扣税方案(0:合并;1:单独)
List<TSalaryTaxConfig> personTax = tSalaryTaxConfigService.getTaxConfigByPersonList(new TSalaryTaxConfig());
List<TSalaryTaxConfig> annousTax = tSalaryTaxConfigService.getTaxConfigByAnnualBonusList(new TSalaryTaxConfig());
//结算主体-薪资配置
TDepartSettlementInfo deptSet = null;
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("请去EKP系统-项目模块编辑结算主体 " + dept.getDepartName() + "(" + dept.getDepartNo() + ")的结算配置!");
} else {
deptSet = deptSetR.getData();
}
int size = savList.size();
TSalaryAccountItem annousSai;
// 自有员工人数
......@@ -608,12 +600,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (modelPersonSocialFlag) {
personalDebt = personalDebt.add(this.saveNewItems(saiList, SalaryConstants.PERSONAL_SOCIAL,
SalaryConstants.PERSONAL_SOCIAL_JAVA,
this.getSocialOrFundMoneyForForecast(socialType, deptSet, a.getEmpIdcard(), socialEstmateList, socialForecastList, true, true, socialList, fundList, forecastSocialList, forecastFundList), CommonConstants.ONE_INT));
this.getSocialOrFundMoneyForForecast(socialType, dept, a.getEmpIdcard(), socialEstmateList, socialForecastList, true, true, socialList, fundList, forecastSocialList, forecastFundList), CommonConstants.ONE_INT));
}
if (modelUnitSocialFlag) {
this.saveNewItems(saiList, SalaryConstants.UNIT_SOCIAL,
SalaryConstants.UNIT_SOCIAL_JAVA,
this.getSocialOrFundMoneyForForecast(socialType, deptSet, a.getEmpIdcard(), socialEstmateList, socialForecastList, true, false, socialList, fundList, forecastSocialList, forecastFundList), CommonConstants.ZERO_INT);
this.getSocialOrFundMoneyForForecast(socialType, dept, a.getEmpIdcard(), socialEstmateList, socialForecastList, true, false, socialList, fundList, forecastSocialList, forecastFundList), CommonConstants.ZERO_INT);
}
}
if (Common.isEmpty(a.getIsDeductFund()) || SalaryConstants.IS_DEDUCT_ONE.equals(a.getIsDeductFund())) {
......@@ -622,12 +614,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (modelPersonFundFlag) {
personalDebt = personalDebt.add(this.saveNewItems(saiList, SalaryConstants.PERSONAL_FUND,
SalaryConstants.PERSONAL_FUND_JAVA,
this.getSocialOrFundMoneyForForecast(fundType, deptSet, a.getEmpIdcard(), fundEstmateList, fundForecastList, false, true, socialList, fundList, forecastSocialList, forecastFundList), CommonConstants.ONE_INT));
this.getSocialOrFundMoneyForForecast(fundType, dept, a.getEmpIdcard(), fundEstmateList, fundForecastList, false, true, socialList, fundList, forecastSocialList, forecastFundList), CommonConstants.ONE_INT));
}
if (modelUnitFundFlag) {
this.saveNewItems(saiList, SalaryConstants.UNIT_FUND,
SalaryConstants.UNIT_FUND_JAVA,
this.getSocialOrFundMoneyForForecast(fundType, deptSet, a.getEmpIdcard(), fundEstmateList, fundForecastList, false, false, socialList, fundList, forecastSocialList, forecastFundList), CommonConstants.ZERO_INT);
this.getSocialOrFundMoneyForForecast(fundType, dept, a.getEmpIdcard(), fundEstmateList, fundForecastList, false, false, socialList, fundList, forecastSocialList, forecastFundList), CommonConstants.ZERO_INT);
}
}
}
......@@ -1054,14 +1046,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/9/26 15:38
* @return: java.math.BigDecimal
**/
public BigDecimal getSocialOrFundMoneyForForecast(String socialFundType, TDepartSettlementInfo deptSet, String idNumber
public BigDecimal getSocialOrFundMoneyForForecast(String socialFundType, TSettleDomain dept, String idNumber
, List<TPaymentBySalaryVo> estmateList, List<TPaymentBySalaryVo> forecastList, boolean isSocial, boolean isPerson
, Set<String> socialList, Set<String> fundList, Set<String> forecastSocialList, Set<String> forecastFundList) {
BigDecimal money = SalaryConstants.B_ZERO;
BigDecimal sub = SalaryConstants.B_ZERO;
if (isSocial && deptSet.getUnitSeriousIllnessProp() != null
&& deptSet.getUnitSeriousIllnessProp().compareTo(SalaryConstants.B_ONEHUNDRED) < SalaryConstants.EQUAL) {
sub = (new BigDecimal("100").subtract(deptSet.getUnitSeriousIllnessProp()))
if (isSocial && dept.getUnitSeriousIllnessProp() != null
&& dept.getUnitSeriousIllnessProp().compareTo(SalaryConstants.B_ONEHUNDRED) < SalaryConstants.EQUAL) {
sub = (new BigDecimal("100").subtract(dept.getUnitSeriousIllnessProp()))
.divide(SalaryConstants.B_ONEHUNDRED, SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
}
if (CommonConstants.ZERO_STRING.equals(socialFundType) && estmateList != null && !estmateList.isEmpty()) {
......
......@@ -100,6 +100,32 @@ public class TSalaryAccountItemServiceImpl extends ServiceImpl<TSalaryAccountIte
return itemMap;
}
/**
* @param idCardList
* @param invoiceTitle
* @Description: 获取所有工资报账,组装map,计算年终奖使用
* @Author: hgw
* @Date: 2022/1/27 17:25
* @return: java.util.Map<java.lang.String, java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAccountItem>>
**/
@Override
public Map<String, List<TSalaryAccountItem>> getSalaryItemVoList(List<String> idCardList, String invoiceTitle) {
List<TSalaryAccountItem> list = baseMapper.getSalaryItemVoList(idCardList, invoiceTitle);
Map<String, List<TSalaryAccountItem>> itemMap = new HashMap<>();
if (list != null && !list.isEmpty()) {
List<TSalaryAccountItem> voList;
for (TSalaryAccountItem item : list) {
voList = itemMap.get(item.getEmpIdcard());
if (voList == null) {
voList = new ArrayList<>();
}
voList.add(item);
itemMap.put(item.getEmpIdcard(), voList);
}
}
return itemMap;
}
/**
* @param settleDepartId 结算主体id
* @param javaFiedName 属性名
......
......@@ -26,7 +26,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
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.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
......@@ -212,7 +212,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
@Override
public List<EkpSalaryParamVo> getEkpSalaryParamList(String salaryId) {
public List<EkpSalaryParam> getEkpSalaryParamList(String salaryId) {
return baseMapper.getEkpSalaryParamList(salaryId);
}
......
......@@ -35,7 +35,6 @@ 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.ekp.util.EkpSalaryUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
......@@ -49,9 +48,9 @@ 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.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;
......@@ -92,6 +91,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Autowired
private EkpSalaryUtil ekpSalaryUtil;
@Autowired
private TApprovalRecordService auditLogService;
/**
* 标准薪酬工资表简单分页查询
*
......@@ -311,7 +313,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TIncomeDetailReturnVo vo = detailR.getData();
List<TIncomeDetail> detailList = vo.getDetailList();
for (TIncomeDetail incomeDetail : detailList) {
value = detailMap.get(incomeDetail.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + incomeDetail.getFeeType()
value = detailMap.get(incomeDetail.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING
+ incomeDetail.getDeptId() + CommonConstants.DOWN_LINE_STRING + incomeDetail.getFeeType()
+ CommonConstants.DOWN_LINE_STRING + incomeDetail.getSourceType());
if (Common.isEmpty(value)) {
value = CommonConstants.ZERO_INT;
......@@ -322,6 +325,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
value--;
}
detailMap.put(incomeDetail.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING
+ incomeDetail.getDeptId() + CommonConstants.DOWN_LINE_STRING
+ incomeDetail.getFeeType() + CommonConstants.DOWN_LINE_STRING
+ incomeDetail.getSourceType(), value);
}
......@@ -510,7 +514,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return R.failed("未找到工资表");
} else if (s.getStatus() == SalaryConstants.STATUS[2] || s.getStatus() == SalaryConstants.STATUS[10]) {
//报账表
List<EkpSalaryParamVo> ekpList = salaryAccountService.getEkpSalaryParamList(id);
List<EkpSalaryParam> ekpList = salaryAccountService.getEkpSalaryParamList(id);
YifuUser user = SecurityUtils.getUser();
if (user != null && ekpList != null && !ekpList.isEmpty()) {
boolean sendStatus = true;
......@@ -519,14 +523,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
TSalaryAccount account;
Date sendTime = new Date();
String nowMonth = DateUtil.addMonth(0);
EkpSalaryParam sendParam;
for (EkpSalaryParamVo sendParamVo : ekpList) {
for (EkpSalaryParam sendParam : ekpList) {
// 转化报账表的参数
account = new TSalaryAccount();
account.setId(sendParamVo.getSalaryAccountId());
sendParam = new EkpSalaryParam();
BeanUtils.copyProperties(sendParamVo, sendParam);
account.setId(sendParam.getFd_3b10af838eab5c());
sendBack = ekpSalaryUtil.sendToEKP(sendParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendToEKP(sendParam);
}
account.setSendTime(sendTime);
account.setSendUser(user.getId());
account.setSendUserName(user.getNickname());
......@@ -536,6 +540,16 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
account.setEkpId(sendBack);
} else {
sendStatus = false;
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.ONE_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(account.getId());
error.setTitle(sendBack);
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
}
accountList.add(account);
}
......@@ -545,10 +559,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
s.setSendMonth(DateUtil.addMonth(0));
s.setStatus(SalaryConstants.STATUS[3]);
this.updateById(s);
// 添加流程进展明细
this.saveRecordLog(s, user, CommonConstants.ZERO_STRING, "发送数字化平台-成功");
return R.ok("发送成功!");
} else {
s.setStatus(SalaryConstants.STATUS[10]);
this.updateById(s);
// 添加流程进展明细
this.saveRecordLog(s, user, CommonConstants.ONE_STRING, "发送数字化平台-失败");
return R.ok("发送失败!");
}
} else {
......@@ -559,4 +577,23 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
}
/**
* @Description: 添加流程进展明细
* @Author: hgw
* @Date: 2022/9/6 16:02
* @return: void
**/
@Override
public void saveRecordLog(TSalaryStandard tSalaryStandard, YifuUser user, String status, String nodeId) {
TApprovalRecord tApprovalRecord = new TApprovalRecord();
tApprovalRecord.setApprovalResult(status);
tApprovalRecord.setApprovalOpinion(tSalaryStandard.getRemark());
tApprovalRecord.setSalaryId(tSalaryStandard.getId());
tApprovalRecord.setNodeId(nodeId);
tApprovalRecord.setApprovalMan(user.getId());
tApprovalRecord.setApprovalManName(user.getNickname());
tApprovalRecord.setApprovalTime(DateUtil.getCurrentDateTime());
auditLogService.save(tApprovalRecord);
}
}
......@@ -434,6 +434,36 @@
AND a.DELETE_FLAG = 0 and a.FORM_TYPE != 7
</where>
</select>
<!-- 获取所有数据,组装map,工资导入使用 -->
<select id="getSalaryItemVoList" resultMap="itemVoMap">
SELECT
i.ID,
i.SALARY_ACCOUNT_ID,
i.CN_NAME,
i.JAVA_FIED_NAME,
i.SALARY_MONEY,
i.TEXT_VALUE,
i.IS_TAX,
a.EMP_IDCARD,
a.SETTLEMENT_MONTH,
a.FORM_TYPE
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
a.SETTLEMENT_MONTH like DATE_FORMAT(now(),"%Y%")
<if test="idCardList != null">
AND a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="invoiceTitle != null and invoiceTitle.trim() != ''">
AND a.INVOICE_TITLE = #{invoiceTitle}
</if>
AND a.DELETE_FLAG = 0 and a.FORM_TYPE = 0
</where>
</select>
<select id="getSumByAccountId" resultType="java.util.Map">
SELECT
a.SALARY_ACCOUNT_ID as 'key',
......
......@@ -81,8 +81,8 @@
</resultMap>
<!-- 对接EKP的参数 -->
<resultMap id="ekpSalaryParamVoMap" type="com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo">
<id property="salaryAccountId" column="id"/>
<resultMap id="ekpSalaryParamVoMap" type="com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam">
<result property="fd_3b10af838eab5c" column="fd_3b10af838eab5c"/>
<result property="fd_3adfedf98ccba2" column="fd_3adfedf98ccba2"/>
<result property="fd_3adfedf9d2bf1c" column="fd_3adfedf9d2bf1c"/>
<result property="fd_3adfedfacd65d6" column="fd_3adfedfacd65d6"/>
......@@ -444,7 +444,7 @@
<!-- 获取薪资明细 -->
<select id="getEkpSalaryParamList" resultMap="ekpSalaryParamVoMap">
select
a.id fd_id
ifnull(a.id,'') fd_3b10af838eab5c
,ifnull(a.DEPT_NO,'') fd_3adfedf98ccba2
,ifnull(a.DEPT_NAME,'') fd_3adfedf9d2bf1c
,'' fd_3adfedfa4410aa
......@@ -462,16 +462,16 @@
,if(a.FUND_PRIORITY='1','缴纳月','生成月') fd_3adfedff3a7430
,if(a.OWN_FLAG='1','是','否') fd_3adfee0009d070
,if(a.ANNUAL_BONUS_TYPE='1','单独','合并') fd_3adfee01dea2fa
,ifnull(a.RELAY_SALARY,'') fd_3adfee12cb8840
,ifnull(pdeduction.SALARY_MONEY,'') fd_3adfee1374ed7a
,ifnull(a.RELAY_SALARY,'0') fd_3adfee12cb8840
,ifnull(pdeduction.SALARY_MONEY,'0') fd_3adfee1374ed7a
,ifnull(ifnull(withholidingUnitSocial.SALARY_MONEY,unitSocial.SALARY_MONEY),'') fd_3adfee1e2b2f78
,ifnull(ifnull(withholidingPersonSocial.SALARY_MONEY,personalSocial.SALARY_MONEY),'') fd_3adfee1e88723e
,ifnull(ifnull(withholidingUnitFund.SALARY_MONEY,unitFund.SALARY_MONEY),'') fd_3adfee1ee24680
,ifnull(ifnull(withholidingPersonFund.SALARY_MONEY,personalFund.SALARY_MONEY),'') fd_3adfee1f32fa24
,ifnull(a.SALARY_TAX,'') fd_3adfee1f901c46
,ifnull(a.SALARY_TAX,'0') fd_3adfee1f901c46
,'' fd_3adfee1ff1ca6a
,'' fd_3adfee203f86b2
,ifnull(a.ACTUAL_SALARY,'') fd_3adfee20fe5ba4
,ifnull(a.ACTUAL_SALARY,'0') fd_3adfee20fe5ba4
,'' fd_3adfee21802434
,'' fd_3adfee4ba5ad36
,'' fd_3adfee4c0c59ee
......@@ -548,7 +548,7 @@
a.DEPT_ID,
a.DEPT_NO,
a.DEPT_NAME,
ifnull(if(a.FORM_TYPE='4',a.RELAY_SALARY_UNIT,a.RELAY_SALARY),0)
ifnull(if(a.FORM_TYPE='3',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
......
/*
* 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.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Date;
/**
* 推送ekp报错的记录表
*
* @author hgw
* @date 2022-9-7 16:11:24
*/
@Data
@TableName("t_send_ekp_error")
@Schema(description = "推送ekp报错的记录表(同类型仅1条记录,更新计数器)")
public class TSendEkpError {
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
private String id;
@ExcelAttribute(name = "内容")
@ExcelProperty("内容")
private String title;
@ExcelAttribute(name = "类型")
@ExcelProperty("类型(1薪资明细2预估明细3缴费明细4实时收入5定时收入)")
private String type;
@ExcelAttribute(name = "创建日")
@ExcelProperty("创建日")
private String createDay;
@ExcelAttribute(name = "关联ID")
@ExcelProperty("关联ID")
private String linkId;
@ExcelAttribute(name = "创建时间")
@ExcelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ExcelAttribute(name = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createUserName;
@ExcelAttribute(name = "计数器")
@ExcelProperty("计数器")
private Integer nums;
}
......@@ -288,4 +288,13 @@ public class TForecastLibraryController {
tForecastLibraryService.createForecastFundInfo();
}
@PostMapping("/createFundInfo")
public void createFundInfo() {
tForecastLibraryService.createForecastFundInfo();
}
@PostMapping("/createSocialInfo")
public void createSocialInfo() {
tForecastLibraryService.createForecastInfo();
}
}
......@@ -341,6 +341,16 @@ public class TPaymentInfoController {
tPaymentInfoService.createPaymentFundInfo();
}
@PostMapping("/createFundInfo")
public void createFundInfo() {
tPaymentInfoService.createPaymentFundInfo();
}
@PostMapping("/createSocialInfo")
public void createSocialInfo() {
tPaymentInfoService.createPaymentSocialInfo();
}
/**
* @Description: 定时生成缴费库的收入数据
* @Author: huyc
......
/*
* 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.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
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;
/**
* 推送ekp报错的记录表
*
* @author hgw
* @date 2022-08-30 17:34:58
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tsendekperror")
@Tag(name = "推送ekp报错的记录表")
public class TSendEkpErrorController {
private final TSendEkpErrorService tSendEkpErrorService;
/**
* @Description: 新增-推送ekp报错的记录表
* @Author: hgw
* @Date: 2022/8/31 16:34
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Inner
@PostMapping("/inner/saveError")
public Boolean saveError(@RequestBody TSendEkpError tSendEkpError) {
return tSendEkpErrorService.saveError(tSendEkpError);
}
}
/*
* 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.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* error存储
*
* @author hgw
* @date 2022-9-7 16:28:46
*/
@Mapper
public interface TSendEkpErrorMapper extends BaseMapper<TSendEkpError> {
/**
* @param tSendEkpError
* @Description: 查找对应类型的1条数据来更新
* @Author: hgw
* @Date: 2022/9/7 16:56
* @return: com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
**/
TSendEkpError getByTitleTypeDay( @Param("tSendEkpError") TSendEkpError tSendEkpError);
}
/*
* 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.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
/**
* 收入明细表
*
* @author hgw
* @date 2022-08-30 17:34:58
*/
public interface TSendEkpErrorService extends IService<TSendEkpError> {
/**
* @Description: 新增-推送ekp报错的记录表;
* @Author: hgw
* @Date: 2022/8/31 16:31
* @return: boolean
**/
boolean saveError(TSendEkpError tSendEkpError);
}
/*
* 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.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSendEkpErrorMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 收入明细表
*
* @author hgw
* @date 2022-08-30 17:34:58
*/
@Log4j2
@Service
public class TSendEkpErrorServiceImpl extends ServiceImpl<TSendEkpErrorMapper, TSendEkpError> implements TSendEkpErrorService {
/**
* @Description: 新增-推送ekp报错的记录表;
* @Author: hgw
* @Date: 2022/8/31 16:34
* @return: boolean
**/
@Override
public boolean saveError(TSendEkpError tSendEkpError) {
// 类型、创建日不可为空
if (Common.isEmpty(tSendEkpError.getType()) || Common.isEmpty(tSendEkpError.getCreateDay())) {
return false;
}
TSendEkpError error = baseMapper.getByTitleTypeDay(tSendEkpError);
if (error == null) {
return this.save(tSendEkpError);
} else {
error.setNums(error.getNums()+ CommonConstants.ONE_INT);
return this.updateById(error);
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ 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)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TSendEkpErrorMapper">
<resultMap id="tSendEkpErrorMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError">
<id property="id" column="ID"/>
<result property="title" column="title"/>
<result property="type" column="TYPE"/>
<result property="createDay" column="CREATE_DAY"/>
<result property="linkId" column="LINK_ID"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="createUserName" column="CREATE_USER_NAME"/>
<result property="nums" column="NUMS"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.TITLE,
a.TYPE,
a.CREATE_DAY,
a.LINK_ID,
a.CREATE_TIME,
a.CREATE_USER_NAME,
a.NUMS
</sql>
<sql id="tSendEkpError_where">
<if test="tSendEkpError != null">
<if test="tSendEkpError.id != null and tSendEkpError.id.trim() != ''">
AND a.ID = #{tSendEkpError.id}
</if>
<if test="tSendEkpError.title != null and tSendEkpError.title.trim() != ''">
AND a.TITLE = #{tSendEkpError.title}
</if>
<if test="tSendEkpError.title == null or tSendEkpError.title.trim() == ''">
AND a.TITLE is null
</if>
<if test="tSendEkpError.type != null and tSendEkpError.type.trim() != ''">
AND a.TYPE = #{tSendEkpError.type}
</if>
<if test="tSendEkpError.createDay != null and tSendEkpError.createDay.trim() != ''">
AND a.CREATE_DAY = #{tSendEkpError.createDay}
</if>
</if>
</sql>
<!-- 查找对应类型的1条数据来更新 -->
<select id="getByTitleTypeDay" resultMap="tSendEkpErrorMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_provident_fund a
<where>
1=1
<include refid="tSendEkpError_where"/>
</where>
limit 1
</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