|
@@ -10,9 +10,7 @@ import com.huimv.receive.common.utils.Result;
|
|
import com.huimv.receive.common.utils.ResultCode;
|
|
import com.huimv.receive.common.utils.ResultCode;
|
|
import com.huimv.receive.common.utils.UploadImage;
|
|
import com.huimv.receive.common.utils.UploadImage;
|
|
import com.huimv.receive.entity.*;
|
|
import com.huimv.receive.entity.*;
|
|
-import com.huimv.receive.mapper.BaseLocationMapper;
|
|
|
|
-import com.huimv.receive.mapper.BaseProcessMapper;
|
|
|
|
-import com.huimv.receive.mapper.BillCleanBeforeMapper;
|
|
|
|
|
|
+import com.huimv.receive.mapper.*;
|
|
import com.huimv.receive.service.IBillCleanBeforeService;
|
|
import com.huimv.receive.service.IBillCleanBeforeService;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -24,6 +22,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
|
+import java.time.LocalDateTime;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -46,6 +45,17 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
private BaseProcessMapper processMapper;
|
|
private BaseProcessMapper processMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private BaseLocationMapper locationMapper;
|
|
private BaseLocationMapper locationMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private BillPcrMapper pcrMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private BillCleanMapper cleanMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private BillIsolateMapper isolateMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private BillSamplingMapper samplingMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private BillDryMapper dryMapper;
|
|
|
|
+
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Result listPersonalCleanBefore(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
public Result listPersonalCleanBefore(HttpServletRequest httpServletRequest, Map<String, String> paramsMap) {
|
|
@@ -67,7 +77,6 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date, MultipartFile img) throws ParseException, IOException {
|
|
public Result edit(HttpServletRequest httpServletRequest, String farmId, String id, String date, MultipartFile img) throws ParseException, IOException {
|
|
- //1为合格2为异常
|
|
|
|
String s = "";
|
|
String s = "";
|
|
if (uploadImage.getImageCom(img).equals("上传失败")) {
|
|
if (uploadImage.getImageCom(img).equals("上传失败")) {
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
@@ -81,16 +90,16 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
date = sdf.format(new Date());
|
|
date = sdf.format(new Date());
|
|
}
|
|
}
|
|
BillCleanBefore cleanBefore = billCleanBeforeMapper.selectById(id);
|
|
BillCleanBefore cleanBefore = billCleanBeforeMapper.selectById(id);
|
|
- /* billPcr.setImgUrl(s);
|
|
|
|
- billPcr.setImgStatus(1);
|
|
|
|
|
|
+ cleanBefore.setImgUrl(s);
|
|
|
|
+ cleanBefore.setImgStatus(1);
|
|
|
|
|
|
|
|
|
|
QueryWrapper<BaseProcess> processQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BaseProcess> processQueryWrapper = new QueryWrapper<>();
|
|
- processQueryWrapper.eq("farm_id", farmId).eq("id", billPcr.getProcessId());
|
|
|
|
|
|
+ processQueryWrapper.eq("farm_id", farmId).eq("id", cleanBefore.getProcessId());
|
|
BaseProcess baseProcess = processMapper.selectOne(processQueryWrapper);//进程
|
|
BaseProcess baseProcess = processMapper.selectOne(processQueryWrapper);//进程
|
|
|
|
|
|
QueryWrapper<BaseLocation> locationQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BaseLocation> locationQueryWrapper = new QueryWrapper<>();
|
|
- locationQueryWrapper.eq("id", billPcr.getTestLocationId());
|
|
|
|
|
|
+ locationQueryWrapper.eq("id", cleanBefore.getTestLocationId());
|
|
BaseLocation baseLocation = locationMapper.selectOne(locationQueryWrapper);//当前pcr检测所在的位置
|
|
BaseLocation baseLocation = locationMapper.selectOne(locationQueryWrapper);//当前pcr检测所在的位置
|
|
|
|
|
|
String allLocationId = baseProcess.getAllLocationId();//所有的位置id
|
|
String allLocationId = baseProcess.getAllLocationId();//所有的位置id
|
|
@@ -101,19 +110,19 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
Integer nextId = Integer.parseInt(split[0]);
|
|
Integer nextId = Integer.parseInt(split[0]);
|
|
|
|
|
|
|
|
|
|
- billPcr.setBillStatus(1);
|
|
|
|
- billPcr.setPassUserName(TokenSign.getUserNameByJwtToken(httpServletRequest));
|
|
|
|
- billPcr.setPassUserId(TokenSign.getMemberIdByJwtToken(httpServletRequest));
|
|
|
|
- billPcr.setTestLocation(baseLocation.getLocationName());
|
|
|
|
- billPcr.setTestLocationId(baseLocation.getId());
|
|
|
|
- billPcr.setCheckDate(sdf.parse(date));
|
|
|
|
- billPcr.setPassDate(sdf.parse(sdf.format(new Date())));
|
|
|
|
|
|
+ cleanBefore.setBillStatus(1);
|
|
|
|
+ cleanBefore.setPassUserName(TokenSign.getUserNameByJwtToken(httpServletRequest));
|
|
|
|
+ cleanBefore.setPassUserId(TokenSign.getMemberIdByJwtToken(httpServletRequest));
|
|
|
|
+ cleanBefore.setTestLocation(baseLocation.getLocationName());
|
|
|
|
+ cleanBefore.setTestLocationId(baseLocation.getId());
|
|
|
|
+ cleanBefore.setCheckDate(LocalDateTime.parse(date));
|
|
|
|
+ cleanBefore.setPassDate(LocalDateTime.now());
|
|
|
|
|
|
|
|
|
|
- Object newObject = BillPcrServiceImpl.getNewObject(nextId, billPcr.getDestName(), billPcr.getDestId(), billPcr.getAdmissionUserName(),
|
|
|
|
- billPcr.getAdmissionUserId(), billPcr.getVistitDate(), billPcr.getSubDate(),
|
|
|
|
- billPcr.getProcessId(), billPcr.getFarmId(), billPcr.getTestLocation(), billPcr.getTestLocationId(),
|
|
|
|
- billPcr.getVistitType(), billPcr.getPhone());
|
|
|
|
|
|
+ Object newObject = BillPcrServiceImpl.getNewObject(nextId, cleanBefore.getDestName(), cleanBefore.getDestId(), cleanBefore.getAdmissionUserName(),
|
|
|
|
+ cleanBefore.getAdmissionUserId(), cleanBefore.getVistitDate(), cleanBefore.getSubDate(),
|
|
|
|
+ cleanBefore.getProcessId(), Integer.parseInt(cleanBefore.getFarmId()), cleanBefore.getTestLocation(), cleanBefore.getTestLocationId(),
|
|
|
|
+ cleanBefore.getVistitType(), cleanBefore.getPhone());
|
|
if (nextId == 0) {
|
|
if (nextId == 0) {
|
|
int index = allLocationId.indexOf(baseLocation.getId());
|
|
int index = allLocationId.indexOf(baseLocation.getId());
|
|
StringBuilder status = new StringBuilder(baseProcess.getAllLocationId());
|
|
StringBuilder status = new StringBuilder(baseProcess.getAllLocationId());
|
|
@@ -143,7 +152,7 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
} else if (nextId == 6) {
|
|
} else if (nextId == 6) {
|
|
//新增洗澡前拍照
|
|
//新增洗澡前拍照
|
|
BillCleanBefore before = new BillCleanBefore();
|
|
BillCleanBefore before = new BillCleanBefore();
|
|
- beforeMapper.insert(before);
|
|
|
|
|
|
+ billCleanBeforeMapper.insert(before);
|
|
}
|
|
}
|
|
baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
|
|
baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
|
|
baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getLocationName());
|
|
baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getLocationName());
|
|
@@ -154,7 +163,7 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
|
|
baseProcess.setCurrentStatus(substring + "1," + 0);
|
|
baseProcess.setCurrentStatus(substring + "1," + 0);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentLocationId() + "," + nextId);
|
|
baseProcess.setCurrentFlowId(baseProcess.getCurrentLocationId() + "," + nextId);
|
|
processMapper.updateById(baseProcess);
|
|
processMapper.updateById(baseProcess);
|
|
- pcrMapper.updateById(billPcr);*/
|
|
|
|
|
|
+ billCleanBeforeMapper.updateById(cleanBefore);
|
|
return new Result(10000, "修改成功!", true);
|
|
return new Result(10000, "修改成功!", true);
|
|
}
|
|
}
|
|
}
|
|
}
|