|
@@ -12,6 +12,7 @@ import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.modules.itdmDataHistory.entity.ItdmWenxiang;
|
|
|
import org.jeecg.modules.itdmDataHistory.mapper.ItdmWenxiangMapper;
|
|
|
import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanDto;
|
|
|
+import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanEditListDto;
|
|
|
import org.jeecg.modules.itdmgongdanshuju.dto.ItdmGongdanUploadDto;
|
|
|
import org.jeecg.modules.itdmgongdanshuju.entity.ItdmGongdanDetail;
|
|
|
import org.jeecg.modules.itdmgongdanshuju.entity.ItdmGongdanImage;
|
|
@@ -119,7 +120,7 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- throw new JeecgBootException(e.getMessage(),e);
|
|
|
+ throw new JeecgBootException(e.getMessage(), e);
|
|
|
|
|
|
}
|
|
|
return true;
|
|
@@ -137,7 +138,7 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
|
|
|
itdmGong1.setWoId(upload.getWoId());
|
|
|
itdmGong1.setExtraPic(upload.getImages());
|
|
|
gongdanImageMapper.insert(itdmGong1);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
itdmGong.setExtraPic(upload.getImages());
|
|
|
gongdanImageMapper.updateById(itdmGong);
|
|
|
}
|
|
@@ -147,27 +148,30 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public void editList(List<ItdmGongdanShuju> itdmGongdanShuju) {
|
|
|
+ public void editList(ItdmGongdanEditListDto itdmGongdanShuju) {
|
|
|
|
|
|
+ itdmGongdanShujuMapper.delete(Wrappers.lambdaQuery(ItdmGongdanShuju.class)
|
|
|
+ .eq(ItdmGongdanShuju::getWoId, itdmGongdanShuju.getWoId()));
|
|
|
|
|
|
+ for (ItdmGongdanShuju i : itdmGongdanShuju.getList()) {
|
|
|
|
|
|
- for (ItdmGongdanShuju i : itdmGongdanShuju) {
|
|
|
- if (StringUtils.isBlank(i.getId())) {
|
|
|
- itdmGongdanShujuMapper.insert(i);
|
|
|
- }else{
|
|
|
- ItdmGongdanShuju selection = itdmGongdanShujuMapper.selectById(i.getId());
|
|
|
- if (selection != null) {
|
|
|
- selection.setShiyanWendu(i.getShiyanWendu());
|
|
|
- selection.setShiyanShidu(i.getShiyanShidu());
|
|
|
- itdmGongdanShujuMapper.updateById(selection);
|
|
|
- }else{
|
|
|
- itdmGongdanShujuMapper.deleteById(i.getId());
|
|
|
- }
|
|
|
+ if (StringUtils.isBlank(i.getWoId())) {
|
|
|
+
|
|
|
+ i.setWoId(itdmGongdanShuju.getWoId());
|
|
|
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
+ if (StringUtils.isBlank(i.getShiyanDateTime())) {
|
|
|
+
|
|
|
+ i.setShiyanDateTime(itdmGongdanShuju.getShiyanDateTime());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ itdmGongdanShujuMapper.insert(i);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|