md
This commit is contained in:
parent
2de12b6f9f
commit
2f0990962c
@ -13,7 +13,10 @@ package com.xdadan.erp.web.emis;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.dao.DuplicateKeyException;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@ -107,7 +110,19 @@ public class EmisBaseInvoiceInfoController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody EmisBaseInvoiceInfo emisBaseInvoiceInfo)
|
public AjaxResult add(@RequestBody EmisBaseInvoiceInfo emisBaseInvoiceInfo)
|
||||||
{
|
{
|
||||||
return toAjax(emisBaseInvoiceInfoService.insertEmisBaseInvoiceInfo(emisBaseInvoiceInfo));
|
|
||||||
|
try {
|
||||||
|
return toAjax(emisBaseInvoiceInfoService.insertEmisBaseInvoiceInfo(emisBaseInvoiceInfo));
|
||||||
|
}
|
||||||
|
catch (DuplicateKeyException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("税号重复");
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex){
|
||||||
|
ex.printStackTrace();
|
||||||
|
return AjaxResult.error("系统异常");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -14,6 +14,7 @@ package com.xdadan.erp.web.emis;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.dao.DuplicateKeyException;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@ -107,7 +108,19 @@ public class EmisCustomerInvoiceInfoController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody EmisCustomerInvoiceInfo emisCustomerInvoiceInfo)
|
public AjaxResult add(@RequestBody EmisCustomerInvoiceInfo emisCustomerInvoiceInfo)
|
||||||
{
|
{
|
||||||
return toAjax(emisCustomerInvoiceInfoService.insertEmisCustomerInvoiceInfo(emisCustomerInvoiceInfo));
|
|
||||||
|
try {
|
||||||
|
return toAjax(emisCustomerInvoiceInfoService.insertEmisCustomerInvoiceInfo(emisCustomerInvoiceInfo));
|
||||||
|
}
|
||||||
|
catch (DuplicateKeyException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("税号重复");
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex){
|
||||||
|
ex.printStackTrace();
|
||||||
|
return AjaxResult.error("系统异常");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user