Commit 4854f366 authored by gaoyingwei's avatar gaoyingwei

修改

parent 8d6a6275
......@@ -117,7 +117,7 @@ public class HscjController extends BaseController
String[] resList = new String[]{"阳性","阴性"};
ExcelUtil.setClassExcelAttribute(clazz,"cjResult","combo",resList);
//设置文本格式表头在第几列
String columes = "7,8,10";
String columes = "7,8,11";
util.importTemplateExcelSetHead(response,"核酸采集导入空模板",columes);
}
......
......@@ -151,7 +151,7 @@ public class YxryController extends BaseController
"21","22","23","24","25","26","27","28","29","30","31","32"};
ExcelUtil.setClassExcelAttribute( clazz,"isYin","combo",isYin);
ExcelUtil.setClassExcelAttribute( clazz,"isHome","combo",isHome);
ExcelUtil.setClassExcelAttribute( clazz,"level","combo",level);
ExcelUtil.setClassExcelAttribute( clazz,"floor","combo",level);
//设置文本格式表头在第几列
String columes = "13";
util.importTemplateExcelSetHead(response, "阳性人员",columes);
......
......@@ -38,7 +38,9 @@ public class FkqkDTO extends BaseEntity
/** 楼号单元号门牌号 */
@Excel(name = "单元号")
private String unit;
/** 楼号单元号门牌号 */
@Excel(name = "楼层(填写1-32,如果有多个楼层,用英文,分割,例:1,2)")
private String level;
/** 封控明细 */
@Excel(name = "封控明细")
private String fkDetailed;
......@@ -260,4 +262,12 @@ public class FkqkDTO extends BaseEntity
.append("floor", getFloor())
.toString();
}
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
}
......@@ -57,6 +57,10 @@ public class Hscj extends BaseEntity
@Excel(name = "采集管号", cellType = Excel.ColumnType.STRING)
private String cjgh;
/** 采集管号 */
@Excel(name = "是否混管", readConverterExp = "0=单管,1=混管")
private String isHun;
/** 姓名 */
@Excel(name = "姓名")
private String userName;
......@@ -450,4 +454,12 @@ public class Hscj extends BaseEntity
public void setRemark(String remark) {
this.remark = remark;
}
public String getIsHun() {
return isHun;
}
public void setIsHun(String isHun) {
this.isHun = isHun;
}
}
......@@ -63,7 +63,7 @@ public class Yxry extends BaseEntity
private String unit;
/** 楼层 */
@Excel(name = "楼层")
@Excel(name = "楼层",combo = "")
private String floor;
/** 楼号单元号门牌号 */
......
......@@ -64,7 +64,7 @@ public interface HscjMapper
List<Hscj> checkCardBatch(List<Hscj> hscjList);
void insertBatch(List<Hscj> insertList);
int insertBatch(@Param("list")List<Hscj> list);
void updateBatch(List<Hscj> updateList);
int updateBatch(List<Hscj> updateList);
}
......@@ -71,9 +71,9 @@ public class HscjServiceImpl implements IHscjService {
hscj.setCheckCard("正确");
else
throw new ServiceException("身份证格式不正确");
List<Hscj> list = hscjMapper.checkCard(hscj);
if (!list.isEmpty())
throw new ServiceException("该身份证号当天不能重复提交");
// List<Hscj> list = hscjMapper.checkCard(hscj);
// if (!list.isEmpty())
// throw new ServiceException("该身份证号当天不能重复提交");
hscj.setCreateBy(createBy);
hscj.setCreateTime(DateUtils.getNowDate());
return hscjMapper.insertHscj(hscj);
......@@ -90,9 +90,9 @@ public class HscjServiceImpl implements IHscjService {
String createBy = DataUtils.getValue(hscj.getArea(), hscj.getStreet(), hscj.getCommittee());
if (createBy.equals("null"))
throw new ServiceException("所选居住地、街道、社区不存在");
List<Hscj> list = hscjMapper.checkCard(hscj);
if (!list.isEmpty())
throw new ServiceException("该身份证号当天不能重复提交");
// List<Hscj> list = hscjMapper.checkCard(hscj);
// if (!list.isEmpty())
// throw new ServiceException("该身份证号当天不能重复提交");
hscj.setCreateBy(createBy);
hscj.setUpdateTime(DateUtils.getNowDate());
return hscjMapper.updateHscj(hscj);
......@@ -304,30 +304,33 @@ public class HscjServiceImpl implements IHscjService {
for (int i = 0; i < count; i++) {
hscjList = trueList.subList(i*100,(i+1)*100-1);
//1、从集合中获取到所有查询所需的条件,进行批量数据查询
List<Hscj> hscjs = hscjMapper.checkCardBatch(hscjList);
//2、循环数据进行判断是否是新增还是更新
List<Hscj> updateList = new ArrayList<>();
List<Hscj> insertList = new ArrayList<>();
if (!hscjs.isEmpty()) {
for (Hscj hscj : hscjs) {
updateList.addAll(hscjList.stream().filter(l -> hscj.getCardNo().equals(l.getCardNo())).collect(Collectors.toList()));
insertList.addAll(hscjList.stream().filter(l -> !(hscj.getCardNo().equals(l.getCardNo()))).collect(Collectors.toList()));
}
} else {
insertList.addAll(hscjList);
}
// List<Hscj> hscjs = hscjMapper.checkCardBatch(hscjList);
// //2、循环数据进行判断是否是新增还是更新
// List<Hscj> updateList = new ArrayList<>();
// List<Hscj> insertList = new ArrayList<>();
// if (!hscjs.isEmpty()) {
// for (Hscj hscj : hscjs) {
// updateList.addAll(hscjList.stream().filter(l -> hscj.getCardNo().equals(l.getCardNo())).collect(Collectors.toList()));
// insertList.addAll(hscjList.stream().filter(l -> !(hscj.getCardNo().equals(l.getCardNo()))).collect(Collectors.toList()));
// }
// } else {
// insertList.addAll(hscjList);
// }
//3、将数据分别写入到更新数据集合和插入数据集合中
//4、判断新增集合和插入集合是否有数据,如果有数据则执行SQL语句
if (!insertList.isEmpty()) {
hscjMapper.insertBatch(insertList);
}
if (!updateList.isEmpty()) {
hscjMapper.updateBatch(updateList);
if (!hscjList.isEmpty()) {
hscjMapper.insertBatch(hscjList);
}
// if (!updateList.isEmpty()) {
// hscjMapper.updateBatch(updateList);
// }
}
//判断是否还有剩余?如果有甚于数据,则,则将剩余数据取出,按照上面循环体中的代码逻辑执行即可
if (listSize % 100 != 0) {
hscjList = trueList.subList(count*100,listSize-1);
if (!hscjList.isEmpty()) {
hscjMapper.insertBatch(hscjList);
}
}
// List<Hscj> hscjs = hscjMapper.checkCard(hscj);
// if (!hscjs.isEmpty()) {
......
......@@ -38,6 +38,7 @@
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="isHun" column="is_hun"/>
</resultMap>
<sql id="selectHscjVo">
......@@ -72,13 +73,13 @@
update_time,
remark,
committee,
cj_result
cj_result,is_hun
from hscj
</sql>
<select id="selectHscjList" parameterType="Hscj" resultMap="HscjResult">
select a.id, a.province, a.city, a.area, a.street, a.community, a.cj_place, a.cjgh, a.user_name, a.card_no,
a.phone,a.committee,a.cj_result,a.check_card,
a.phone,a.committee,a.cj_result,a.check_card,a.is_hun,
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
......@@ -167,6 +168,7 @@
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="isHun != null">is_hun,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="committee != null">#{committee},</if>
......@@ -201,9 +203,23 @@
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="isHun != null">#{isHun},</if>
</trim>
</insert>
<insert id="insertBatch"></insert>
<insert id="insertBatch" parameterType="com.ruoyi.system.domain.Hscj">
insert into hscj
(committee,province,city,area,street,community,cj_place,cjgh,user_name,card_no,check_card,phone,sex,address,
age,category,cj_time,cj_name,cj_phone,b_type,laboratory,jc_time,cj_result,rygx,boxhao,create_by,create_time,remark,
is_hun) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.committee},#{item.province},#{item.city},#{item.area},#{item.street},#{item.community},#{item.cjPlace},
#{item.cjgh},#{item.userName},#{item.cardNo},#{item.checkCard},#{item.phone},#{item.sex},#{item.address},
#{item.age},#{item.category},#{item.cjTime},#{item.cjName},#{item.cjPhone},#{item.bblx},#{item.laboratory},
#{item.jcTime},#{item.cjResult},#{item.rygx},#{item.boxhao},#{item.createBy},#{item.createTime},#{item.remark},
#{item.isHun})
</foreach>
</insert>
<update id="updateHscj" parameterType="Hscj">
update hscj
......@@ -239,6 +255,7 @@
<if test="cjResult != null">cj_result=#{cjResult},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isHun != null">is_hun = #{isHun},</if>
</trim>
where id = #{id}
</update>
......
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