|
|
@ -7,6 +7,7 @@ import com.ruoyi.tcZz.service.ITcCyService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -88,28 +89,22 @@ public class TcCyServiceImpl implements ITcCyService {
|
|
|
|
return tcCyMapper.deleteTcCyById(id);
|
|
|
|
return tcCyMapper.deleteTcCyById(id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 导入词云数据
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param tcCyList
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String importUser(List<TcCy> tcCyList) {
|
|
|
|
public String importUser(List<TcCy> tcCyList) {
|
|
|
|
|
|
|
|
tcCyMapper.deleteAllData();
|
|
|
|
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判断如果已存在,则调修改
|
|
|
|
this.insertTcCy(tcCy);
|
|
|
|
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("导入成功");
|
|
|
|
successMsg.append("导入成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return successMsg.toString();
|
|
|
|
return successMsg.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|