|
|
|
@ -1,97 +1,90 @@
|
|
|
|
|
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业务层处理
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @author ruoyi
|
|
|
|
|
* @date 2023-10-12
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
{
|
|
|
|
|
public class TcTbwcServiceImpl implements ITcTbwcService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private TcTbwcMapper tcTbwcMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询通报完成情况
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param id 通报完成情况主键
|
|
|
|
|
* @return 通报完成情况
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public TcTbwc selectTcTbwcById(Long id)
|
|
|
|
|
{
|
|
|
|
|
public TcTbwc selectTcTbwcById(Long id) {
|
|
|
|
|
return tcTbwcMapper.selectTcTbwcById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询通报完成情况列表
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param tcTbwc 通报完成情况
|
|
|
|
|
* @return 通报完成情况
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public List<TcTbwc> selectTcTbwcList(TcTbwc tcTbwc)
|
|
|
|
|
{
|
|
|
|
|
public List<TcTbwc> selectTcTbwcList(TcTbwc tcTbwc) {
|
|
|
|
|
return tcTbwcMapper.selectTcTbwcList(tcTbwc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增通报完成情况
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param tcTbwc 通报完成情况
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int insertTcTbwc(TcTbwc tcTbwc)
|
|
|
|
|
{
|
|
|
|
|
public int insertTcTbwc(TcTbwc tcTbwc) {
|
|
|
|
|
tcTbwc.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
return tcTbwcMapper.insertTcTbwc(tcTbwc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改通报完成情况
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param tcTbwc 通报完成情况
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int updateTcTbwc(TcTbwc tcTbwc)
|
|
|
|
|
{
|
|
|
|
|
public int updateTcTbwc(TcTbwc tcTbwc) {
|
|
|
|
|
tcTbwc.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
return tcTbwcMapper.updateTcTbwc(tcTbwc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量删除通报完成情况
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param ids 需要删除的通报完成情况主键
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteTcTbwcByIds(Long[] ids)
|
|
|
|
|
{
|
|
|
|
|
public int deleteTcTbwcByIds(Long[] ids) {
|
|
|
|
|
return tcTbwcMapper.deleteTcTbwcByIds(ids);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除通报完成情况信息
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param id 通报完成情况主键
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteTcTbwcById(Long id)
|
|
|
|
|
{
|
|
|
|
|
public int deleteTcTbwcById(Long id) {
|
|
|
|
|
return tcTbwcMapper.deleteTcTbwcById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -101,7 +94,19 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
StringBuilder successMsg = new StringBuilder();
|
|
|
|
|
if (!tcTbwcList.isEmpty()) {
|
|
|
|
|
for (TcTbwc tcTbwc : tcTbwcList) {
|
|
|
|
|
tcTbwcMapper.insertTcTbwc(tcTbwc);
|
|
|
|
|
//根据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("导入成功");
|
|
|
|
|
}
|
|
|
|
@ -109,7 +114,7 @@ public class TcTbwcServiceImpl implements ITcTbwcService
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|