适配港澳台通行证
This commit is contained in:
parent
b3c2047a3d
commit
199fe67374
|
|
@ -105,7 +105,18 @@ public class EmployeeDeclareRefresh {
|
|||
String idNum = hrmEmployeeComInfo.getIdNo() != null ? hrmEmployeeComInfo.getIdNo().toUpperCase() : "";
|
||||
CardTypeEnum cardType = CardTypeEnum.RESIDENT_IDENTITY_CARDS;
|
||||
if (!SalaryCardUtil.checkIdNum(idNum)) {
|
||||
//默认外国护照
|
||||
cardType = CardTypeEnum.FOREIGN_PASSPORT;
|
||||
|
||||
//港澳通行证
|
||||
if (SalaryCardUtil.checkHMPassportIdNum(idNum)) {
|
||||
cardType = CardTypeEnum.HM_PASSPORT;
|
||||
}
|
||||
|
||||
//台湾通行证
|
||||
if (SalaryCardUtil.checkTPassportIdNum(idNum)) {
|
||||
cardType = CardTypeEnum.T_PASSPORT;
|
||||
}
|
||||
}
|
||||
EmployeeDeclarePO employeeDeclare = initEmployeeDeclare(dto.getTaxAgentId(), dto.getTaxCycle(), employeeId);
|
||||
employeeDeclare.setEmployeeId(hrmEmployeeComInfo.getEmployeeId());
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ public class SalaryCalcTaxRequest {
|
|||
// 姓名
|
||||
requestParam.put("xm", employeeDeclare.getEmployeeName());
|
||||
// 证件类型
|
||||
requestParam.put("zzlx", CardTypeEnum.RESIDENT_IDENTITY_CARDS.getDefaultLabel());
|
||||
requestParam.put("zzlx", CardTypeEnum.getByValue(employeeDeclare.getCardType()).getDefaultLabel());
|
||||
// 证件号码
|
||||
requestParam.put("zzhm", employeeDeclare.getCardNum());
|
||||
// 所得项目
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ public enum CardTypeEnum implements BaseEnum<Integer> {
|
|||
|
||||
RESIDENT_IDENTITY_CARDS(0, "居民身份证", 105564),
|
||||
FOREIGN_PASSPORT(1, "外国护照", 105564),
|
||||
HM_PASSPORT(2, "港澳居民来往内地通行证", 105564);
|
||||
HM_PASSPORT(2, "港澳居民来往内地通行证", 105564),
|
||||
T_PASSPORT(3, "台湾居民来往大陆通行证", 105564);
|
||||
|
||||
CardTypeEnum(int value, String defaultLabel, int labelId) {
|
||||
this.value = value;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,6 @@ public class SalaryCardUtil {
|
|||
return validate18Idcard(idcard);
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -471,4 +470,42 @@ public class SalaryCardUtil {
|
|||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证港澳通行证
|
||||
*
|
||||
* @param idcard
|
||||
* 身份证
|
||||
* @return 合法返回true,否则返回false
|
||||
*/
|
||||
public static boolean checkHMPassportIdNum(String idcard) {
|
||||
|
||||
if (idcard == null || "".equals(idcard)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (idcard.length() == 9) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证台湾通行证
|
||||
* @param idcard
|
||||
* @return
|
||||
*/
|
||||
public static boolean checkTPassportIdNum(String idcard) {
|
||||
|
||||
if (idcard == null || "".equals(idcard)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (idcard.length() == 8) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,9 +98,8 @@ public class EmployeeDeclareWrapper extends Service {
|
|||
taxAgents = taxAgents.stream().filter(e -> StringUtils.contains(e.getName(), queryParam.getTaxAgentName())).collect(Collectors.toList());
|
||||
}
|
||||
// 分页
|
||||
List<TaxAgentPO> taxAgentPOS = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), taxAgents);
|
||||
List<TaxAgentDeclareListDTO> dtoList = Lists.newArrayList();
|
||||
for (TaxAgentPO taxAgent : taxAgentPOS) {
|
||||
for (TaxAgentPO taxAgent : taxAgents) {
|
||||
TaxAgentDeclareListDTO dto = new TaxAgentDeclareListDTO().setId(taxAgent.getId()).setTaxAgentName(taxAgent.getName());
|
||||
dtoList.add(dto);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue