Commit 406e64fb authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents f4cc9ca3 b8fcb563
......@@ -193,6 +193,15 @@ public class TaxDocumentServiceImpl {
@Transactional
public synchronized boolean addTaxDocumentList(MultipartFile file, TaxDocument taxDocument) {
try {
TaxDocumentExample taxDocumentExample = new TaxDocumentExample();
taxDocumentExample.createCriteria().andFileNameEqualTo(taxDocument.getFileName());
List<TaxDocument> list = taxDocumentMapper.selectByExample(taxDocumentExample);
if (list.size() > 0) {
return false;
}
//上传文件
if (StringUtils.isBlank(taxDocument.getFileUploadId())) {
......@@ -311,6 +320,15 @@ public class TaxDocumentServiceImpl {
public boolean editFilesType(TaxDocument taxDocument) {
try {
TaxDocumentExample taxDocumentExample = new TaxDocumentExample();
taxDocumentExample.createCriteria().andFileNameEqualTo(taxDocument.getFileName());
List<TaxDocument> list = taxDocumentMapper.selectByExample(taxDocumentExample);
if (list.size() > 0) {
return false;
}
taxDocument.setUpdateTime(new Date());
int num = taxDocumentMapper.updateByPrimaryKey(taxDocument);
if (num > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment