|
|
|
@ -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.TcAqg;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.ruoyi.tcZz.mapper.TcTbwcMapper;
|
|
|
|
|
import com.ruoyi.tcZz.domain.TcTbwc;
|
|
|
|
|
import com.ruoyi.tcZz.mapper.TcTbwcMapper;
|
|
|
|
|
import com.ruoyi.tcZz.service.ITcTbwcService;
|
|
|
|
|
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.ITcTbwcService;
|
|
|
|
|
* @date 2023-10-12
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
{
|
|
|
|
|
public class TcTbwcServiceImpl implements ITcTbwcService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private TcTbwcMapper tcTbwcMapper;
|
|
|
|
|
|
|
|
|
@ -28,8 +27,7 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
* @return 通报完成情况
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public TcTbwc selectTcTbwcById(Long id)
|
|
|
|
|
{
|
|
|
|
|
public TcTbwc selectTcTbwcById(Long id) {
|
|
|
|
|
return tcTbwcMapper.selectTcTbwcById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -40,8 +38,7 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
* @return 通报完成情况
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<TcTbwc> selectTcTbwcList(TcTbwc tcTbwc)
|
|
|
|
|
{
|
|
|
|
|
public List<TcTbwc> selectTcTbwcList(TcTbwc tcTbwc) {
|
|
|
|
|
return tcTbwcMapper.selectTcTbwcList(tcTbwc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -52,8 +49,7 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int insertTcTbwc(TcTbwc tcTbwc)
|
|
|
|
|
{
|
|
|
|
|
public int insertTcTbwc(TcTbwc tcTbwc) {
|
|
|
|
|
tcTbwc.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
return tcTbwcMapper.insertTcTbwc(tcTbwc);
|
|
|
|
|
}
|
|
|
|
@ -65,8 +61,7 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int updateTcTbwc(TcTbwc tcTbwc)
|
|
|
|
|
{
|
|
|
|
|
public int updateTcTbwc(TcTbwc tcTbwc) {
|
|
|
|
|
tcTbwc.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
return tcTbwcMapper.updateTcTbwc(tcTbwc);
|
|
|
|
|
}
|
|
|
|
@ -78,8 +73,7 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteTcTbwcByIds(Long[] ids)
|
|
|
|
|
{
|
|
|
|
|
public int deleteTcTbwcByIds(Long[] ids) {
|
|
|
|
|
return tcTbwcMapper.deleteTcTbwcByIds(ids);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -90,8 +84,7 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteTcTbwcById(Long id)
|
|
|
|
|
{
|
|
|
|
|
public int deleteTcTbwcById(Long id) {
|
|
|
|
|
return tcTbwcMapper.deleteTcTbwcById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -101,15 +94,27 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
StringBuilder successMsg = new StringBuilder();
|
|
|
|
|
if (!tcTbwcList.isEmpty()) {
|
|
|
|
|
for (TcTbwc tcTbwc : tcTbwcList) {
|
|
|
|
|
//根据year + Time_name判断如果已存在,则调修改
|
|
|
|
|
TcTbwc newtcTbwc = new TcTbwc();
|
|
|
|
|
newtcTbwc.setYear(tcTbwc.getYear());
|
|
|
|
|
newtcTbwc.setTimeName(tcTbwc.getTimeName());
|
|
|
|
|
List<TcTbwc> list = tcTbwcMapper.selectTcTbwcList(newtcTbwc);
|
|
|
|
|
if (!list.isEmpty()) {
|
|
|
|
|
for (TcTbwc a : list) {
|
|
|
|
|
tcTbwc.setId(a.getId());
|
|
|
|
|
tcTbwcMapper.updateTcTbwc(tcTbwc);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
tcTbwcMapper.insertTcTbwc(tcTbwc);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
successMsg.append("导入成功");
|
|
|
|
|
}
|
|
|
|
|
return successMsg.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void updateByisStatus(Integer isStatus,List<String> ids) {
|
|
|
|
|
tcTbwcMapper.updateByisStatus(isStatus,ids);
|
|
|
|
|
public void updateByisStatus(Integer isStatus, List<String> ids) {
|
|
|
|
|
tcTbwcMapper.updateByisStatus(isStatus, ids);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|