From 7c5af2166e188c66eea45fad0e9590075b9e3a93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Fri, 22 Sep 2023 17:57:47 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F?=
=?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../WEB-INF/prop/hrmSalaryCustom.properties | 2 +-
.../salaryacct/bo/CalculateFormulaVarBO.java | 17 ++++++++++++++---
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/resource/WEB-INF/prop/hrmSalaryCustom.properties b/resource/WEB-INF/prop/hrmSalaryCustom.properties
index b873bc15e..0a68219c5 100644
--- a/resource/WEB-INF/prop/hrmSalaryCustom.properties
+++ b/resource/WEB-INF/prop/hrmSalaryCustom.properties
@@ -1 +1 @@
-formulaRunOvertimeThreshold=10
\ No newline at end of file
+salaryDateFormat=yyyy-MM
\ No newline at end of file
diff --git a/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java b/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java
index 74835472d..896b615a0 100644
--- a/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java
+++ b/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java
@@ -30,6 +30,7 @@ import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
+import weaver.general.BaseBean;
import java.lang.reflect.Field;
import java.math.BigDecimal;
@@ -51,6 +52,8 @@ import static com.engine.salary.util.SalaryDateUtil.DATE_TIME_FORMATTER_PATTERN;
@Data
@Accessors(chain = true)
public class CalculateFormulaVarBO {
+ BaseBean bb = new BaseBean();
+ String salaryDateFormat = bb.getPropValue("hrmSalaryCustom", "salaryDateFormat");
/**
* 员工信息
@@ -168,7 +171,11 @@ public class CalculateFormulaVarBO {
String fieldValue = map.getOrDefault(fieldName, StringUtils.EMPTY);
//日期值取yyyy-MM-dd
if (StringUtils.isNotBlank(fieldValue) && fieldValue.length() > 10 && SalaryDateUtil.parse(fieldValue, DATE_TIME_FORMATTER_PATTERN) != null) {
- fieldValue = fieldValue.substring(0, 10);
+ if (StringUtils.isNotBlank(salaryDateFormat)) {
+ fieldValue = fieldValue.substring(0, salaryDateFormat.length());
+ } else {
+ fieldValue = fieldValue.substring(0, 10);
+ }
}
formulaVarValues.add(new FormulaVarValue().setFieldId(fieldId).setFieldValue(fieldValue));
}
@@ -208,7 +215,7 @@ public class CalculateFormulaVarBO {
formulaVarValues.addAll(salaryAcctCalculateBO.getIssuedFieldIds().stream()
.map(fieldId -> {
String originResultValue = salaryAcctResultPOMap.getOrDefault(
- salaryCodeItemMap.get(fieldId),SalaryAcctResultPO.builder().originResultValue("").build())
+ salaryCodeItemMap.get(fieldId), SalaryAcctResultPO.builder().originResultValue("").build())
.getOriginResultValue();
String fieldId2 = SalaryFormulaReferenceEnum.ISSUED.getValue()
+ SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR
@@ -520,7 +527,11 @@ public class CalculateFormulaVarBO {
String fieldValue = map.getOrDefault(fieldName, StringUtils.EMPTY);
//判断是否是日期,日期值取yyyy-MM-dd
if (StringUtils.isNotBlank(fieldValue) && fieldValue.length() > 10 && SalaryDateUtil.parse(fieldValue, DATE_TIME_FORMATTER_PATTERN) != null) {
- fieldValue = fieldValue.substring(0, 10);
+ if (StringUtils.isNotBlank(salaryDateFormat)) {
+ fieldValue = fieldValue.substring(0, salaryDateFormat.length());
+ } else {
+ fieldValue = fieldValue.substring(0, 10);
+ }
}
return new FormulaVarValue().setFieldId(fieldId).setFieldValue(fieldValue);
}).collect(Collectors.toList()));
From 7368363631101705d9dec939680d80f1da10fc4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Wed, 11 Oct 2023 18:24:02 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=9C=8D=E5=8A=A1?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../param/EmployeeDeclareParam.java | 3 +-
.../taxagent/po/TaxAgentTaxReturnPO.java | 5 +
.../remote/tax/client/EmployeeClient.java | 65 ++++
.../remote/tax/client/TaxBaseClient.java | 46 +++
.../employee/GetCompanyEmployeeRequest.java | 65 ++++
.../employee/GetCompanyEmployeeResponse.java | 334 ++++++++++++++++++
.../salary/web/EmployeeDeclareController.java | 15 +
.../wrapper/EmployeeDeclareWrapper.java | 13 +
test/ApiDes.java | 20 ++
test/ParseTaxApi.java | 55 +++
10 files changed, 620 insertions(+), 1 deletion(-)
create mode 100644 src/com/engine/salary/remote/tax/client/EmployeeClient.java
create mode 100644 src/com/engine/salary/remote/tax/client/TaxBaseClient.java
create mode 100644 src/com/engine/salary/remote/tax/request/employee/GetCompanyEmployeeRequest.java
create mode 100644 src/com/engine/salary/remote/tax/response/employee/GetCompanyEmployeeResponse.java
create mode 100644 test/ApiDes.java
create mode 100644 test/ParseTaxApi.java
diff --git a/src/com/engine/salary/entity/employeedeclare/param/EmployeeDeclareParam.java b/src/com/engine/salary/entity/employeedeclare/param/EmployeeDeclareParam.java
index 8f99c2e98..8af42f76a 100644
--- a/src/com/engine/salary/entity/employeedeclare/param/EmployeeDeclareParam.java
+++ b/src/com/engine/salary/entity/employeedeclare/param/EmployeeDeclareParam.java
@@ -1,5 +1,6 @@
package com.engine.salary.entity.employeedeclare.param;
+import com.engine.salary.common.BaseQueryParam;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -20,7 +21,7 @@ import java.util.Date;
@Builder
@AllArgsConstructor
@NoArgsConstructor
-public class EmployeeDeclareParam {
+public class EmployeeDeclareParam extends BaseQueryParam {
/**
* 个税扣缴义务人id
diff --git a/src/com/engine/salary/entity/taxagent/po/TaxAgentTaxReturnPO.java b/src/com/engine/salary/entity/taxagent/po/TaxAgentTaxReturnPO.java
index 717a5e960..b20fd8d43 100644
--- a/src/com/engine/salary/entity/taxagent/po/TaxAgentTaxReturnPO.java
+++ b/src/com/engine/salary/entity/taxagent/po/TaxAgentTaxReturnPO.java
@@ -38,6 +38,11 @@ public class TaxAgentTaxReturnPO implements Serializable {
*/
private Long taxAgentId;
+ /**
+ * 企业名称
+ */
+ private Long taxAgentName;
+
/**
* 税号
*/
diff --git a/src/com/engine/salary/remote/tax/client/EmployeeClient.java b/src/com/engine/salary/remote/tax/client/EmployeeClient.java
new file mode 100644
index 000000000..8ea3f8177
--- /dev/null
+++ b/src/com/engine/salary/remote/tax/client/EmployeeClient.java
@@ -0,0 +1,65 @@
+package com.engine.salary.remote.tax.client;
+
+import com.engine.salary.entity.employeedeclare.param.EmployeeDeclareParam;
+import com.engine.salary.enums.taxagent.TaxAgentTaxReturnPasswordTypeEnum;
+import com.engine.salary.remote.tax.request.employee.GetCompanyEmployeeRequest;
+import com.engine.salary.remote.tax.response.employee.GetCompanyEmployeeResponse;
+import com.engine.salary.util.HttpUtil;
+import com.engine.salary.util.JsonUtil;
+import com.engine.salary.util.SalaryDateUtil;
+import com.engine.salary.util.SingnatureData;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 人员信息登记报送服务
+ *
Copyright: Copyright (c) 2023
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+@Slf4j
+public class EmployeeClient extends TaxBaseClient {
+
+ public EmployeeClient(Long taxAgentId) {
+ super(taxAgentId);
+ }
+
+ //4.2.3企业人员列表查询
+ public GetCompanyEmployeeResponse getCompanyEmployee(EmployeeDeclareParam param) {
+
+ String url = super.apiConfig.getHost() + "gateway/iit/data/getCompanyEmployee";
+ GetCompanyEmployeeRequest getCompanyEmployeeRequest = new GetCompanyEmployeeRequest();
+ getCompanyEmployeeRequest.setNsrsbh( returnPO.getTaxCode());
+ getCompanyEmployeeRequest.setQymc("");
+ getCompanyEmployeeRequest.setDjxhid(StringUtils.isNotEmpty(returnPO.getTaxRegistrationNumber()) ? returnPO.getTaxRegistrationNumber() : null);
+ getCompanyEmployeeRequest.setAreaid(returnPO.getAreaCode());
+ getCompanyEmployeeRequest.setBmbh(StringUtils.isNotEmpty(returnPO.getDepartmentCode()) ? returnPO.getDepartmentCode() : null);
+ boolean realNamePwd = TaxAgentTaxReturnPasswordTypeEnum.REAL_NAME_PASSWORD.getValue().equals(returnPO.getPasswordType());
+ getCompanyEmployeeRequest.setSbmm(realNamePwd ? null : returnPO.getPwd());
+ getCompanyEmployeeRequest.setJmsbmm("0");
+ getCompanyEmployeeRequest.setSmzh(realNamePwd ? returnPO.getRealAccount() : null);
+ getCompanyEmployeeRequest.setSmmm(realNamePwd ? returnPO.getPwd() : null);
+ getCompanyEmployeeRequest.setJmsmmm("0");
+ getCompanyEmployeeRequest.setMmlx(""+returnPO.getPasswordType());
+ getCompanyEmployeeRequest.setSsyf(SalaryDateUtil.getFormatYYYYMM(param.getTaxCycle()));
+ getCompanyEmployeeRequest.setPageNo(""+param.getCurrent());
+ getCompanyEmployeeRequest.setPageSize(""+param.getPageSize());
+
+ String reqJson = JsonUtil.toJsonString(getCompanyEmployeeRequest);
+ log.info("getCompanyEmployee params --- \n{}\n", reqJson);
+ Map params = new HashMap<>(1);
+ Map header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret());
+
+ // 开始请求
+ String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE);
+ log.info("getCompanyEmployee res --- {}", res);
+ return JsonUtil.parseObject(res, GetCompanyEmployeeResponse.class);
+
+ }
+
+}
diff --git a/src/com/engine/salary/remote/tax/client/TaxBaseClient.java b/src/com/engine/salary/remote/tax/client/TaxBaseClient.java
new file mode 100644
index 000000000..38ba9862a
--- /dev/null
+++ b/src/com/engine/salary/remote/tax/client/TaxBaseClient.java
@@ -0,0 +1,46 @@
+package com.engine.salary.remote.tax.client;
+
+import com.engine.salary.entity.taxagent.po.TaxAgentTaxReturnPO;
+import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationApiConfigPO;
+import com.engine.salary.mapper.taxagent.TaxAgentTaxReturnMapper;
+import com.engine.salary.mapper.taxdeclaration.TaxDeclareApiConfigMapper;
+import com.engine.salary.util.Sm4Utils;
+import com.engine.salary.util.db.MapperProxyFactory;
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 人员信息登记报送服务
+ * Copyright: Copyright (c) 2023
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+@Slf4j
+public class TaxBaseClient {
+ private TaxDeclareApiConfigMapper getTaxDeclareApiConfigMapper() {
+ return MapperProxyFactory.getProxy(TaxDeclareApiConfigMapper.class);
+ }
+
+
+ private TaxAgentTaxReturnMapper getTaxAgentTaxReturnMapper() {
+ return MapperProxyFactory.getProxy(TaxAgentTaxReturnMapper.class);
+ }
+
+ public Long taxAgentId;
+ public TaxDeclarationApiConfigPO apiConfig ;
+ public TaxAgentTaxReturnPO returnPO ;
+
+ public TaxBaseClient(Long taxAgentId) {
+ this.taxAgentId = taxAgentId;
+ this.apiConfig = getTaxDeclareApiConfigMapper().getOne();
+ TaxAgentTaxReturnPO taxReturnPO = getTaxAgentTaxReturnMapper().selectOneByTaxAgentId(taxAgentId);
+ try {
+ // 密码解密
+ taxReturnPO.setPwd(Sm4Utils.decryptEcb(apiConfig.getAppSecret(), taxReturnPO.getPwd()));
+ } catch (Exception e) {
+ log.error("Sm4Utils.decryptEcb ---- error: {}", e.getMessage());
+ }
+ this.returnPO = taxReturnPO;
+ }
+}
diff --git a/src/com/engine/salary/remote/tax/request/employee/GetCompanyEmployeeRequest.java b/src/com/engine/salary/remote/tax/request/employee/GetCompanyEmployeeRequest.java
new file mode 100644
index 000000000..799722704
--- /dev/null
+++ b/src/com/engine/salary/remote/tax/request/employee/GetCompanyEmployeeRequest.java
@@ -0,0 +1,65 @@
+package com.engine.salary.remote.tax.request.employee;
+
+import lombok.Data;
+
+@Data
+public class GetCompanyEmployeeRequest {
+ /**
+ * 税号 必填:是 扣缴单位纳税人识别号
+ */
+ private String nsrsbh;
+ /**
+ * 企业名称 必填:是 扣缴义务人名称:例如:测试网络科技有限公司
+ */
+ private String qymc;
+ /**
+ * 登记序号 必填:条件必填 存在多个登记序号时,需要指定传入一个.例:10117440105249764755
+ */
+ private String djxhid;
+ /**
+ * 地区编号 必填:是 6位行政区划代码,精确到市级,例如:440100,,参考省市区编码
+ */
+ private String areaid;
+ /**
+ * 部门编号 必填:条件必填 分部门代报时必传
+ */
+ private String bmbh;
+ /**
+ * 申报密码 必填:条件必填 当mmlx=0时,必填
+ */
+ private String sbmm;
+ /**
+ * 加密实名密码 必填:否 默认不传则设置为0,0表示不加密;1表示加密
+ */
+ private String jmsbmm;
+ /**
+ * 实名账号 必填:是
+ */
+ private String smzh;
+ /**
+ * 实名密码 必填:是
+ */
+ private String smmm;
+ /**
+ * 加密实名密码 必填:否 默认不传则设置为0,0表示不加密;1表示加密 参考3.4代报、实名密码加密说明
+ */
+ private String jmsmmm;
+
+ /**
+ * 密码类型 必填:是 0表示申报密码; 2表示实名账号实名密码
+ */
+ private String mmlx;
+
+ /**
+ * 所属月份 必填:是 格式YYYYMM年
+ */
+ private String ssyf;
+ /**
+ * 页码 必填:是 大于0
+ */
+ private String pageNo;
+ /**
+ * 数量 必填:是 大于0
+ */
+ private String pageSize;
+}
diff --git a/src/com/engine/salary/remote/tax/response/employee/GetCompanyEmployeeResponse.java b/src/com/engine/salary/remote/tax/response/employee/GetCompanyEmployeeResponse.java
new file mode 100644
index 000000000..300dc9a1a
--- /dev/null
+++ b/src/com/engine/salary/remote/tax/response/employee/GetCompanyEmployeeResponse.java
@@ -0,0 +1,334 @@
+package com.engine.salary.remote.tax.response.employee;
+
+import com.engine.salary.entity.taxpayment.response.BaseResponse;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GetCompanyEmployeeResponse extends BaseResponse {
+ /**
+ * 返回数据
+ */
+ private List body;
+
+
+ @Data
+ public static class Employee {
+ /**
+ * 其他证件类型 必填:条件必填 见证件类型字典
+ */
+ private String qtzzlx;
+
+
+ /**
+ * 员工姓名 必填:纳税人姓名
+ */
+ private String xm;
+
+ /**
+ * 证件类型 必填:见证件类型字典
+ */
+ private String zzlx;
+
+ /**
+ * 证件号码 必填:
+ */
+ private String zzhm;
+
+ /**
+ * 部门编号 必填:条件必填 若人员存在部门编号则返回
+ */
+ private String bmbh;
+
+ /**
+ * 其他证件号码 必填:条件必填 见证件类型字典
+ */
+ private String qtzzhm;
+
+ /**
+ * 工号 必填:否
+ */
+ private String gh;
+
+ /**
+ * 报送状态 必填: 1 待报送 2 报送中 3 报送失败 4 报送成功
+ */
+ private String sbzt;
+
+
+ /**
+ * 验证状态 必填: 0 若是身份证,状态为验证中;其他证件为暂不验证 1 验证通过 2 验证不通过 4 待验证 9 同代码0处理
+ */
+ private String rzzt;
+
+ /**
+ * 任职受雇类型 必填:是 可选择雇员、保险营销员、证券经纪人、其他、实习学生(全日制学历教育)
+ */
+ private String sfgy;
+
+ /**
+ * 所属期 必填:否 YYYYMM
+ */
+ private String skssq;
+
+ /**
+ * 电话号码 必填:是 11位手机号码
+ */
+ private String lxdh;
+
+ /**
+ * 人员状态 必填:是 0 :正常 1 :非正常
+ */
+ private String nsrzt;
+
+ /**
+ * 入职年度就业情形 必填:否
+ */
+ private String rzndjyqk;
+
+ /**
+ * 受雇日期 必填:条件必填 YYYY-MM-DD,
+ */
+ private String rzsgrq;
+
+ /**
+ * 性别 必填:是 1:男 2:女
+ */
+ private String xb;
+
+ /**
+ * 出生日期 必填:是 YYYY-MM-DD
+ */
+ private String csny;
+
+ /**
+ * 国籍 必填:是 见国籍字典
+ */
+ private String gj;
+
+ /**
+ * 人员地区 必填:是 1:境内 2:境外
+ */
+ private String rydq;
+
+ /**
+ * 离职日期 必填:否 YYYY-MM-DD,不能大于当前时间
+ */
+ private String lzrq;
+
+ /**
+ * 个人投资总额 必填:条件必填 当为股东投资者时必填
+ */
+ private BigDecimal grgbze;
+ /**
+ * 个人投资比例 必填:否 范围为0~100,不包含0
+ */
+ private BigDecimal grgbbl;
+
+ /**
+ * 是否残疾 必填:否 0:否 1:是
+ */
+ private String sfcj;
+
+ /**
+ * 是否烈属 必填:否 0:否 1:是
+ */
+ private String sfls;
+
+ /**
+ * 是否孤老 必填:否 0:否 1:是
+ */
+ private String sfgl;
+
+ /**
+ * 残疾证号 必填:条件必填
+ */
+ private String cjzh;
+
+ /**
+ * 烈属证号 必填:条件必填
+ */
+ private String lszh;
+
+ /**
+ * 邮箱 必填:否
+ */
+ private String dzyx;
+
+ /**
+ * 学历 必填:否 10:研究生 20:大学本科 30:大学本科以下
+ */
+ private String xl;
+
+ /**
+ * 职务 必填:否 1:高层 3:普通
+ */
+ private String zw;
+
+ /**
+ * 人员状态名称 必填:否
+ */
+ private String nsrztmc;
+
+ /**
+ * 性别名称 必填:否
+ */
+ private String xbmc;
+
+ /**
+ * 人员地区名称 必填:否
+ */
+ private String rydqmc;
+
+ /**
+ * 是否残疾名称 必填:否
+ */
+ private String sfcjmc;
+
+ /**
+ * 是否烈属名称 必填:否
+ */
+ private String sflsmc;
+
+ /**
+ * 是否孤老名称 必填:否
+ */
+ private String sfglmc;
+
+ /**
+ * 学历名称 必填:否
+ */
+ private String xlmc;
+
+ /**
+ * 职务名称 必填:否
+ */
+ private String zwmc;
+
+ /**
+ * 开户银行 必填:否
+ */
+ private String khyh;
+
+ /**
+ * 银行账号 必填:否
+ */
+ private String yhzh;
+
+ /**
+ * 居住省份 必填:否 中文,例如浙江省
+ */
+ private String lxdz_sheng;
+
+ /**
+ * 居住城市 必填:否 中文,例如杭州市
+ */
+ private String lxdz_shi;
+
+ /**
+ * 居住区县 必填:否 中文,例如滨江区
+ */
+ private String lxdz_qx;
+
+ /**
+ * 居住街道 必填:否
+ */
+ private String lxdz_jd;
+
+ /**
+ * 居住详细地址 必填:否
+ */
+ private String lxdz;
+
+ /**
+ * 户籍省份 必填:否 中文,例如浙江省
+ */
+ private String hjszd_sheng;
+
+ /**
+ * 户籍城市 必填:否 中文,例如杭州市
+ */
+ private String hjszd_shi;
+
+ /**
+ * 户籍区县 必填:否 中文,例如滨江区
+ */
+ private String hjszd_qx;
+
+ /**
+ * 户籍街道 必填:否
+ */
+ private String hjszd_jd;
+
+ /**
+ * 户籍详细地址 必填:否
+ */
+ private String hjszd_xxdz;
+
+ /**
+ * 备注 必填:否
+ */
+ private String bz;
+
+ /**
+ * 出生地 必填:条件必填 外籍人员必填,填写出生地国家(地区见国籍字典
+ */
+ private String csd;
+
+ /**
+ * 涉税事由 必填:是 ("10","任职受雇")("20","提供临时劳务")("30","转让财产")("40","从事投资和经营活动")("90","其他"),
+ */
+ private String sssx;
+
+
+ /**
+ * 首次入境时间 必填:条件必填 证件类型为港澳居民来往内地通行证、港澳居民居住证、台湾居民来往大陆通行证、台湾居民居住证、外国护照、外国人永久居留身份证、外国人来华工作许可证A、外国人来华工作许可证B、外国人来华工作许可证C时,且任职受雇类型选择雇员时必填,格式YYYY-MM-DD
+ */
+ private String scrjsj;
+
+ /**
+ * 预计离境时间 必填:条件必填 证件类型为港澳居民来往内地通行证、港澳居民居住证、台湾居民来往大陆通行证、台湾居民居住证、外国护照、外国人永久居留身份证、外国人来华工作许可证A、外国人来华工作许可证B、外国人来华工作许可证C时,且任职受雇类型选择雇员时必填,格式YYYY-MM-DD
+ */
+ private String yjljsj;
+
+ /**
+ * 联系地省份 必填:否
+ */
+ private String wjrlxdz_sheng;
+
+ /**
+ * 联系地城市 必填:否
+ */
+ private String wjrlxdz_shi;
+
+ /**
+ * 联系地区县 必填:否
+ */
+ private String wjrlxdz_qx;
+
+ /**
+ * 联系地街道 必填:否
+ */
+ private String wjrlxdz_jd;
+
+ /**
+ * 联系地详细地址 必填:否
+ */
+ private String wjrlxdz_xxdz;
+
+ /**
+ * 中文名 必填:否 证件类型为外国护照、外国人永久居留身份证、外国人工作许可证(A类)、外国人工作许可证(B类)、外国人工作许可证(C类)时不可填写,其他证件类型可填写。如果有填写必须为中文
+ */
+ private String xmzw;
+
+ /**
+ * 涉税事项是否扣除减除费用 必填:否
+ */
+ private String sfzdw;
+
+ }
+}
diff --git a/src/com/engine/salary/web/EmployeeDeclareController.java b/src/com/engine/salary/web/EmployeeDeclareController.java
index 75535d32f..420863bbb 100644
--- a/src/com/engine/salary/web/EmployeeDeclareController.java
+++ b/src/com/engine/salary/web/EmployeeDeclareController.java
@@ -248,6 +248,21 @@ public class EmployeeDeclareController {
return new ResponseResult(user).run(getEmployeeDeclareWrapper(user)::getRate, index);
}
+ /**
+ * 企业人员列表查询
+ * @param request
+ * @param response
+ * @param param
+ * @return
+ */
+ @POST
+ @Path("/getCompanyEmployee")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String getCompanyEmployee(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody EmployeeDeclareParam param) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult(user).run(getEmployeeDeclareWrapper(user)::getCompanyEmployee, param);
+ }
+
// /**
// * 人员报送-导出全部人员
// *
diff --git a/src/com/engine/salary/wrapper/EmployeeDeclareWrapper.java b/src/com/engine/salary/wrapper/EmployeeDeclareWrapper.java
index e42aea3d6..5a5b907f7 100644
--- a/src/com/engine/salary/wrapper/EmployeeDeclareWrapper.java
+++ b/src/com/engine/salary/wrapper/EmployeeDeclareWrapper.java
@@ -5,6 +5,7 @@ import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.cache.SalaryCacheKey;
+import com.engine.salary.remote.tax.client.EmployeeClient;
import com.engine.salary.component.SalaryWeaTable;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.employeedeclare.bo.EmployeeDeclareList;
@@ -16,6 +17,7 @@ import com.engine.salary.enums.SalaryOnOffEnum;
import com.engine.salary.enums.employeedeclare.*;
import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
+import com.engine.salary.remote.tax.response.employee.GetCompanyEmployeeResponse;
import com.engine.salary.service.*;
import com.engine.salary.service.impl.*;
import com.engine.salary.util.SalaryDateUtil;
@@ -538,6 +540,17 @@ public class EmployeeDeclareWrapper extends Service {
return getSalaryCacheService(user).get(SalaryCacheKey.EMPLOYEE_DECLARE + index);
}
+ public Object getCompanyEmployee(EmployeeDeclareParam param) {
+ ValidUtil.doValidator(param);
+
+ EmployeeClient employeeClient = new EmployeeClient(param.getTaxAgentId());
+ GetCompanyEmployeeResponse companyEmployee = employeeClient.getCompanyEmployee(param);
+
+
+
+ return companyEmployee;
+ }
+
// /**
// * 人员报送-导出本月全部的人员
// *
diff --git a/test/ApiDes.java b/test/ApiDes.java
new file mode 100644
index 000000000..f2751fe24
--- /dev/null
+++ b/test/ApiDes.java
@@ -0,0 +1,20 @@
+import com.engine.salary.util.excel.ExcelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class ApiDes {
+ @ExcelProperty(index = 0)
+ public String name;
+ @ExcelProperty(index = 1)
+ public String mean;
+ @ExcelProperty(index = 2)
+ public String type;
+ @ExcelProperty(index = 3)
+ public String required;
+ @ExcelProperty(index = 4)
+ public String des;
+}
diff --git a/test/ParseTaxApi.java b/test/ParseTaxApi.java
new file mode 100644
index 000000000..957f424d3
--- /dev/null
+++ b/test/ParseTaxApi.java
@@ -0,0 +1,55 @@
+import com.engine.salary.util.excel.ExcelParseHelper;
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.List;
+
+public class ParseTaxApi {
+ public static void main(String[] args) {
+ readExcel("H:\\code\\salary\\resource\\sql\\ApiDes.xlsx");
+ }
+
+
+ public static void readExcel(String path) {
+ try {
+ // 获取文件输入流
+ InputStream inputStream = new FileInputStream(path);
+
+ List apiDesList = ExcelParseHelper.parse2Map(inputStream, ApiDes.class, 0, 1, 5, "ApiDes.xlsx");
+
+ /**
+ * 字段名称 字段含义 字段类型 必填 说明
+ * qtzzlx 其他证件类型 String(64) 条件必填 见证件类型字典
+ *
+ * private String qtzzlx;
+ */
+
+ apiDesList.forEach(des -> {
+ String type = des.getType();
+ if(StringUtils.isNotEmpty(type)){
+ if(type.startsWith("String")){
+ type= "String";
+ }
+ }
+
+ String a = "/** * "
+ + des.getMean()
+ +" "
+ + "必填:" + des.getRequired()
+ +" " + des.getDes()
+ + " */" + " private " + type + " " + des.getName() + ";";
+ System.out.println(a);
+
+ });
+
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+
+
+
+}
From 665dc7b36a723a1413bd0d3300acaf675c016999 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Wed, 11 Oct 2023 19:55:09 +0800
Subject: [PATCH 3/6] =?UTF-8?q?fix=E9=87=8D=E6=96=B0=E6=A0=B8=E7=AE=97bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../bo/TaxDeclareEmployeeBO.java | 2 +-
.../impl/SalaryAcctRecordServiceImpl.java | 22 +++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclareEmployeeBO.java b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclareEmployeeBO.java
index 2b587f652..709b797df 100644
--- a/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclareEmployeeBO.java
+++ b/src/com/engine/salary/entity/taxdeclaration/bo/TaxDeclareEmployeeBO.java
@@ -60,7 +60,7 @@ public class TaxDeclareEmployeeBO {
.setCardNum(employeeDeclare.getCardNum())
.setDeclareStatus(declareStatusEnum)
.setDeclareStatusDesc(declareStatusEnum == null ? "" : SalaryI18nUtil.getI18nLabel(declareStatusEnum.getLabelId(), declareStatusEnum.getDefaultLabel()));
- } else if (Objects.equals(taxDeclareEmployee.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) {
+ } else if (taxDeclareEmployee.getEmployeeType() == null || Objects.equals(taxDeclareEmployee.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue())) {
DataCollectionEmployee simpleEmployee = simpleEmployeeMap.get(taxDeclareEmployee.getEmployeeId());
DataCollectionEmployee simpleUserInfo = simpleUserInfoMap.get(taxDeclareEmployee.getEmployeeId());
abnormalEmployeeListDTO
diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java
index 94dd92579..63d03f562 100644
--- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java
@@ -792,6 +792,17 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
// salaryAcctRecordPO.setRootId(Objects.equals(salaryAcctRecordPO.getRootId(), 0L) ? salaryAcctRecordPO.getId() : salaryAcctRecordPO.getRootId());
}
+ // 保存回算前的薪资核算结果
+ if (!isReCalc) {
+ getSalaryAcctResultService(user).reCalc(salaryAcctRecordPO.getId());
+ }
+
+ // 撤回工资单
+ getSalarySendService(user).revokeSalaryBill(salaryAcctRecordPO);
+
+ //删除报表缓存
+ getSalaryStatisticsReportService(user).removeReportCache();
+
// 查询本次薪资核算记录关联的个税扣缴义务人
List salaryAcctTaxAgents = getSalaryAcctRecordService(user).listBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecordPO.getId()));
// 如果已经存在税款所属期为8月份的薪资核算记录,就不能再重新核算1-7月份的薪资核算记录了
@@ -811,17 +822,6 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
salaryAcctRecordPO.setStatus(SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue());
salaryAcctRecordPO.setUpdateTime(new Date());
getSalaryAcctRecordMapper().updateIgnoreNull(salaryAcctRecordPO);
-
- // 保存回算前的薪资核算结果
- if (!isReCalc) {
- getSalaryAcctResultService(user).reCalc(salaryAcctRecordPO.getId());
- }
-
- // 撤回工资单
- getSalarySendService(user).revokeSalaryBill(salaryAcctRecordPO);
-
- //删除报表缓存
- getSalaryStatisticsReportService(user).removeReportCache();
}
From 4a59859fa86595f8cb0d1dc89aabda2da9c806f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com>
Date: Thu, 12 Oct 2023 17:34:09 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E8=B0=83=E8=96=AA=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
resource/sql/删除档案.txt | 7 +---
.../SalaryArchiveAdjustRecordTypeEnum.java | 26 +++++++++++++
.../impl/SalaryArchiveItemServiceImpl.java | 1 +
.../engine/salary/web/SIReportController.java | 2 +-
.../wrapper/SalaryArchiveItemWrapper.java | 37 +++++++++++++++++++
5 files changed, 66 insertions(+), 7 deletions(-)
create mode 100644 src/com/engine/salary/enums/salaryarchive/SalaryArchiveAdjustRecordTypeEnum.java
diff --git a/resource/sql/删除档案.txt b/resource/sql/删除档案.txt
index 2c4fa7372..1668c51f4 100644
--- a/resource/sql/删除档案.txt
+++ b/resource/sql/删除档案.txt
@@ -1,6 +1,6 @@
-一、删除指定扣缴义务人下的档案
操作前做好数据备份
+一、删除指定扣缴义务人下的档案
删除扣缴义务人下的档案(注意删除后,再添加进扣缴义务人,不会自动生成档案)
1、查询hrsa_tax_agent表对应扣缴义务人id
@@ -19,8 +19,3 @@ update hrsa_salary_archive set delete_type=3 where tax_agent_id=扣缴义务人
二、删除停薪员工档案
update hrsa_salary_archive set delete_type=3 where run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND')
-
-
-
-
-.\wkhtmltopdf.exe http://127.0.0.1:8080/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=1694053661638&recipient=92&type=phone C:\baidu.pdf
\ No newline at end of file
diff --git a/src/com/engine/salary/enums/salaryarchive/SalaryArchiveAdjustRecordTypeEnum.java b/src/com/engine/salary/enums/salaryarchive/SalaryArchiveAdjustRecordTypeEnum.java
new file mode 100644
index 000000000..6fd513664
--- /dev/null
+++ b/src/com/engine/salary/enums/salaryarchive/SalaryArchiveAdjustRecordTypeEnum.java
@@ -0,0 +1,26 @@
+package com.engine.salary.enums.salaryarchive;
+
+/**
+ * 薪资档案调薪记录列表类型
+ * Copyright: Copyright (c) 2023
+ * Company: 泛微软件
+ *
+ * @author qiantao
+ * @version 1.0
+ **/
+public enum SalaryArchiveAdjustRecordTypeEnum {
+
+ MYADJUSTRECORD("myAdjustRecordList"),
+ ADJUSTRECORD("adjustRecordList"),
+ ADJUSTRECORDFORDELETE("adjustRecordForDeleteList");
+
+ private String pageUid;
+
+ SalaryArchiveAdjustRecordTypeEnum(String pageUid) {
+ this.pageUid = pageUid;
+ }
+
+ public String getPageUid() {
+ return pageUid;
+ }
+}
diff --git a/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java
index 080b330fe..270f26294 100644
--- a/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java
+++ b/src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java
@@ -632,6 +632,7 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
});
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List> rows = new ArrayList<>();
+ rows.add(headerList);
for (SalaryItemAdjustRecordListDTO dto : list) {
List