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