|
|
|
@ -1,13 +1,13 @@
|
|
|
|
|
package com.ruoyi.tcZz.service.impl;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
|
|
import com.ruoyi.tcZz.domain.TcWljg;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.ruoyi.tcZz.mapper.TcCyMapper;
|
|
|
|
|
import com.ruoyi.tcZz.domain.TcCy;
|
|
|
|
|
import com.ruoyi.tcZz.mapper.TcCyMapper;
|
|
|
|
|
import com.ruoyi.tcZz.service.ITcCyService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 词云Service业务层处理
|
|
|
|
@ -16,8 +16,7 @@ import com.ruoyi.tcZz.service.ITcCyService;
|
|
|
|
|
* @date 2023-10-13
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
public class TcCyServiceImpl implements ITcCyService
|
|
|
|
|
{
|
|
|
|
|
public class TcCyServiceImpl implements ITcCyService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private TcCyMapper tcCyMapper;
|
|
|
|
|
|
|
|
|
@ -28,8 +27,7 @@ public class TcCyServiceImpl implements ITcCyService
|
|
|
|
|
* @return 词云
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public TcCy selectTcCyById(Long id)
|
|
|
|
|
{
|
|
|
|
|
public TcCy selectTcCyById(Long id) {
|
|
|
|
|
return tcCyMapper.selectTcCyById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -40,8 +38,7 @@ public class TcCyServiceImpl implements ITcCyService
|
|
|
|
|
* @return 词云
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<TcCy> selectTcCyList(TcCy tcCy)
|
|
|
|
|
{
|
|
|
|
|
public List<TcCy> selectTcCyList(TcCy tcCy) {
|
|
|
|
|
return tcCyMapper.selectTcCyList(tcCy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -52,8 +49,7 @@ public class TcCyServiceImpl implements ITcCyService
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int insertTcCy(TcCy tcCy)
|
|
|
|
|
{
|
|
|
|
|
public int insertTcCy(TcCy tcCy) {
|
|
|
|
|
tcCy.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
return tcCyMapper.insertTcCy(tcCy);
|
|
|
|
|
}
|
|
|
|
@ -65,8 +61,7 @@ public class TcCyServiceImpl implements ITcCyService
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int updateTcCy(TcCy tcCy)
|
|
|
|
|
{
|
|
|
|
|
public int updateTcCy(TcCy tcCy) {
|
|
|
|
|
tcCy.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
return tcCyMapper.updateTcCy(tcCy);
|
|
|
|
|
}
|
|
|
|
@ -78,8 +73,7 @@ public class TcCyServiceImpl implements ITcCyService
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteTcCyByIds(Long[] ids)
|
|
|
|
|
{
|
|
|
|
|
public int deleteTcCyByIds(Long[] ids) {
|
|
|
|
|
return tcCyMapper.deleteTcCyByIds(ids);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -90,8 +84,7 @@ public class TcCyServiceImpl implements ITcCyService
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteTcCyById(Long id)
|
|
|
|
|
{
|
|
|
|
|
public int deleteTcCyById(Long id) {
|
|
|
|
|
return tcCyMapper.deleteTcCyById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -100,13 +93,26 @@ public class TcCyServiceImpl implements ITcCyService
|
|
|
|
|
StringBuilder successMsg = new StringBuilder();
|
|
|
|
|
if (!tcCyList.isEmpty()) {
|
|
|
|
|
for (TcCy tcCy : tcCyList) {
|
|
|
|
|
//根据area_id + cy_name判断如果已存在,则调修改
|
|
|
|
|
TcCy newtcCy = new TcCy();
|
|
|
|
|
newtcCy.setAreaId(tcCy.getAreaId());
|
|
|
|
|
newtcCy.setCyName(tcCy.getCyName());
|
|
|
|
|
List<TcCy> list = tcCyMapper.selectTcCyList(newtcCy);
|
|
|
|
|
if (!list.isEmpty()) {
|
|
|
|
|
for (TcCy a : list) {
|
|
|
|
|
tcCy.setId(a.getId());
|
|
|
|
|
tcCyMapper.updateTcCy(tcCy);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
tcCyMapper.insertTcCy(tcCy);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
successMsg.append("导入成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return successMsg.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void updateByisStatus(Integer isStatus, List<String> ids) {
|
|
|
|
|
tcCyMapper.updateByisStatus(isStatus, ids);
|
|
|
|
|