Commit 87e0a8c2 authored by 王琮's avatar 王琮

修改异常上报

parent 2e1fb50c
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DataUtils;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -12,19 +15,19 @@ import com.ruoyi.system.service.IYcsbService;
/**
* 抗原异常上报Service业务层处理
*
*
* @author ruoyi
* @date 2022-11-28
*/
@Service
public class YcsbServiceImpl implements IYcsbService
public class YcsbServiceImpl implements IYcsbService
{
@Autowired
private YcsbMapper ycsbMapper;
/**
* 查询抗原异常上报
*
*
* @param id 抗原异常上报主键
* @return 抗原异常上报
*/
......@@ -36,7 +39,7 @@ public class YcsbServiceImpl implements IYcsbService
/**
* 查询抗原异常上报列表
*
*
* @param ycsb 抗原异常上报
* @return 抗原异常上报
*/
......@@ -49,34 +52,41 @@ public class YcsbServiceImpl implements IYcsbService
/**
* 新增抗原异常上报
*
*
* @param ycsb 抗原异常上报
* @return 结果
*/
@Override
public int insertYcsb(Ycsb ycsb)
{
ycsb.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
String createBy = DataUtils.getValue(ycsb.getArea(), ycsb.getStreet(), ycsb.getCommunity());
if(createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在");
ycsb.setCreateBy(createBy);
ycsb.setCreateTime(DateUtils.getNowDate());
return ycsbMapper.insertYcsb(ycsb);
}
/**
* 修改抗原异常上报
*
*
* @param ycsb 抗原异常上报
* @return 结果
*/
@Override
public int updateYcsb(Ycsb ycsb)
{
String createBy = DataUtils.getValue(ycsb.getArea(), ycsb.getStreet(), ycsb.getCommunity());
if(createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在");
ycsb.setCreateBy(createBy);
ycsb.setUpdateTime(DateUtils.getNowDate());
return ycsbMapper.updateYcsb(ycsb);
}
/**
* 批量删除抗原异常上报
*
*
* @param ids 需要删除的抗原异常上报主键
* @return 结果
*/
......@@ -88,7 +98,7 @@ public class YcsbServiceImpl implements IYcsbService
/**
* 删除抗原异常上报信息
*
*
* @param id 抗原异常上报主键
* @return 结果
*/
......
......@@ -42,6 +42,7 @@
<sql id="selectHscjVo">
select id,
xh,
province,
city,
area,
street,
......@@ -74,7 +75,8 @@
</sql>
<select id="selectHscjList" parameterType="Hscj" resultMap="HscjResult">
select a.id, a.xh, a.city, a.area, a.street, a.community, a.cj_place, a.cjgh, a.user_name, a.card_no, a.phone,
select a.id, a.province,a.xh, a.city, a.area, a.street, a.community, a.cj_place, a.cjgh, a.user_name, a.card_no,
a.phone,
a.sex, a.address, a.age, a.category, a.cj_time, a.cj_name, a.cj_phone, a.b_type, a.laboratory, a.jc_time,
a.rygx, a.boxhao, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from
hscj a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment