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

修改异常上报

parent 2e1fb50c
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DataUtils;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -56,7 +59,10 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -56,7 +59,10 @@ public class YcsbServiceImpl implements IYcsbService
@Override @Override
public int insertYcsb(Ycsb ycsb) 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()); ycsb.setCreateTime(DateUtils.getNowDate());
return ycsbMapper.insertYcsb(ycsb); return ycsbMapper.insertYcsb(ycsb);
} }
...@@ -70,6 +76,10 @@ public class YcsbServiceImpl implements IYcsbService ...@@ -70,6 +76,10 @@ public class YcsbServiceImpl implements IYcsbService
@Override @Override
public int updateYcsb(Ycsb ycsb) 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()); ycsb.setUpdateTime(DateUtils.getNowDate());
return ycsbMapper.updateYcsb(ycsb); return ycsbMapper.updateYcsb(ycsb);
} }
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
<sql id="selectHscjVo"> <sql id="selectHscjVo">
select id, select id,
xh, xh,
province,
city, city,
area, area,
street, street,
...@@ -74,7 +75,8 @@ ...@@ -74,7 +75,8 @@
</sql> </sql>
<select id="selectHscjList" parameterType="Hscj" resultMap="HscjResult"> <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.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 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 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