提交 56984fd5 authored 作者: 邓砥奕's avatar 邓砥奕

更新

上级 44e3e709
...@@ -107,10 +107,10 @@ public class AllotBillSaveVo { ...@@ -107,10 +107,10 @@ public class AllotBillSaveVo {
public AllotBill toDo() { public AllotBill toDo() {
AllotBill allotBillEntity = new AllotBill(); AllotBill allotBillEntity = new AllotBill();
BeanUtils.copyProperties(this, allotBillEntity); BeanUtils.copyProperties(this, allotBillEntity);
if(this.replyFiles!=null&&this.replyFiles.size()>0){ if(this.replyFiles!=null){
allotBillEntity.setReplyFiles(FilesUtil.stringFileToList(this.replyFiles)); allotBillEntity.setReplyFiles(FilesUtil.stringFileToList(this.replyFiles));
} }
if(this.applyFiles!=null&&this.applyFiles.size()>0){ if(this.applyFiles!=null){
allotBillEntity.setApplyFiles(FilesUtil.stringFileToList(this.applyFiles)); allotBillEntity.setApplyFiles(FilesUtil.stringFileToList(this.applyFiles));
} }
allotBillEntity.setAllotStatus(2); allotBillEntity.setAllotStatus(2);
...@@ -124,10 +124,10 @@ public class AllotBillSaveVo { ...@@ -124,10 +124,10 @@ public class AllotBillSaveVo {
public AllotBackBill toBackDo() { public AllotBackBill toBackDo() {
AllotBackBill allotBillEntity = new AllotBackBill(); AllotBackBill allotBillEntity = new AllotBackBill();
BeanUtils.copyProperties(this, allotBillEntity); BeanUtils.copyProperties(this, allotBillEntity);
if(this.replyFiles!=null&&this.replyFiles.size()>0){ if(this.replyFiles!=null){
allotBillEntity.setReplyFiles(FilesUtil.stringFileToList(this.replyFiles)); allotBillEntity.setReplyFiles(FilesUtil.stringFileToList(this.replyFiles));
} }
if(this.applyFiles!=null&&this.applyFiles.size()>0){ if(this.applyFiles!=null){
allotBillEntity.setApplyFiles(FilesUtil.stringFileToList(this.applyFiles)); allotBillEntity.setApplyFiles(FilesUtil.stringFileToList(this.applyFiles));
} }
allotBillEntity.setBackStatus(0); allotBillEntity.setBackStatus(0);
......
...@@ -38,14 +38,19 @@ public class FilesUtil { ...@@ -38,14 +38,19 @@ public class FilesUtil {
public static String stringFileToList(List<FileRet> fileRets){ public static String stringFileToList(List<FileRet> fileRets){
StringBuffer fileString = new StringBuffer(); StringBuffer fileString = new StringBuffer();
if (fileRets!=null) { if (fileRets!=null) {
fileRets.forEach( if (fileRets.size()>0) {
fileRet -> fileString.append("<*>").append(fileRet.getName()) fileRets.forEach(
.append(",") fileRet -> fileString.append("<*>").append(fileRet.getName())
.append(fileRet.getFilePath()) .append(",")
.append(",") .append(fileRet.getFilePath())
.append(fileRet.getPreviewPath()) .append(",")
); .append(fileRet.getPreviewPath())
return fileString.toString(); );
return fileString.toString();
}
else {
return "";
}
}else { }else {
return fileString.toString(); return fileString.toString();
} }
......
...@@ -1514,7 +1514,7 @@ public class RepairController { ...@@ -1514,7 +1514,7 @@ public class RepairController {
Integer level = userUtils.getCurrentUnitLevel(); Integer level = userUtils.getCurrentUnitLevel();
List<RepairDetail> repairDetails; List<RepairDetail> repairDetails;
if (level==1) { if (level==1) {
repairDetails = repairDetailDao.findAllByRepairStatusIn(Arrays.asList(4, 5), repairTaskSelectVo.getPageable().getSort()); repairDetails = repairDetailDao.findAllByRepairStatus(5, repairTaskSelectVo.getPageable().getSort());
} }
else if (level==2) { else if (level==2) {
repairDetails = repairDetailDao.findAllByRepairStatus(5, repairTaskSelectVo.getPageable().getSort()); repairDetails = repairDetailDao.findAllByRepairStatus(5, repairTaskSelectVo.getPageable().getSort());
...@@ -1530,8 +1530,23 @@ public class RepairController { ...@@ -1530,8 +1530,23 @@ public class RepairController {
List<RepairDetail> repairDetails2 = repairDetails.stream().filter(repairDetail -> units.contains(repairDetail.getLocationUnit())&&(!hasYear||repairDetail.getUpdateTime().getYear()==year-1900)).collect(Collectors.toList()); List<RepairDetail> repairDetails2 = repairDetails.stream().filter(repairDetail -> units.contains(repairDetail.getLocationUnit())&&(!hasYear||repairDetail.getUpdateTime().getYear()==year-1900)).collect(Collectors.toList());
return ResponseEntity.ok(PageUtil.getPerPage(repairTaskSelectVo.getPage(),repairTaskSelectVo.getSize(),repairDetails2,repairTaskSelectVo.getPageable())); return ResponseEntity.ok(PageUtil.getPerPage(repairTaskSelectVo.getPage(),repairTaskSelectVo.getSize(),repairDetails2,repairTaskSelectVo.getPageable()));
} }
else if(type==5){
Integer level = userUtils.getCurrentUnitLevel();
List<RepairDetail> repairDetails;
if (level==1) {
repairDetails = repairDetailDao.findAllByRepairStatus(4, repairTaskSelectVo.getPageable().getSort());
}
else {
throw new ApiException("区县没有维修完成列表");
}
repairDetails.forEach(repairDetail -> {
repairDetail.setConfigName();
});
List<RepairDetail> repairDetails2 = repairDetails.stream().filter(repairDetail -> !hasYear||repairDetail.getUpdateTime().getYear()==year-1900).collect(Collectors.toList());
return ResponseEntity.ok(PageUtil.getPerPage(repairTaskSelectVo.getPage(),repairTaskSelectVo.getSize(),repairDetails2,repairTaskSelectVo.getPageable()));
}
else { else {
throw new ApiException("type只能为1,2,3,4"); throw new ApiException("type只能为1,2,3,4,5");
} }
} }
......
...@@ -12,8 +12,6 @@ import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill; ...@@ -12,8 +12,6 @@ import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill;
import com.tykj.dev.device.confirmcheck.repository.DeviceCheckBillDao; import com.tykj.dev.device.confirmcheck.repository.DeviceCheckBillDao;
import com.tykj.dev.device.confirmcheck.repository.DeviceCheckDetailDao; import com.tykj.dev.device.confirmcheck.repository.DeviceCheckDetailDao;
import com.tykj.dev.device.confirmcheck.repository.DeviceCheckStatDao; import com.tykj.dev.device.confirmcheck.repository.DeviceCheckStatDao;
import com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill;
import com.tykj.dev.device.destroy.service.DeviceDestroyBillService;
import com.tykj.dev.device.file.service.FilesUtil; import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.subject.vo.FileVo; import com.tykj.dev.device.library.subject.vo.FileVo;
import com.tykj.dev.device.matching.service.MatchingDeviceBillService; import com.tykj.dev.device.matching.service.MatchingDeviceBillService;
...@@ -26,8 +24,6 @@ import com.tykj.dev.device.repair.subject.domin.RepairBackBill; ...@@ -26,8 +24,6 @@ import com.tykj.dev.device.repair.subject.domin.RepairBackBill;
import com.tykj.dev.device.repair.subject.domin.RepairBill; import com.tykj.dev.device.repair.subject.domin.RepairBill;
import com.tykj.dev.device.repair.subject.domin.RepairSendBill; import com.tykj.dev.device.repair.subject.domin.RepairSendBill;
import com.tykj.dev.device.retired.service.DeviceRetiredBillService; import com.tykj.dev.device.retired.service.DeviceRetiredBillService;
import com.tykj.dev.device.scrap.service.ScrapBillService;
import com.tykj.dev.device.scrap.subject.domin.ScrapBill;
import com.tykj.dev.device.selfcheck.service.SelfCheckBillService; import com.tykj.dev.device.selfcheck.service.SelfCheckBillService;
import com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill; import com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill;
import com.tykj.dev.device.storage.service.StorageBillService; import com.tykj.dev.device.storage.service.StorageBillService;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论