demand: 新增批量导入企业税号接口
committer: heyu
This commit is contained in:
parent
10123ad06a
commit
f5991f7076
@ -243,22 +243,6 @@ public class EmisCustomerUserController extends EmisBaseController
|
|||||||
@PostMapping("/addMonthUser")
|
@PostMapping("/addMonthUser")
|
||||||
public AjaxResult addMonthUser(@RequestBody EmisCustomerUser emisCustomerUser) {
|
public AjaxResult addMonthUser(@RequestBody EmisCustomerUser emisCustomerUser) {
|
||||||
try {
|
try {
|
||||||
if ("2".equals(emisCustomerUser.getBlImport())) {
|
|
||||||
// 批量导入企业名称和企业税号
|
|
||||||
try {
|
|
||||||
checkEnterpriseDetail(emisCustomerUser);
|
|
||||||
if (StringUtil.isBlank(emisCustomerUser.getMonthlyPayCode())) {
|
|
||||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "月结卡号不能为空");
|
|
||||||
}
|
|
||||||
EmisCustomerUser editUser = new EmisCustomerUser();
|
|
||||||
editUser.setMonthlyPayCode(emisCustomerUser.getMonthlyPayCode());
|
|
||||||
editUser.setEnterpriseName(emisCustomerUser.getEnterpriseName());
|
|
||||||
editUser.setEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId());
|
|
||||||
return toAjax(emisCustomerUserService.updateEnterpriseInfoByMonthlyPayCode(editUser));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return AjaxResult.error(e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 验证企业名称和企业税号
|
// 验证企业名称和企业税号
|
||||||
try {
|
try {
|
||||||
checkEnterprise(emisCustomerUser);
|
checkEnterprise(emisCustomerUser);
|
||||||
@ -294,6 +278,29 @@ public class EmisCustomerUserController extends EmisBaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量导入企业税号
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('emis:emisCustomerUser:batchImportEnterprise')")
|
||||||
|
@Log(title = "新增月结用户", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/batchImportEnterprise")
|
||||||
|
public AjaxResult batchImportEnterprise(@RequestBody EmisCustomerUser emisCustomerUser) {
|
||||||
|
// 批量导入企业名称和企业税号
|
||||||
|
try {
|
||||||
|
checkEnterpriseDetail(emisCustomerUser);
|
||||||
|
if (StringUtil.isBlank(emisCustomerUser.getMonthlyPayCode())) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "月结卡号不能为空");
|
||||||
|
}
|
||||||
|
EmisCustomerUser editUser = new EmisCustomerUser();
|
||||||
|
editUser.setMonthlyPayCode(emisCustomerUser.getMonthlyPayCode());
|
||||||
|
editUser.setEnterpriseName(emisCustomerUser.getEnterpriseName());
|
||||||
|
editUser.setEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId());
|
||||||
|
return toAjax(emisCustomerUserService.updateEnterpriseInfoByMonthlyPayCode(editUser));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void checkEnterprise(EmisCustomerUser emisCustomerUser) throws EmisBizError {
|
private void checkEnterprise(EmisCustomerUser emisCustomerUser) throws EmisBizError {
|
||||||
if (!"0086".equals(emisCustomerUser.getCountry())) {
|
if (!"0086".equals(emisCustomerUser.getCountry())) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -494,7 +494,6 @@
|
|||||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||||
<if test="unionId != null and unionId != ''">union_id = #{unionId},</if>
|
<if test="unionId != null and unionId != ''">union_id = #{unionId},</if>
|
||||||
<if test="openid != null and openid != ''">openid = #{openid},</if>
|
<if test="openid != null and openid != ''">openid = #{openid},</if>
|
||||||
<if test="monthlyPayCode != null and monthlyPayCode != ''">monthly_pay_code = #{monthlyPayCode},</if>
|
|
||||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||||
<if test="password != null and password != ''">password = #{password},</if>
|
<if test="password != null and password != ''">password = #{password},</if>
|
||||||
<if test="ownerSite != null and ownerSite != ''">owner_site = #{ownerSite},</if>
|
<if test="ownerSite != null and ownerSite != ''">owner_site = #{ownerSite},</if>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user