|
@@ -7,21 +7,17 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.jeecg.common.api.vo.Result;
|
|
|
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;
|
|
|
import org.jeecg.modules.itdmgongdanshuju.entity.ItdmGongdanShuju;
|
|
|
-import org.jeecg.modules.itdmgongdanshuju.mapper.ItdmGongdanDetail1Mapper;
|
|
|
import org.jeecg.modules.itdmgongdanshuju.mapper.ItdmGongdanImageMapper;
|
|
|
import org.jeecg.modules.itdmgongdanshuju.mapper.ItdmGongdanShujuMapper;
|
|
|
import org.jeecg.modules.itdmgongdanshuju.service.ItdmGongdanShujuService;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -30,7 +26,6 @@ import java.text.SimpleDateFormat;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @Description: 委托信息
|
|
@@ -57,7 +52,11 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
|
|
|
public Boolean generate(ItdmGongdanDto itdmGongdanDto) {
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
List<ItdmGongdanShuju> detail = itdmGongdanShujuMapper.selectList(new QueryWrapper<ItdmGongdanShuju>()
|
|
|
- .eq("wo_id", itdmGongdanDto.getWoId()).eq("shiyan_date_time", itdmGongdanDto.getRiqi()));
|
|
|
+ .eq("wo_id", itdmGongdanDto.getWoId()).eq("shiyan_date_time", itdmGongdanDto.getRiqi())
|
|
|
+ .between("shiyan_time", itdmGongdanDto.getShiyanKaishitime(), itdmGongdanDto.getShiyanJieshutime())
|
|
|
+
|
|
|
+ );
|
|
|
+
|
|
|
|
|
|
if (detail.size() > 0) {
|
|
|
throw new JeecgBootException("当前工单当前已经有数据,不能重复生成数据(请检查时间是否重合)");
|
|
@@ -126,12 +125,13 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
|
|
|
@Override
|
|
|
public void upload(ItdmGongdanUploadDto upload) {
|
|
|
|
|
|
- ItdmGongdanImage itdmGong = gongdanImageMapper.selectOne(Wrappers.lambdaQuery(ItdmGongdanImage.class).eq(ItdmGongdanImage::getWoId, upload.getWoId()));
|
|
|
+ ItdmGongdanImage itdmGong = gongdanImageMapper
|
|
|
+ .selectOne(Wrappers.lambdaQuery(ItdmGongdanImage.class).eq(ItdmGongdanImage::getWeituoId, upload.getWeituoId()));
|
|
|
|
|
|
|
|
|
if (itdmGong == null) {
|
|
|
ItdmGongdanImage itdmGong1 = new ItdmGongdanImage();
|
|
|
- itdmGong1.setWoId(upload.getWoId());
|
|
|
+ itdmGong1.setWeituoId(upload.getWeituoId());
|
|
|
itdmGong1.setExtraPic(upload.getImages());
|
|
|
gongdanImageMapper.insert(itdmGong1);
|
|
|
} else {
|
|
@@ -173,13 +173,14 @@ public class ItdmGongdanShujuServiceImpl extends ServiceImpl<ItdmGongdanShujuMap
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public String getUpdate(String woId) {
|
|
|
+ public String getUpdate(String weituoId) {
|
|
|
ItdmGongdanImage itdmGong = gongdanImageMapper.selectOne(Wrappers.lambdaQuery(ItdmGongdanImage.class)
|
|
|
- .eq(ItdmGongdanImage::getWoId, woId).last("limit 1"));
|
|
|
+ .eq(ItdmGongdanImage::getWeituoId, weituoId).last("limit 1"));
|
|
|
|
|
|
if (itdmGong == null) {
|
|
|
- return null;
|
|
|
+ return "";
|
|
|
}
|
|
|
+
|
|
|
return itdmGong.getExtraPic();
|
|
|
}
|
|
|
|