From c188e4980adbe855c237c0c9f8bd2910298323d7 Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: 星期一, 01 八月 2022 14:30:54 +0800
Subject: [PATCH] 事故快报伤亡
---
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentExpressCasualtyReqDTO.java | 75 +++++++
incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentExpressCasualtyInfoMapper.xml | 58 +++++
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentExpressController.java | 26 ++
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressCasualtyInfo.java | 132 +++++++++++++
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressCasualtyInfoDO.java | 82 ++++++++
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/AccidentExpressService.java | 7
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentExpressCasualtyInfoRepository.java | 21 ++
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentExpressCasualtyInfoServiceImpl.java | 36 +++
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java | 35 +++
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentExpressCasualtyInfoService.java | 17 +
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentExpressCasualtyRespDTO.java | 75 +++++++
11 files changed, 563 insertions(+), 1 deletions(-)
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentExpressController.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentExpressController.java
index 07d52b8..1bf27d7 100644
--- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentExpressController.java
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentExpressController.java
@@ -4,6 +4,7 @@
import com.gkhy.safePlatform.commons.query.PageQuery;
import com.gkhy.safePlatform.commons.utils.PageUtils;
import com.gkhy.safePlatform.commons.vo.ResultVO;
+import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentExpressCasualtyReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentExpressReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentExpressDetailRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentExpressPageRespDTO;
@@ -65,4 +66,29 @@
return accidentExpressService.batchDeleteAccidentExpress(ids);
}
+ /**
+ * 事故快报伤亡人员一览
+ */
+ @RequestMapping(value = "/casualty/list/{accidentExpressId}",method = RequestMethod.GET)
+ public ResultVO selectAccidentExpressCasualtyList(@PathVariable("accidentExpressId")Long accidentExpressId){
+ return accidentExpressService.selectAccidentExpressCasualtyList(accidentExpressId);
+ }
+
+ /**
+ * 事故快报伤亡人员新增
+ */
+ @RequestMapping(value = "/casualty/add",method = RequestMethod.POST)
+ public ResultVO addAccidentExpressCasualty(Authentication authentication, @RequestBody AccidentExpressCasualtyReqDTO accidentExpressCasualtyReqDTO) {
+ ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
+ return accidentExpressService.addAccidentExpressCasualty(currentUser.getUid(), accidentExpressCasualtyReqDTO);
+ }
+
+ /**
+ * 事故快报伤亡人员删除
+ */
+ @RequestMapping(value = "/casualty/del/{accidentExpressId}",method = RequestMethod.GET)
+ public ResultVO delAccidentExpressCasualty(@PathVariable("accidentExpressId")Long accidentExpressId){
+ return accidentExpressService.delAccidentExpressCasualty(accidentExpressId);
+ }
+
}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressCasualtyInfo.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressCasualtyInfo.java
new file mode 100644
index 0000000..0406c63
--- /dev/null
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressCasualtyInfo.java
@@ -0,0 +1,132 @@
+package com.gkhy.safePlatform.incidentManage.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+@TableName("accident_express_casualty")
+public class AccidentExpressCasualtyInfo {
+
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ private Boolean delFlag;
+
+ private Date gmtCreate;
+
+ private Date gmtModitify;
+
+ private Long createUid;
+
+ private Long updateUid;
+
+ private Long accidentExpressId;
+
+ private String name;
+
+ private Boolean gender;
+
+ private String card;
+
+ private String injuryDesc;
+
+ private String damageDesc;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Boolean getDelFlag() {
+ return delFlag;
+ }
+
+ public void setDelFlag(Boolean delFlag) {
+ this.delFlag = delFlag;
+ }
+
+ public Date getGmtCreate() {
+ return gmtCreate;
+ }
+
+ public void setGmtCreate(Date gmtCreate) {
+ this.gmtCreate = gmtCreate;
+ }
+
+ public Date getGmtModitify() {
+ return gmtModitify;
+ }
+
+ public void setGmtModitify(Date gmtModitify) {
+ this.gmtModitify = gmtModitify;
+ }
+
+ public Long getCreateUid() {
+ return createUid;
+ }
+
+ public void setCreateUid(Long createUid) {
+ this.createUid = createUid;
+ }
+
+ public Long getUpdateUid() {
+ return updateUid;
+ }
+
+ public void setUpdateUid(Long updateUid) {
+ this.updateUid = updateUid;
+ }
+
+ public Long getAccidentExpressId() {
+ return accidentExpressId;
+ }
+
+ public void setAccidentExpressId(Long accidentExpressId) {
+ this.accidentExpressId = accidentExpressId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Boolean getGender() {
+ return gender;
+ }
+
+ public void setGender(Boolean gender) {
+ this.gender = gender;
+ }
+
+ public String getCard() {
+ return card;
+ }
+
+ public void setCard(String card) {
+ this.card = card;
+ }
+
+ public String getInjuryDesc() {
+ return injuryDesc;
+ }
+
+ public void setInjuryDesc(String injuryDesc) {
+ this.injuryDesc = injuryDesc;
+ }
+
+ public String getDamageDesc() {
+ return damageDesc;
+ }
+
+ public void setDamageDesc(String damageDesc) {
+ this.damageDesc = damageDesc;
+ }
+}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressCasualtyInfoDO.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressCasualtyInfoDO.java
new file mode 100644
index 0000000..9a2d3cf
--- /dev/null
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressCasualtyInfoDO.java
@@ -0,0 +1,82 @@
+package com.gkhy.safePlatform.incidentManage.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.util.Date;
+
+@TableName("accident_express_casualty")
+public class AccidentExpressCasualtyInfoDO {
+
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ private Long accidentExpressId;
+
+ private String name;
+
+ private Boolean gender;
+
+ private String card;
+
+ private String injuryDesc;
+
+ private String damageDesc;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getAccidentExpressId() {
+ return accidentExpressId;
+ }
+
+ public void setAccidentExpressId(Long accidentExpressId) {
+ this.accidentExpressId = accidentExpressId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Boolean getGender() {
+ return gender;
+ }
+
+ public void setGender(Boolean gender) {
+ this.gender = gender;
+ }
+
+ public String getCard() {
+ return card;
+ }
+
+ public void setCard(String card) {
+ this.card = card;
+ }
+
+ public String getInjuryDesc() {
+ return injuryDesc;
+ }
+
+ public void setInjuryDesc(String injuryDesc) {
+ this.injuryDesc = injuryDesc;
+ }
+
+ public String getDamageDesc() {
+ return damageDesc;
+ }
+
+ public void setDamageDesc(String damageDesc) {
+ this.damageDesc = damageDesc;
+ }
+}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentExpressCasualtyReqDTO.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentExpressCasualtyReqDTO.java
new file mode 100644
index 0000000..41efca5
--- /dev/null
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentExpressCasualtyReqDTO.java
@@ -0,0 +1,75 @@
+package com.gkhy.safePlatform.incidentManage.model.dto.req;
+
+
+public class AccidentExpressCasualtyReqDTO {
+
+ private Long id;
+
+ private Long accidentExpressId;
+
+ private String name;
+
+ private Boolean gender;
+
+ private String card;
+
+ private String injuryDesc;
+
+ private String damageDesc;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getAccidentExpressId() {
+ return accidentExpressId;
+ }
+
+ public void setAccidentExpressId(Long accidentExpressId) {
+ this.accidentExpressId = accidentExpressId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Boolean getGender() {
+ return gender;
+ }
+
+ public void setGender(Boolean gender) {
+ this.gender = gender;
+ }
+
+ public String getCard() {
+ return card;
+ }
+
+ public void setCard(String card) {
+ this.card = card;
+ }
+
+ public String getInjuryDesc() {
+ return injuryDesc;
+ }
+
+ public void setInjuryDesc(String injuryDesc) {
+ this.injuryDesc = injuryDesc;
+ }
+
+ public String getDamageDesc() {
+ return damageDesc;
+ }
+
+ public void setDamageDesc(String damageDesc) {
+ this.damageDesc = damageDesc;
+ }
+}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentExpressCasualtyRespDTO.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentExpressCasualtyRespDTO.java
new file mode 100644
index 0000000..ae0cbd8
--- /dev/null
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentExpressCasualtyRespDTO.java
@@ -0,0 +1,75 @@
+package com.gkhy.safePlatform.incidentManage.model.dto.resp;
+
+
+public class AccidentExpressCasualtyRespDTO {
+
+ private Long id;
+
+ private Long accidentExpressId;
+
+ private String name;
+
+ private Boolean gender;
+
+ private String card;
+
+ private String injuryDesc;
+
+ private String damageDesc;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getAccidentExpressId() {
+ return accidentExpressId;
+ }
+
+ public void setAccidentExpressId(Long accidentExpressId) {
+ this.accidentExpressId = accidentExpressId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Boolean getGender() {
+ return gender;
+ }
+
+ public void setGender(Boolean gender) {
+ this.gender = gender;
+ }
+
+ public String getCard() {
+ return card;
+ }
+
+ public void setCard(String card) {
+ this.card = card;
+ }
+
+ public String getInjuryDesc() {
+ return injuryDesc;
+ }
+
+ public void setInjuryDesc(String injuryDesc) {
+ this.injuryDesc = injuryDesc;
+ }
+
+ public String getDamageDesc() {
+ return damageDesc;
+ }
+
+ public void setDamageDesc(String damageDesc) {
+ this.damageDesc = damageDesc;
+ }
+}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentExpressCasualtyInfoRepository.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentExpressCasualtyInfoRepository.java
new file mode 100644
index 0000000..fe874bb
--- /dev/null
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentExpressCasualtyInfoRepository.java
@@ -0,0 +1,21 @@
+package com.gkhy.safePlatform.incidentManage.repository;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gkhy.safePlatform.incidentManage.entity.AccidentExpressCasualtyInfo;
+import com.gkhy.safePlatform.incidentManage.entity.AccidentExpressCasualtyInfoDO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+
+@Repository
+public interface AccidentExpressCasualtyInfoRepository extends BaseMapper<AccidentExpressCasualtyInfo> {
+
+ List<AccidentExpressCasualtyInfoDO> selectByAccidentExpressId(@Param("accidentExpressId") Long accidentExpressId);
+
+ void addAccidentExpressCasualty(AccidentExpressCasualtyInfo accidentExpressCasualtyInfo);
+
+ void deleteAccidentExpressCasualtyById(@Param("id") Long id);
+
+}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/AccidentExpressService.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/AccidentExpressService.java
index 1786e4d..b29d26b 100644
--- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/AccidentExpressService.java
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/AccidentExpressService.java
@@ -3,6 +3,7 @@
import com.gkhy.safePlatform.commons.query.PageQuery;
import com.gkhy.safePlatform.commons.vo.ResultVO;
import com.gkhy.safePlatform.commons.vo.SearchResultVO;
+import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentExpressCasualtyReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentExpressReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentExpressDetailRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentExpressPageRespDTO;
@@ -21,4 +22,10 @@
ResultVO updateAccidentExpress(Long uid, AccidentExpressReqDTO AccidentExpressReqDTO);
ResultVO batchDeleteAccidentExpress(String ids);
+
+ ResultVO selectAccidentExpressCasualtyList(Long accidentExpressId);
+
+ ResultVO addAccidentExpressCasualty(Long uid, AccidentExpressCasualtyReqDTO accidentExpressCasualtyReqDTO);
+
+ ResultVO delAccidentExpressCasualty(Long accidentExpressId);
}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentExpressCasualtyInfoService.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentExpressCasualtyInfoService.java
new file mode 100644
index 0000000..db71dbf
--- /dev/null
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentExpressCasualtyInfoService.java
@@ -0,0 +1,17 @@
+package com.gkhy.safePlatform.incidentManage.service.baseService;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gkhy.safePlatform.incidentManage.entity.AccidentExpressCasualtyInfo;
+import com.gkhy.safePlatform.incidentManage.entity.AccidentExpressCasualtyInfoDO;
+
+import java.util.List;
+
+
+public interface AccidentExpressCasualtyInfoService extends IService<AccidentExpressCasualtyInfo> {
+
+ List<AccidentExpressCasualtyInfoDO> selectByAccidentExpressId(Long id);
+
+ void addAccidentExpressCasualty(AccidentExpressCasualtyInfo AccidentExpressCasualtyInfo);
+
+ void deleteAccidentExpressCasualtyById(Long id);
+}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentExpressCasualtyInfoServiceImpl.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentExpressCasualtyInfoServiceImpl.java
new file mode 100644
index 0000000..88612fa
--- /dev/null
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentExpressCasualtyInfoServiceImpl.java
@@ -0,0 +1,36 @@
+package com.gkhy.safePlatform.incidentManage.service.baseService.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gkhy.safePlatform.incidentManage.entity.AccidentExpressCasualtyInfo;
+import com.gkhy.safePlatform.incidentManage.entity.AccidentExpressCasualtyInfoDO;
+import com.gkhy.safePlatform.incidentManage.repository.AccidentExpressCasualtyInfoRepository;
+import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressCasualtyInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service("accidentExpressCasualtyInfoService")
+public class AccidentExpressCasualtyInfoServiceImpl extends ServiceImpl<AccidentExpressCasualtyInfoRepository, AccidentExpressCasualtyInfo> implements AccidentExpressCasualtyInfoService {
+
+ @Autowired
+ private AccidentExpressCasualtyInfoRepository accidentExpressCasualtyInfoRepository;
+
+
+ @Override
+ public List<AccidentExpressCasualtyInfoDO> selectByAccidentExpressId(Long id) {
+ return accidentExpressCasualtyInfoRepository.selectByAccidentExpressId(id);
+ }
+
+ @Override
+ public void addAccidentExpressCasualty(AccidentExpressCasualtyInfo AccidentExpressCasualtyInfo) {
+ accidentExpressCasualtyInfoRepository.addAccidentExpressCasualty(AccidentExpressCasualtyInfo);
+ }
+
+ @Override
+ public void deleteAccidentExpressCasualtyById(Long id) {
+ accidentExpressCasualtyInfoRepository.deleteAccidentExpressCasualtyById(id);
+ }
+
+
+}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java
index 6ae47a0..f5e88bb 100644
--- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java
@@ -10,14 +10,17 @@
import com.gkhy.safePlatform.incidentManage.entity.*;
import com.gkhy.safePlatform.incidentManage.enums.AccidentResultCodes;
import com.gkhy.safePlatform.incidentManage.exception.AccidentException;
+import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentExpressCasualtyReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentExpressFileReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentExpressReqDTO;
+import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentExpressCasualtyRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentExpressDetailRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentExpressFileRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentExpressPageRespDTO;
import com.gkhy.safePlatform.incidentManage.query.AccidentExpressQuery;
import com.gkhy.safePlatform.incidentManage.query.db.AccidentExpressDBQuery;
import com.gkhy.safePlatform.incidentManage.service.AccidentExpressService;
+import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressCasualtyInfoService;
import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressFileInfoService;
import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressInfoService;
import org.springframework.beans.BeanUtils;
@@ -39,6 +42,9 @@
@Autowired
private AccidentExpressFileInfoService accidentExpressFileInfoService;
+ @Autowired
+ private AccidentExpressCasualtyInfoService accidentExpressCasualtyInfoService;
+
@Override
public SearchResultVO<List<AccidentExpressPageRespDTO>> selectAccidentExpressList(PageQuery<AccidentExpressQuery> query) {
@@ -55,7 +61,7 @@
List<AccidentExpressPageRespDTO> respList = BeanCopyUtils.copyBeanList(accidentExpressInfoPageDOList, AccidentExpressPageRespDTO.class);
respList.forEach(AccidentExpressPageRespDTO ->{
-
+ // 设置人员名称
});
return new SearchResultVO<>(
@@ -206,6 +212,33 @@
}
}
+ @Override
+ public ResultVO selectAccidentExpressCasualtyList(Long accidentExpressId) {
+ List<AccidentExpressCasualtyInfoDO> accidentExpressCasualtyInfoDOList = accidentExpressCasualtyInfoService.selectByAccidentExpressId(accidentExpressId);
+ List<AccidentExpressCasualtyRespDTO> respList =BeanCopyUtils.copyBeanList(accidentExpressCasualtyInfoDOList, AccidentExpressCasualtyRespDTO.class);
+ return new ResultVO<>(ResultCodes.OK,respList);
+ }
+
+ @Override
+ public ResultVO addAccidentExpressCasualty(Long uid, AccidentExpressCasualtyReqDTO accidentExpressCasualtyReqDTO) {
+ if (accidentExpressCasualtyReqDTO.getAccidentExpressId()==null){
+ throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NULL);
+ }else{
+ AccidentExpressCasualtyInfo accidentExpressCasualtyInfo = new AccidentExpressCasualtyInfo();
+ BeanUtils.copyProperties(accidentExpressCasualtyReqDTO,accidentExpressCasualtyInfo);
+ accidentExpressCasualtyInfo.setDelFlag(false);
+ accidentExpressCasualtyInfo.setGmtCreate(new Date());
+ accidentExpressCasualtyInfo.setCreateUid(uid);
+ accidentExpressCasualtyInfoService.addAccidentExpressCasualty(accidentExpressCasualtyInfo);
+ return new ResultVO(ResultCodes.OK);
+ }
+ }
+
+ @Override
+ public ResultVO delAccidentExpressCasualty(Long accidentExpressId) {
+ accidentExpressCasualtyInfoService.deleteAccidentExpressCasualtyById(accidentExpressId);
+ return new ResultVO(ResultCodes.OK);
+ }
diff --git a/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentExpressCasualtyInfoMapper.xml b/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentExpressCasualtyInfoMapper.xml
new file mode 100644
index 0000000..176bab4
--- /dev/null
+++ b/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentExpressCasualtyInfoMapper.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gkhy.safePlatform.incidentManage.repository.AccidentExpressCasualtyInfoRepository">
+
+ <insert id="addAccidentExpressCasualty">
+ insert into accident_express_casualty
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null ">id,</if>
+ <if test="delFlag != null ">del_flag,</if>
+ <if test="gmtCreate != null ">gmt_create,</if>
+ <if test="gmtModitify != null ">gmt_moditify,</if>
+ <if test="createUid != null ">create_uid,</if>
+ <if test="updateUid != null ">update_uid,</if>
+ <if test="accidentExpressId != null ">accident_express_id,</if>
+ <if test="name != null and name != ''">`name`,</if>
+ <if test="gender != null ">gender,</if>
+ <if test="card != null and card != ''">card,</if>
+ <if test="injuryDesc != null and injuryDesc != ''">injury_desc,</if>
+ <if test="damageDesc != null and damageDesc != ''">damage_desc,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null ">#{id},</if>
+ <if test="delFlag != null ">#{delFlag},</if>
+ <if test="gmtCreate != null ">#{gmtCreate},</if>
+ <if test="gmtModitify != null ">#{gmtModitify},</if>
+ <if test="createUid != null ">#{createUid},</if>
+ <if test="updateUid != null ">#{updateUid},</if>
+ <if test="accidentExpressId != null ">#{accidentExpressId},</if>
+ <if test="name != null and name != ''">#{name},</if>
+ <if test="gender != null ">#{gender},</if>
+ <if test="card != null and card != ''">#{card},</if>
+ <if test="injuryDesc != null and injuryDesc != ''">#{injuryDesc},</if>
+ <if test="damageDesc != null and damageDesc != ''">#{damageDesc},</if>
+ </trim>
+ </insert>
+
+ <resultMap type="com.gkhy.safePlatform.incidentManage.entity.AccidentExpressCasualtyInfoDO" id="AccidentExpressCasualtyInfoDOResult">
+ <id column="id" property="id" jdbcType="BIGINT"/>
+ <result column="accident_express_id" property="accidentExpressId" />
+ <result column="name" property="name" />
+ <result column="gender" property="gender" />
+ <result column="card" property="card" />
+ <result column="injury_desc" property="injuryDesc" />
+ <result column="damage_desc" property="damageDesc" />
+ </resultMap>
+
+ <select id="selectByAccidentExpressId" resultMap="AccidentExpressCasualtyInfoDOResult">
+ select id,accident_express_id,`name`,`gender`,`card`,injury_desc,damage_desc from accident_express_casualty where del_flag = 0 and accident_express_id = #{accidentExpressId}
+ </select>
+
+
+ <update id="deleteAccidentExpressCasualtyById">
+ update accident_express_casualty set del_flag = 1 where id = #{id}
+ </update>
+
+</mapper>
--
Gitblit v1.9.2