|
@@ -23,6 +23,7 @@ import java.io.IOException;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
@@ -130,11 +131,8 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
|
}
|
|
|
s = uploadImage.getVideoCom(img);
|
|
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
|
|
|
|
- if (StringUtils.isBlank(date)) {
|
|
|
- date = sdf.format(new Date());
|
|
|
- }
|
|
|
BillSampling sampling = billSamplingMapper.selectById(id);
|
|
|
sampling.setImgUrl(s);
|
|
|
sampling.setImgStatus(1);
|
|
@@ -161,7 +159,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
|
sampling.setPassUserId(TokenSign.getMemberIdByJwtToken(httpServletRequest));
|
|
|
sampling.setTestLocation(baseLocation.getLocationName());
|
|
|
sampling.setTestLocationId(baseLocation.getId());
|
|
|
- sampling.setCheckDate(LocalDateTime.parse(date));
|
|
|
+ sampling.setCheckDate(LocalDateTime.parse(date, dateTimeFormatter));
|
|
|
sampling.setPassDate(LocalDateTime.now());
|
|
|
|
|
|
|
|
@@ -200,7 +198,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
|
BillCleanBefore before = new BillCleanBefore();
|
|
|
billCleanBeforeMapper.insert(before);
|
|
|
}
|
|
|
- baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
|
|
|
+ baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + LocalDateTime.now().format(dateTimeFormatter));
|
|
|
baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getLocationName());
|
|
|
baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getId());
|
|
|
String status = baseProcess.getCurrentStatus();
|
|
@@ -210,6 +208,6 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentLocationId() + "," + nextId);
|
|
|
processMapper.updateById(baseProcess);
|
|
|
billSamplingMapper.updateById(sampling);
|
|
|
- return new Result(10000, "修改成功!", true);
|
|
|
+ return new Result(10000, "修改成功!", true);
|
|
|
}
|
|
|
}
|