md
This commit is contained in:
parent
35c44d45e6
commit
9d7f340c7f
@ -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;
|
||||||
@ -91,7 +92,12 @@ public class EmisNotCalcAgingController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody EmisNotCalcAging emisNotCalcAging)
|
public AjaxResult add(@RequestBody EmisNotCalcAging emisNotCalcAging)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
return toAjax(emisNotCalcAgingService.insertEmisNotCalcAging(emisNotCalcAging));
|
return toAjax(emisNotCalcAgingService.insertEmisNotCalcAging(emisNotCalcAging));
|
||||||
|
} catch (DuplicateKeyException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("数据重复!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -102,7 +108,12 @@ public class EmisNotCalcAgingController extends BaseController
|
|||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody EmisNotCalcAging emisNotCalcAging)
|
public AjaxResult edit(@RequestBody EmisNotCalcAging emisNotCalcAging)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
return toAjax(emisNotCalcAgingService.updateEmisNotCalcAging(emisNotCalcAging));
|
return toAjax(emisNotCalcAgingService.updateEmisNotCalcAging(emisNotCalcAging));
|
||||||
|
} catch (DuplicateKeyException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("数据重复!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user