|
@@ -74,7 +74,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
}
|
|
}
|
|
Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date").eq("vistit_type",type);
|
|
|
|
|
|
+ queryWrapper.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest)).orderByDesc("sub_date").eq("vistit_type", type);
|
|
if ("0".equals(data)) {
|
|
if ("0".equals(data)) {
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
}
|
|
}
|
|
@@ -99,9 +99,9 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
String id = paramsMap.get("id");
|
|
String id = paramsMap.get("id");
|
|
BillSampling billSampling = billSamplingMapper.selectById(id);
|
|
BillSampling billSampling = billSamplingMapper.selectById(id);
|
|
BillSamplingVo billSamplingVo = new BillSamplingVo();
|
|
BillSamplingVo billSamplingVo = new BillSamplingVo();
|
|
- BeanUtil.copyProperties(billSampling,billSamplingVo);
|
|
|
|
|
|
+ BeanUtil.copyProperties(billSampling, billSamplingVo);
|
|
BillPcr billPcr = pcrMapper.selectOne(new QueryWrapper<BillPcr>().lambda().eq(BillPcr::getSamplingId, id));
|
|
BillPcr billPcr = pcrMapper.selectOne(new QueryWrapper<BillPcr>().lambda().eq(BillPcr::getSamplingId, id));
|
|
- if (ObjectUtil.isNotEmpty(billPcr)){
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(billPcr)) {
|
|
billSamplingVo.setPcrType(billPcr.getPcrType());
|
|
billSamplingVo.setPcrType(billPcr.getPcrType());
|
|
billSamplingVo.setStatus(billPcr.getBillStatus());
|
|
billSamplingVo.setStatus(billPcr.getBillStatus());
|
|
}
|
|
}
|
|
@@ -115,61 +115,79 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
String pageSize = paramsMap.get("pageSize");
|
|
String pageSize = paramsMap.get("pageSize");
|
|
String vistitType = paramsMap.get("vistitType");
|
|
String vistitType = paramsMap.get("vistitType");
|
|
Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
|
|
Integer userId = TokenSign.getMemberIdByJwtToken(httpServletRequest);
|
|
- Page<BillSampling> page = new Page<>(Integer.parseInt(pageNo),Integer.parseInt(pageSize));
|
|
|
|
|
|
+ Page<BillSampling> page = new Page<>(Integer.parseInt(pageNo), Integer.parseInt(pageSize));
|
|
LambdaQueryWrapper<BillSampling> queryWrapper = new QueryWrapper<BillSampling>().lambda()
|
|
LambdaQueryWrapper<BillSampling> queryWrapper = new QueryWrapper<BillSampling>().lambda()
|
|
- .eq(BillSampling::getFarmId,farmId)
|
|
|
|
|
|
+ .eq(BillSampling::getFarmId, farmId)
|
|
.eq(BillSampling::getAdmissionUserId, userId)
|
|
.eq(BillSampling::getAdmissionUserId, userId)
|
|
.eq(ObjectUtil.isNotEmpty(vistitType), BillSampling::getVistitType, vistitType)
|
|
.eq(ObjectUtil.isNotEmpty(vistitType), BillSampling::getVistitType, vistitType)
|
|
.orderByDesc(BillSampling::getSubDate);
|
|
.orderByDesc(BillSampling::getSubDate);
|
|
- Page<BillSampling> billSamplingPage = billSamplingMapper.selectPage(page,queryWrapper);
|
|
|
|
|
|
+ Page<BillSampling> billSamplingPage = billSamplingMapper.selectPage(page, queryWrapper);
|
|
Integer count = billSamplingMapper.selectCount(queryWrapper);
|
|
Integer count = billSamplingMapper.selectCount(queryWrapper);
|
|
- return new Result(ResultCode.SUCCESS,billSamplingPage,count);
|
|
|
|
|
|
+ return new Result(ResultCode.SUCCESS, billSamplingPage, count);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
- public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date, MultipartFile video, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException {
|
|
|
|
|
|
+ public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date,
|
|
|
|
+ String video1, String video2, String video3, String video4, String video5, String video6
|
|
|
|
+ , String video7, String video8, MultipartFile picture1, MultipartFile picture2, MultipartFile picture3) throws ParseException, IOException {
|
|
String s = "";
|
|
String s = "";
|
|
- System.out.println(video);
|
|
|
|
- s = uploadImage.getVideoCom(video);
|
|
|
|
- if (s.equals("上传失败")) {
|
|
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
- return new Result(10001, "视频上传失败", false);
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video1)) {
|
|
|
|
+ s = video1;
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video2)) {
|
|
|
|
+ s = s + "," + video2;
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video3)) {
|
|
|
|
+ s = s + "," + video3;
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video4)) {
|
|
|
|
+ s = s + "," + video4;
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video5)) {
|
|
|
|
+ s = s + "," + video5;
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video6)) {
|
|
|
|
+ s = s + "," + video6;
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video7)) {
|
|
|
|
+ s = s + "," + video7;
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video8)) {
|
|
|
|
+ s = s + "," + video8;
|
|
}
|
|
}
|
|
|
|
|
|
String picUrl = null;
|
|
String picUrl = null;
|
|
|
|
|
|
- if (ObjectUtil.isNotEmpty(picture1)){
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(picture1)) {
|
|
String pic1 = uploadImage.getImageCom(picture1);
|
|
String pic1 = uploadImage.getImageCom(picture1);
|
|
- if (pic1.equals("上传失败")){
|
|
|
|
|
|
+ if (pic1.equals("上传失败")) {
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
return new Result(10001, "物品照片1上传失败", false);
|
|
return new Result(10001, "物品照片1上传失败", false);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
picUrl = pic1;
|
|
picUrl = pic1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (ObjectUtil.isNotEmpty(picture2)){
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(picture2)) {
|
|
String pic2 = uploadImage.getImageCom(picture2);
|
|
String pic2 = uploadImage.getImageCom(picture2);
|
|
- if (pic2.equals("上传失败")){
|
|
|
|
|
|
+ if (pic2.equals("上传失败")) {
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
return new Result(10001, "物品照片2上传失败", false);
|
|
return new Result(10001, "物品照片2上传失败", false);
|
|
- }else {
|
|
|
|
- picUrl = picUrl + ","+pic2;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ picUrl = picUrl + "," + pic2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (ObjectUtil.isNotEmpty(picture3)){
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(picture3)) {
|
|
String pic3 = uploadImage.getImageCom(picture3);
|
|
String pic3 = uploadImage.getImageCom(picture3);
|
|
- if (pic3.equals("上传失败")){
|
|
|
|
|
|
+ if (pic3.equals("上传失败")) {
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
return new Result(10001, "物品照片3上传失败", false);
|
|
return new Result(10001, "物品照片3上传失败", false);
|
|
- }else {
|
|
|
|
- picUrl = picUrl + ","+pic3;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ picUrl = picUrl + "," + pic3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
|
|
|
|
BillSampling sampling = billSamplingMapper.selectById(id);
|
|
BillSampling sampling = billSamplingMapper.selectById(id);
|
|
@@ -178,11 +196,11 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
}
|
|
}
|
|
sampling.setImgUrl(s);
|
|
sampling.setImgUrl(s);
|
|
sampling.setImgStatus(1);
|
|
sampling.setImgStatus(1);
|
|
- if (sampling.getVistitType() == 0){
|
|
|
|
- if (ObjectUtil.isNotEmpty(picUrl)){
|
|
|
|
|
|
+ if (sampling.getVistitType() == 0) {
|
|
|
|
+ if (ObjectUtil.isNotEmpty(picUrl)) {
|
|
sampling.setIsCarry(1);
|
|
sampling.setIsCarry(1);
|
|
sampling.setPicUrl(picUrl);
|
|
sampling.setPicUrl(picUrl);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
sampling.setIsCarry(0);
|
|
sampling.setIsCarry(0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -215,7 +233,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
Object newObject = BillPcrServiceImpl.getNewObject(nextId, sampling.getDestName(), sampling.getDestId(), sampling.getAdmissionUserName(),
|
|
Object newObject = BillPcrServiceImpl.getNewObject(nextId, sampling.getDestName(), sampling.getDestId(), sampling.getAdmissionUserName(),
|
|
sampling.getAdmissionUserId(), sampling.getVistitDate(), sampling.getSubDate(),
|
|
sampling.getAdmissionUserId(), sampling.getVistitDate(), sampling.getSubDate(),
|
|
sampling.getProcessId(), Integer.parseInt(sampling.getFarmId()), sampling.getTestLocation(), sampling.getTestLocationId(),
|
|
sampling.getProcessId(), Integer.parseInt(sampling.getFarmId()), sampling.getTestLocation(), sampling.getTestLocationId(),
|
|
- sampling.getVistitType(), sampling.getPhone(),sampling.getDepartureName(),sampling.getDepartureId(),sampling.getMidId(),sampling.getMidName());
|
|
|
|
|
|
+ sampling.getVistitType(), sampling.getPhone(), sampling.getDepartureName(), sampling.getDepartureId(), sampling.getMidId(), sampling.getMidName());
|
|
if (nextId == 0) {
|
|
if (nextId == 0) {
|
|
if (split.length == 1) {
|
|
if (split.length == 1) {
|
|
baseProcess.setProcessType(1);
|
|
baseProcess.setProcessType(1);
|
|
@@ -245,7 +263,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
Object entity = flowUtil.getEntity(Integer.parseInt(split[1]), sampling.getVistitType(), sampling.getDestName()
|
|
Object entity = flowUtil.getEntity(Integer.parseInt(split[1]), sampling.getVistitType(), sampling.getDestName()
|
|
, sampling.getDestId(), sampling.getAdmissionUserId(), sampling.getAdmissionUserName(), sampling.getPhone(),
|
|
, sampling.getDestId(), sampling.getAdmissionUserId(), sampling.getAdmissionUserName(), sampling.getPhone(),
|
|
sampling.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
|
|
sampling.getVistitDate(), location.getId(), location.getLocationName(), Integer.parseInt(farmId)
|
|
- , baseProcess.getId(), sampling.getDepartureName(), sampling.getDepartureId(),sampling.getMidId(),sampling.getMidName());
|
|
|
|
|
|
+ , baseProcess.getId(), sampling.getDepartureName(), sampling.getDepartureId(), sampling.getMidId(), sampling.getMidName());
|
|
if (Integer.parseInt(split[1]) == 1) {
|
|
if (Integer.parseInt(split[1]) == 1) {
|
|
//新增采样
|
|
//新增采样
|
|
BillSampling billSampling = (BillSampling) entity;
|
|
BillSampling billSampling = (BillSampling) entity;
|
|
@@ -319,7 +337,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
before.setRemark(sampling.getRemark());
|
|
before.setRemark(sampling.getRemark());
|
|
}
|
|
}
|
|
billCleanBeforeMapper.insert(before);
|
|
billCleanBeforeMapper.insert(before);
|
|
- }else if (Integer.parseInt(split[1]) == 7) {
|
|
|
|
|
|
+ } else if (Integer.parseInt(split[1]) == 7) {
|
|
//新增洗澡前拍照
|
|
//新增洗澡前拍照
|
|
BillGoodsInventory before = (BillGoodsInventory) entity;
|
|
BillGoodsInventory before = (BillGoodsInventory) entity;
|
|
if (sampling.getVistitType() != 0) {
|
|
if (sampling.getVistitType() != 0) {
|
|
@@ -335,7 +353,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId + "," + split[1]);
|
|
Integer locationId = sampling.getTestLocationId();
|
|
Integer locationId = sampling.getTestLocationId();
|
|
String[] split2 = allLocationId.split(",");
|
|
String[] split2 = allLocationId.split(",");
|
|
- int a=0;
|
|
|
|
|
|
+ int a = 0;
|
|
for (int i = 0; i < split2.length; i++) {
|
|
for (int i = 0; i < split2.length; i++) {
|
|
if (locationId.toString().equals(split2[i])) {
|
|
if (locationId.toString().equals(split2[i])) {
|
|
a = i + 1;
|
|
a = i + 1;
|
|
@@ -372,7 +390,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
}
|
|
}
|
|
billSamplingMapper.insert(billSampling);
|
|
billSamplingMapper.insert(billSampling);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
- }else if (nextId == 2) {
|
|
|
|
|
|
+ } else if (nextId == 2) {
|
|
//新增pcr
|
|
//新增pcr
|
|
BillPcr billClean = (BillPcr) newObject;
|
|
BillPcr billClean = (BillPcr) newObject;
|
|
if (sampling.getVistitType() != 0) {
|
|
if (sampling.getVistitType() != 0) {
|
|
@@ -386,19 +404,20 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
billClean.setSamplingId(Integer.parseInt(id));
|
|
billClean.setSamplingId(Integer.parseInt(id));
|
|
pcrMapper.insert(billClean);
|
|
pcrMapper.insert(billClean);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
- }else if (nextId == 3) {
|
|
|
|
|
|
+ } else if (nextId == 3) {
|
|
//新增洗澡
|
|
//新增洗澡
|
|
BillClean billClean = (BillClean) newObject;
|
|
BillClean billClean = (BillClean) newObject;
|
|
if (sampling.getVistitType() != 0) {
|
|
if (sampling.getVistitType() != 0) {
|
|
billClean.setCarNum(sampling.getCarNum());
|
|
billClean.setCarNum(sampling.getCarNum());
|
|
- }if (sampling.getVistitType() == 5) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (sampling.getVistitType() == 5) {
|
|
billClean.setResource(sampling.getResource());
|
|
billClean.setResource(sampling.getResource());
|
|
billClean.setFeedImgUrl(sampling.getFeedImgUrl());
|
|
billClean.setFeedImgUrl(sampling.getFeedImgUrl());
|
|
billClean.setRemark(sampling.getRemark());
|
|
billClean.setRemark(sampling.getRemark());
|
|
}
|
|
}
|
|
cleanMapper.insert(billClean);
|
|
cleanMapper.insert(billClean);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
- }else if (nextId == 4) {
|
|
|
|
|
|
+ } else if (nextId == 4) {
|
|
//新增隔离
|
|
//新增隔离
|
|
BillIsolate pcr = (BillIsolate) newObject;
|
|
BillIsolate pcr = (BillIsolate) newObject;
|
|
if (sampling.getVistitType() != 0) {
|
|
if (sampling.getVistitType() != 0) {
|
|
@@ -411,7 +430,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
}
|
|
}
|
|
isolateMapper.insert(pcr);
|
|
isolateMapper.insert(pcr);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
- }else if (nextId == 5) {
|
|
|
|
|
|
+ } else if (nextId == 5) {
|
|
BillDry billClean = (BillDry) newObject;
|
|
BillDry billClean = (BillDry) newObject;
|
|
if (sampling.getVistitType() != 0) {
|
|
if (sampling.getVistitType() != 0) {
|
|
billClean.setCarNum(sampling.getCarNum());
|
|
billClean.setCarNum(sampling.getCarNum());
|
|
@@ -424,7 +443,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
dryMapper.insert(billClean);
|
|
dryMapper.insert(billClean);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
//新增烘干
|
|
//新增烘干
|
|
- }else if (nextId == 6) {
|
|
|
|
|
|
+ } else if (nextId == 6) {
|
|
//新增洗澡前拍照
|
|
//新增洗澡前拍照
|
|
BillCleanBefore before = (BillCleanBefore) newObject;
|
|
BillCleanBefore before = (BillCleanBefore) newObject;
|
|
if (sampling.getVistitType() != 0) {
|
|
if (sampling.getVistitType() != 0) {
|
|
@@ -437,8 +456,7 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
}
|
|
}
|
|
billCleanBeforeMapper.insert(before);
|
|
billCleanBeforeMapper.insert(before);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentFlowId() + "," + nextId);
|
|
- }
|
|
|
|
- else if (nextId == 7) {
|
|
|
|
|
|
+ } else if (nextId == 7) {
|
|
//新增洗澡前拍照
|
|
//新增洗澡前拍照
|
|
BillGoodsInventory before = (BillGoodsInventory) newObject;
|
|
BillGoodsInventory before = (BillGoodsInventory) newObject;
|
|
if (sampling.getVistitType() != 0) {
|
|
if (sampling.getVistitType() != 0) {
|
|
@@ -473,17 +491,32 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
String pageSize = paramsMap.get("pageSize");
|
|
String pageSize = paramsMap.get("pageSize");
|
|
Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
Page<BillSampling> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
|
|
QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BillSampling> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.eq("farm_id", farmId).orderByDesc("sub_date").eq("vistit_type",type);
|
|
|
|
|
|
+ queryWrapper.eq("farm_id", farmId).orderByDesc("sub_date").eq("vistit_type", type);
|
|
if ("0".equals(data)) {
|
|
if ("0".equals(data)) {
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
queryWrapper.in("bill_status", 0, 1, 2, 3);
|
|
}
|
|
}
|
|
if ("1".equals(data)) {
|
|
if ("1".equals(data)) {
|
|
- queryWrapper.in("bill_status", 0,3);
|
|
|
|
|
|
+ queryWrapper.in("bill_status", 0, 3);
|
|
}
|
|
}
|
|
if ("2".equals(data)) {
|
|
if ("2".equals(data)) {
|
|
queryWrapper.eq("bill_status", 1);
|
|
queryWrapper.eq("bill_status", 1);
|
|
}
|
|
}
|
|
- return new Result(ResultCode.SUCCESS,billSamplingMapper.selectPage(page,queryWrapper));
|
|
|
|
|
|
+ return new Result(ResultCode.SUCCESS, billSamplingMapper.selectPage(page, queryWrapper));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Result getVideo(MultipartFile video) throws IOException {
|
|
|
|
+ String s = "";
|
|
|
|
+ if (ObjectUtil.isNotEmpty(video)) {
|
|
|
|
+ String pic1 = uploadImage.getVideoCom(video);
|
|
|
|
+ if (pic1.equals("上传失败")) {
|
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
|
+ return new Result(10001, "车辆视频上传失败", false);
|
|
|
|
+ } else {
|
|
|
|
+ s = pic1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new Result(ResultCode.SUCCESS, s);
|
|
}
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
@@ -492,14 +525,14 @@ public class BillSamplingServiceImpl extends ServiceImpl<BillSamplingMapper, Bil
|
|
int a = 0;
|
|
int a = 0;
|
|
for (int i = 0; i < split1.length; i++) {
|
|
for (int i = 0; i < split1.length; i++) {
|
|
if ("36".equals(split1[i])) {
|
|
if ("36".equals(split1[i])) {
|
|
- a = i+1;
|
|
|
|
|
|
+ a = i + 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- int i = 2 *(a - 2);
|
|
|
|
|
|
+ int i = 2 * (a - 2);
|
|
System.out.println(i);
|
|
System.out.println(i);
|
|
String s1 = "2,2,2,1,0,0,0";
|
|
String s1 = "2,2,2,1,0,0,0";
|
|
String s2 = s1.substring(0, i + 3);
|
|
String s2 = s1.substring(0, i + 3);
|
|
- System.out.println("s2:"+s2);
|
|
|
|
|
|
+ System.out.println("s2:" + s2);
|
|
String[] split = s2.split(",");
|
|
String[] split = s2.split(",");
|
|
String sb2 = "";
|
|
String sb2 = "";
|
|
for (int j = 0; j < split.length; j++) {
|
|
for (int j = 0; j < split.length; j++) {
|