|
@@ -1,12 +1,18 @@
|
|
|
package com.ruoyi.project.invoice.service.impl;
|
|
|
|
|
|
import java.util.List;
|
|
|
+
|
|
|
+import com.ruoyi.common.utils.StringUtils;
|
|
|
+import com.ruoyi.project.ehs.mapper.TJobticketMapper;
|
|
|
+import com.ruoyi.project.invoice.mapper.TInvoiceWorkcontentMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.project.invoice.mapper.TInvoiceTagMapper;
|
|
|
import com.ruoyi.project.invoice.domain.TInvoiceTag;
|
|
|
import com.ruoyi.project.invoice.service.ITInvoiceTagService;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
/**
|
|
|
* 工作票索引Service业务层处理
|
|
|
*
|
|
@@ -16,9 +22,12 @@ import com.ruoyi.project.invoice.service.ITInvoiceTagService;
|
|
|
@Service
|
|
|
public class TInvoiceTagServiceImpl implements ITInvoiceTagService
|
|
|
{
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private TInvoiceTagMapper tInvoiceTagMapper;
|
|
|
-
|
|
|
+ @Resource
|
|
|
+ private TInvoiceWorkcontentMapper tInvoiceWorkcontentMapper;
|
|
|
+ @Resource
|
|
|
+ private TJobticketMapper tJobticketMapper;
|
|
|
/**
|
|
|
* 查询工作票索引
|
|
|
*
|
|
@@ -64,6 +73,14 @@ public class TInvoiceTagServiceImpl implements ITInvoiceTagService
|
|
|
@Override
|
|
|
public int updateTInvoiceTag(TInvoiceTag tInvoiceTag)
|
|
|
{
|
|
|
+ TInvoiceTag oldTag = tInvoiceTagMapper.selectTInvoiceTagById(tInvoiceTag.getId());
|
|
|
+ if (oldTag.getTag().equals(tInvoiceTag.getTag()) || StringUtils.isEmpty(tInvoiceTag.getTag())) {
|
|
|
+ return tInvoiceTagMapper.updateTInvoiceTag(tInvoiceTag);
|
|
|
+ }else {
|
|
|
+ oldTag.setTagNew(tInvoiceTag.getTag());
|
|
|
+ tInvoiceWorkcontentMapper.updateTag(oldTag);
|
|
|
+ tJobticketMapper.updateTag(oldTag);
|
|
|
+ }
|
|
|
return tInvoiceTagMapper.updateTInvoiceTag(tInvoiceTag);
|
|
|
}
|
|
|
|