提交 61b081e0 authored 作者: zhoushaopan's avatar zhoushaopan

[多模块]修改多个代码

上级 48c8c738
...@@ -808,7 +808,8 @@ public class AllotBillController { ...@@ -808,7 +808,8 @@ public class AllotBillController {
.collect(Collectors.toList())); .collect(Collectors.toList()));
} }
//给同单位专管员和收件单位专管员推阅知 //给同单位专管员和收件单位专管员推阅知
messageBto1.setContent(title.substring(0,4)+"撤回"+title.substring(4)); // messageBto1.setContent(title.substring(0,4)+"撤回"+title.substring(4));
messageBto1.setContent("撤回任务:" + title);
MessageBto messageBto = new MessageBto(-1, parentTask.getBusinessType(), messageBto1.getContent(), idList, 1); MessageBto messageBto = new MessageBto(-1, parentTask.getBusinessType(), messageBto1.getContent(), idList, 1);
BeanUtils.copyProperties(messageBto1,messageBto); BeanUtils.copyProperties(messageBto1,messageBto);
messageBto.setTaskId(-1); messageBto.setTaskId(-1);
......
...@@ -648,7 +648,7 @@ public class BackController { ...@@ -648,7 +648,7 @@ public class BackController {
.map(User::getUserId) .map(User::getUserId)
.collect(Collectors.toList())); .collect(Collectors.toList()));
//给同单位专管员和收件单位专管员推阅知 //给同单位专管员和收件单位专管员推阅知
messageBto1.setContent(title.substring(0,4)+"撤回"+title.substring(4)); messageBto1.setContent("撤回任务:" + title);
MessageBto messageBto = new MessageBto(-1, parentTask.getBusinessType(), messageBto1.getContent(), idList, 1); MessageBto messageBto = new MessageBto(-1, parentTask.getBusinessType(), messageBto1.getContent(), idList, 1);
BeanUtils.copyProperties(messageBto1,messageBto); BeanUtils.copyProperties(messageBto1,messageBto);
messageBto.setTaskId(-1); messageBto.setTaskId(-1);
......
...@@ -52,10 +52,7 @@ import org.springframework.http.ResponseEntity; ...@@ -52,10 +52,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.time.Instant; import java.time.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.function.Function; import java.util.function.Function;
...@@ -214,9 +211,12 @@ public class DeviceCheckController { ...@@ -214,9 +211,12 @@ public class DeviceCheckController {
CheckStatVo ctVo = transUtil.checkStatDo2Vo(ct); CheckStatVo ctVo = transUtil.checkStatDo2Vo(ct);
linkVo.setTitle(ctVo.getTitle()); linkVo.setTitle(ctVo.getTitle());
LocalDateTime endTime = ctVo.getEndTime(); LocalDateTime endTime = ctVo.getEndTime();
endTime = LocalDateTime.of(ctVo.getEndTime().toLocalDate(), LocalTime.MAX);
// LocalDateTime endTime = ctVo.getEndTime().plusDays(1);
//新增修改时间 //新增修改时间
LocalDateTime updateTime = ctVo.getUpdateTime(); LocalDateTime updateTime = ctVo.getUpdateTime();
linkVo.setEndTime(ctVo.getEndTime().toLocalDate()); // linkVo.setEndTime(ctVo.getEndTime().toLocalDate());
linkVo.setEndTime(LocalDateTime.of(ctVo.getEndTime().toLocalDate(), LocalTime.MAX).toLocalDate());
List<LinkCheckDetail> lcdList = new ArrayList<>(); List<LinkCheckDetail> lcdList = new ArrayList<>();
List<LinkExamDetail> ledList = new ArrayList<>(); List<LinkExamDetail> ledList = new ArrayList<>();
...@@ -516,7 +516,7 @@ public class DeviceCheckController { ...@@ -516,7 +516,7 @@ public class DeviceCheckController {
} else if (revAreaStat.getComProgress() == 2 && task.getBillStatus() % 10 == 1) { } else if (revAreaStat.getComProgress() == 2 && task.getBillStatus() % 10 == 1) {
led.setCheckResult("进行中"); led.setCheckResult("进行中");
} else if (revAreaStat.getComProgress() == 2) { } else if (revAreaStat.getComProgress() == 2) {
if (endTime.isBefore(LocalDateTime.now())) { if (endTime.isBefore(updateTime)) {
led.setCheckResult("逾期完成"); led.setCheckResult("逾期完成");
} else { } else {
led.setCheckResult("完成"); led.setCheckResult("完成");
...@@ -649,7 +649,6 @@ public class DeviceCheckController { ...@@ -649,7 +649,6 @@ public class DeviceCheckController {
// 2.发起自己的检查(只是市级别的 level=2) // 2.发起自己的检查(只是市级别的 level=2)
List<String> checkedUnitNames = checkedUnits.stream().map(Units::getName).collect(toList()); List<String> checkedUnitNames = checkedUnits.stream().map(Units::getName).collect(toList());
log.info("[核查模块]发起核查,发起单位为{},被查单位为{}", startUnit.getName(), checkedUnitNames); log.info("[核查模块]发起核查,发起单位为{},被查单位为{}", startUnit.getName(), checkedUnitNames);
// 构建省的统计账单,所有的checkedUnits都要被包含到统计中去 // 构建省的统计账单,所有的checkedUnits都要被包含到统计中去
...@@ -771,7 +770,7 @@ public class DeviceCheckController { ...@@ -771,7 +770,7 @@ public class DeviceCheckController {
@PostMapping("/startExam") @PostMapping("/startExam")
public ResponseEntity<ResultObj> startExam(@RequestBody CheckExamVo ceVo) { public ResponseEntity<ResultObj> startExam(@RequestBody CheckExamVo ceVo) {
//设置为 //设置为
ceVo.setEndTime(ceVo.getEndTime().plusDays(1)); ceVo.setEndTime(LocalDateTime.of(ceVo.getEndTime(), LocalTime.MAX).toLocalDate());
//初始化数据结构 //初始化数据结构
List<Integer> detailIds = new ArrayList<>(); List<Integer> detailIds = new ArrayList<>();
Integer startUnitId = ceVo.getUnitId(); Integer startUnitId = ceVo.getUnitId();
...@@ -1094,6 +1093,8 @@ public class DeviceCheckController { ...@@ -1094,6 +1093,8 @@ public class DeviceCheckController {
taskService.moveToSpecial(currentTask, firstStatus, currentTask.getFirstUserId()); taskService.moveToSpecial(currentTask, firstStatus, currentTask.getFirstUserId());
} }
log.info("[核查模块] 专管员B操作成功"); log.info("[核查模块] 专管员B操作成功");
//完结系统自查业务
findBySystem();
return ResponseEntity.ok(new ResultObj<>("专管B操作成功")); return ResponseEntity.ok(new ResultObj<>("专管B操作成功"));
} }
...@@ -1332,18 +1333,6 @@ private SelfCheckController selfCheckController; ...@@ -1332,18 +1333,6 @@ private SelfCheckController selfCheckController;
} }
log.info("[核查模块] 统计数据确认操作成功"); log.info("[核查模块] 统计数据确认操作成功");
//判断自己是否存在系统自查任务
LocalDateTime updateTime = statRepo.findById(statId).get().getUpdateTime();
Instant instant = updateTime.atZone(ZoneId.systemDefault()).toInstant();
Date date = Date.from(instant);
List<Task> bySystem = selfCheckController.findBySystem(date);
if (bySystem.size() != 0){
for (Task task : bySystem) {
//任务结束
TaskBto taskBto = task.parse2Bto();
taskService.moveToEnd(taskBto);
}
}
return ResponseEntity.ok(new ResultObj<>("统计数据确认完毕")); return ResponseEntity.ok(new ResultObj<>("统计数据确认完毕"));
} }
...@@ -1665,6 +1654,11 @@ private SelfCheckController selfCheckController; ...@@ -1665,6 +1654,11 @@ private SelfCheckController selfCheckController;
return new CheckAreaStatVo(finalCityName, actualCount, supposeCount, finalProgress, finalSituation, 0, 0); return new CheckAreaStatVo(finalCityName, actualCount, supposeCount, finalProgress, finalSituation, 0, 0);
} }
private void findBySystem(){
selfCheckController.findBySystem1();
}
} }
......
...@@ -23,6 +23,7 @@ import com.tykj.dev.misc.utils.ResultUtil; ...@@ -23,6 +23,7 @@ import com.tykj.dev.misc.utils.ResultUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
...@@ -44,6 +45,7 @@ import java.util.stream.Collectors; ...@@ -44,6 +45,7 @@ import java.util.stream.Collectors;
@AutoDocument @AutoDocument
@Api(tags = "装备管理模块", description = "装备管理接口") @Api(tags = "装备管理模块", description = "装备管理接口")
@Validated @Validated
@Slf4j
public class DeviceLibraryController { public class DeviceLibraryController {
@Autowired @Autowired
private DeviceLibraryService deviceLibraryService; private DeviceLibraryService deviceLibraryService;
...@@ -171,6 +173,7 @@ public class DeviceLibraryController { ...@@ -171,6 +173,7 @@ public class DeviceLibraryController {
public ResponseEntity selectCheckDeviceListByUnit(@PathVariable("unitName") String unitName) { public ResponseEntity selectCheckDeviceListByUnit(@PathVariable("unitName") String unitName) {
String unit = unitName; String unit = unitName;
PredicateBuilder<DeviceLibrary> predicateBuilder = Specifications.and(); PredicateBuilder<DeviceLibrary> predicateBuilder = Specifications.and();
log.info("[装备模块] 单位名称:{}",unit);
predicateBuilder.eq("ownUnit", unit); predicateBuilder.eq("ownUnit", unit);
List<DeviceLibrary> deviceLibraries = deviceLibraryDao.findAll(predicateBuilder.build()); List<DeviceLibrary> deviceLibraries = deviceLibraryDao.findAll(predicateBuilder.build());
deviceLibraries.forEach(DeviceLibrary::setConfigName); deviceLibraries.forEach(DeviceLibrary::setConfigName);
...@@ -228,7 +231,6 @@ public class DeviceLibraryController { ...@@ -228,7 +231,6 @@ public class DeviceLibraryController {
Boolean containRfidCardDim = !hasRfidCardDim||(deviceLibrary.getRfidCardId()!=null&&deviceLibrary.getRfidCardId().contains(deviceLibrarySelectVo.getRfidCardDim())); Boolean containRfidCardDim = !hasRfidCardDim||(deviceLibrary.getRfidCardId()!=null&&deviceLibrary.getRfidCardId().contains(deviceLibrarySelectVo.getRfidCardDim()));
Boolean containStorageLocationDim = !hasStorageLocationDim||deviceLibrary.getStorageLocation().contains(deviceLibrarySelectVo.getStorageLocationDim()); Boolean containStorageLocationDim = !hasStorageLocationDim||deviceLibrary.getStorageLocation().contains(deviceLibrarySelectVo.getStorageLocationDim());
// Boolean containTypeDim = !hasTypeDim||deviceLibrary.getType().contains(deviceLibrarySelectVo.getTypeDim()); // Boolean containTypeDim = !hasTypeDim||deviceLibrary.getType().contains(deviceLibrarySelectVo.getTypeDim());
return containModelDim&&containNameDim&&containSeqDim&&containLocationUnitDim&&containOwnUnitDim&&containLifeStatusDim&&containUpdateTimeDim&&containRfidCardDim&&containStorageLocationDim; return containModelDim&&containNameDim&&containSeqDim&&containLocationUnitDim&&containOwnUnitDim&&containLifeStatusDim&&containUpdateTimeDim&&containRfidCardDim&&containStorageLocationDim;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
......
...@@ -257,8 +257,17 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -257,8 +257,17 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
allotIds.add(d2.getId()); allotIds.add(d2.getId());
break; break;
case 4: case 4:
//如果所属跟所在不一致
if (!d2.getLocationUnit().equals(d2.getOwnUnit())){
if (d2.getOwnUnit().equals(userUtils.getCurrentUserUnitName())){
repairNum++; repairNum++;
repairIds.add(d2.getId()); repairIds.add(d2.getId());
}
}else {
repairNum++;
repairIds.add(d2.getId());
}
break; break;
case 5: case 5:
scrappedNum++; scrappedNum++;
......
...@@ -2165,4 +2165,135 @@ public class RepairController { ...@@ -2165,4 +2165,135 @@ public class RepairController {
repairBackBill.setStartUserbId(agentBackVo.getStartUserbId()); repairBackBill.setStartUserbId(agentBackVo.getStartUserbId());
return ResponseEntity.ok(deviceRepairBackBillService.update(repairBackBill)); return ResponseEntity.ok(deviceRepairBackBillService.update(repairBackBill));
} }
@ApiOperation(value = "维修撤回", notes = "根据任务id撤回维修")
@GetMapping("/revokeRepairTask/taskId")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity revokeRepairTask(Integer taskId) {
//根据任务id查询子任务 发件方是子任务 收件方是主任务
TaskBto taskBto = taskService.get(taskId);
Integer parentTaskId = taskBto.getParentTaskId();
TaskBto parentTask = taskService.get(parentTaskId);
//父任务未被完成 可以被撤回
Integer billId = taskBto.getBillId();
String title = taskBto.getTitle();
// AllotBill allotBill = allotBillService.getOne(billId);
RepairSendBill sendBill = repairSendBillService.getOne(billId);
Integer currentUserId = userUtils.getCurrentUserId();
List<Integer> idList = userPublicService.findOtherUser(currentUserId);
//找到收件方的阅知
MessageBto messageBto1 = messageService.findByTaskId(parentTaskId).parse2Bto();
//纵向配发阅知要发给收件单位的人
idList.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(sendBill.getReceiveUnit())).stream()
.map(User::getUserId)
.collect(Collectors.toList()));
//给同单位专管员和收件单位专管员推阅知
// messageBto1.setContent(title.substring(0,4)+"撤回"+title.substring(4));
messageBto1.setContent("撤回任务:" + title);
MessageBto messageBto = new MessageBto(-1, parentTask.getBusinessType(), messageBto1.getContent(), idList, 1);
BeanUtils.copyProperties(messageBto1,messageBto);
messageBto.setTaskId(-1);
messageService.add(messageBto);
myWebSocket.sendMessage1();
//将任务都完结
taskService.moveToRevoke(taskBto);
taskService.moveToRevoke(parentTask);
if (sendBill.getRepairDeviceCheckDetail() != null) {
List<Integer> ids = StringSplitUtil.split(sendBill.getRepairDeviceCheckDetail());
//所有的装备
List<DeviceLibrary> deviceLibraryList;
//所有的装备日志
List<DeviceLogDto> deviceLogDtos = new ArrayList<>();
ids.forEach(id -> {
DeviceLibrary deviceLibrary = deviceLibraryService.getOne(id);
//添加装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + deviceLibrary.getName() + "配发撤回", null, null, null);
deviceLogDtos.add(deviceLogDto);
});
//设置装备为在库
deviceLibraryService.updateLifeStatus2(2,ids);
deviceLibraryList = deviceLibraryService.findByIds(ids);
//添加日志
deviceLogService.addAllLog(deviceLogDtos);
// sendBill.setDeviceLibraries(deviceLibraryList);
sendBill.setDeviceLibraries(deviceLibraryList);
repairSendBillService.delete(sendBill.getId());
}
return ResponseEntity.ok(messageBto);
}
@ApiOperation(value = "维修撤回", notes = "根据任务id撤回维修")
@GetMapping("/revokeRepairBackTask/taskId")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity revokeRepairBackTask(Integer taskId) {
//根据任务id查询子任务 发件方是子任务 收件方是主任务
TaskBto taskBto = taskService.get(taskId);
Integer parentTaskId = taskBto.getParentTaskId();
TaskBto parentTask = taskService.get(parentTaskId);
//父任务未被完成 可以被撤回
Integer billId = taskBto.getBillId();
String title = taskBto.getTitle();
RepairBackBill repairBackBill = repairBackBillDao.findById(billId).get();
Integer currentUserId = userUtils.getCurrentUserId();
List<Integer> idList = userPublicService.findOtherUser(currentUserId);
//找到收件方的阅知
MessageBto messageBto1 = messageService.findByTaskId(parentTaskId).parse2Bto();
//纵向配发阅知要发给收件单位的人
idList.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(repairBackBill.getReceiveUnit())).stream()
.map(User::getUserId)
.collect(Collectors.toList()));
//给同单位专管员和收件单位专管员推阅知
// messageBto1.setContent(title.substring(0,4)+"撤回"+title.substring(4));
messageBto1.setContent("撤回任务:" + title);
MessageBto messageBto = new MessageBto(-1, parentTask.getBusinessType(), messageBto1.getContent(), idList, 1);
BeanUtils.copyProperties(messageBto1,messageBto);
messageBto.setTaskId(-1);
messageService.add(messageBto);
myWebSocket.sendMessage1();
//将任务都完结
taskService.moveToRevoke(taskBto);
taskService.moveToRevoke(parentTask);
if (repairBackBill.getBackCheckDetail() != null) {
List<Integer> ids = StringSplitUtil.split(repairBackBill.getBackCheckDetail());
//所有的装备
List<DeviceLibrary> deviceLibraryList;
//所有的装备日志
List<DeviceLogDto> deviceLogDtos = new ArrayList<>();
ids.forEach(id -> {
DeviceLibrary deviceLibrary = deviceLibraryService.getOne(id);
//添加装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + deviceLibrary.getName() + "配发撤回", null, null, null);
deviceLogDtos.add(deviceLogDto);
});
//设置装备为在库
deviceLibraryService.updateLifeStatus2(2,ids);
deviceLibraryList = deviceLibraryService.findByIds(ids);
//添加日志
deviceLogService.addAllLog(deviceLogDtos);
// sendBill.setDeviceLibraries(deviceLibraryList);
repairBackBill.setDeviceLibraries(deviceLibraryList);
repairSendBillService.delete(repairBackBill.getId());
}
return ResponseEntity.ok(messageBto);
}
} }
package com.tykj.dev.device.repair.subject.domin; package com.tykj.dev.device.repair.subject.domin;
import com.tykj.dev.device.file.entity.FileRet; import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo; import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -262,4 +263,8 @@ public class RepairBackBill { ...@@ -262,4 +263,8 @@ public class RepairBackBill {
@ApiModelProperty("任务id") @ApiModelProperty("任务id")
@Transient @Transient
private Integer taskId; private Integer taskId;
@ApiModelProperty(value = "装备集合")
@Transient
private List<DeviceLibrary> deviceLibraries;
} }
package com.tykj.dev.device.repair.subject.domin; package com.tykj.dev.device.repair.subject.domin;
import com.tykj.dev.device.file.entity.FileRet; import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo; import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -250,4 +251,8 @@ public class RepairSendBill { ...@@ -250,4 +251,8 @@ public class RepairSendBill {
@Transient @Transient
private List<FileRet> receiveFileList = new ArrayList<>(); private List<FileRet> receiveFileList = new ArrayList<>();
@ApiModelProperty(value = "装备集合")
@Transient
private List<DeviceLibrary> deviceLibraries;
} }
...@@ -659,18 +659,34 @@ public class SelfCheckController { ...@@ -659,18 +659,34 @@ public class SelfCheckController {
return ResponseEntity.ok("ok"); return ResponseEntity.ok("ok");
} }
// @ApiOperation(value = "查询时间段系统发其自查任务", notes = "可以通过这个接口查询自查任务详情")
// @PostMapping(value = "/findBySystem")
// public List<Task> findBySystem(Date date) {
// //查询当前时间之前的系统自查(当前单位)
// String currentUserUnitName = userUtils.getCurrentUserUnitName();
// List<SelfCheckBill> byDate = selfExaminationBillService.findByDate(date, currentUserUnitName);
//
// List<Task> allByBillAndBusinessTypeAndOwnUnit = new ArrayList<>();
// //通过billId和businessType 和 ownUnit
// for (SelfCheckBill selfCheckBill : byDate) {
// allByBillAndBusinessTypeAndOwnUnit = taskService.findAllByBillAndBusinessTypeAndOwnUnit(selfCheckBill.getId(), 4, userUtils.getCurrentUnitId());
// }
// return allByBillAndBusinessTypeAndOwnUnit;
// }
@ApiOperation(value = "查询时间段系统发其自查任务", notes = "可以通过这个接口查询自查任务详情") @ApiOperation(value = "查询时间段系统发其自查任务", notes = "可以通过这个接口查询自查任务详情")
@PostMapping(value = "/findBySystem") @PostMapping(value = "/findBySystem1")
public List<Task> findBySystem(Date date) { public void findBySystem1() {
//查询当前时间之前的系统自查(当前单位)
String currentUserUnitName = userUtils.getCurrentUserUnitName();
List<SelfCheckBill> byDate = selfExaminationBillService.findByDate(date, currentUserUnitName);
List<Task> allByBillAndBusinessTypeAndOwnUnit = new ArrayList<>();
//通过billId和businessType 和 ownUnit //通过billId和businessType 和 ownUnit
for (SelfCheckBill selfCheckBill : byDate) { List<Task> allByBillAndBusinessTypeAndOwnUnit = taskService.findAllByBillAndBusinessTypeAndOwnUnit(4, userUtils.getCurrentUnitId());
allByBillAndBusinessTypeAndOwnUnit = taskService.findAllByBillAndBusinessTypeAndOwnUnit(selfCheckBill.getId(), 4, userUtils.getCurrentUnitId()); System.out.println("allByBillAndBusinessTypeAndOwnUnit = " + allByBillAndBusinessTypeAndOwnUnit);
if (allByBillAndBusinessTypeAndOwnUnit.size()>0){
for (Task task : allByBillAndBusinessTypeAndOwnUnit) {
taskService.moveToArchive(task.parse2Bto());
//删除
selfCheckBillService.delete(task.getBillId());
}
} }
return allByBillAndBusinessTypeAndOwnUnit;
} }
} }
...@@ -15,7 +15,6 @@ import java.util.List; ...@@ -15,7 +15,6 @@ import java.util.List;
public interface SelfCheckBillDao extends JpaRepository<SelfCheckBill, Integer>, JpaSpecificationExecutor<SelfCheckBill> { public interface SelfCheckBillDao extends JpaRepository<SelfCheckBill, Integer>, JpaSpecificationExecutor<SelfCheckBill> {
// @Query("select o from SelfCheckBill o where o.createTime <= :startTime) // @Query("select o from SelfCheckBill o where o.createTime <= :startTime)
//// List<SelfCheckBill> findall(String unitName, Date startTime); //// List<SelfCheckBill> findall(String unitName, Date startTime);
// List<SelfCheckBill> findAll
List<SelfCheckBill> findAllByCreateTimeAfterAndCheckUnitAndCheckStatusAndCreateUserId(Date date,String unitName,Integer status,Integer userId); List<SelfCheckBill> findAllByCreateTimeAfterAndCheckUnitAndCheckStatusAndCreateUserId(Date date,String unitName,Integer status,Integer userId);
} }
...@@ -33,4 +33,6 @@ public interface SelfCheckBillService { ...@@ -33,4 +33,6 @@ public interface SelfCheckBillService {
* 根据核查完成时间去查询当前单位系统发起的自查任务 * 根据核查完成时间去查询当前单位系统发起的自查任务
*/ */
List<SelfCheckBill> findByDate(Date date,String unitName); List<SelfCheckBill> findByDate(Date date,String unitName);
List<SelfCheckBill> findBySystem(String unitName);
} }
...@@ -106,6 +106,13 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService { ...@@ -106,6 +106,13 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
return selfExaminationBillDao.findAllByCreateTimeAfterAndCheckUnitAndCheckStatusAndCreateUserId(date,unitName,3,null); return selfExaminationBillDao.findAllByCreateTimeAfterAndCheckUnitAndCheckStatusAndCreateUserId(date,unitName,3,null);
} }
@Override
public List<SelfCheckBill> findBySystem(String unitName) {
PredicateBuilder<SelfCheckBill> builder = Specifications.and();
builder.eq("checkUnit",unitName);
return selfExaminationBillDao.findAll(builder.build());
}
private Specification<SelfCheckBill> getSelectSpecification(SelfCheckSelectVo selfCheckSelectVo) { private Specification<SelfCheckBill> getSelectSpecification(SelfCheckSelectVo selfCheckSelectVo) {
PredicateBuilder<SelfCheckBill> predicateBuilder = Specifications.and(); PredicateBuilder<SelfCheckBill> predicateBuilder = Specifications.and();
predicateBuilder.eq("checkUnit",userUtils.getCurrentUserUnitName()); predicateBuilder.eq("checkUnit",userUtils.getCurrentUserUnitName());
......
...@@ -88,6 +88,6 @@ public interface TaskDao extends JpaRepository<Task, Integer>, JpaSpecificationE ...@@ -88,6 +88,6 @@ public interface TaskDao extends JpaRepository<Task, Integer>, JpaSpecificationE
Task findByParentTaskId(Integer parentTaskId); Task findByParentTaskId(Integer parentTaskId);
//zsp //zsp
List<Task> findAllByBillIdAndBusinessTypeAndOwnUnit(Integer billId, Integer businessType, Integer ownUnit); List<Task> findAllByBusinessTypeAndOwnUnitAndCustomInfo( Integer businessType, Integer ownUnit,String customInfo);
} }
...@@ -236,5 +236,5 @@ public interface TaskService { ...@@ -236,5 +236,5 @@ public interface TaskService {
List<TaskBto> findAllByBillIdAndBusinessType2(Integer billId,Integer businessType); List<TaskBto> findAllByBillIdAndBusinessType2(Integer billId,Integer businessType);
List<Task> findAllByBillAndBusinessTypeAndOwnUnit(Integer billId,Integer businessType,Integer ownUnit); List<Task> findAllByBillAndBusinessTypeAndOwnUnit(Integer businessType,Integer ownUnit);
} }
...@@ -1145,8 +1145,8 @@ public class TaskServiceImpl implements TaskService { ...@@ -1145,8 +1145,8 @@ public class TaskServiceImpl implements TaskService {
} }
@Override @Override
public List<Task> findAllByBillAndBusinessTypeAndOwnUnit(Integer billId,Integer businessType,Integer ownUnit) { public List<Task> findAllByBillAndBusinessTypeAndOwnUnit(Integer businessType,Integer ownUnit) {
return taskDao.findAllByBillIdAndBusinessTypeAndOwnUnit(billId,businessType,ownUnit); return taskDao.findAllByBusinessTypeAndOwnUnitAndCustomInfo(businessType,ownUnit,null);
} }
@Override @Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论