提交 2a7a5d82 authored 作者: 133's avatar 133

[用户 退役 ]

上级 9ee175b5
......@@ -35,6 +35,7 @@ import com.tykj.dev.device.user.subject.service.AuService;
import com.tykj.dev.device.user.util.AuthenticationUtils;
import com.tykj.dev.misc.base.ResultObj;
import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.JacksonUtil;
import com.tykj.dev.socket.MyWebSocket;
import io.swagger.annotations.Api;
......@@ -74,6 +75,8 @@ public class DeviceCheckController {
Map<Integer,String> desMap=new HashMap<>();
Map<Integer,String> desBillMap=new HashMap<>();
@Autowired
private DeviceCheckStatDao statRepo;
@Autowired
......@@ -634,9 +637,32 @@ public class DeviceCheckController {
@GetMapping("/selectRemark/{taskId}")
public ResponseEntity selectRemark(@PathVariable Integer taskId){
TaskBto taskBto=selectProvTask(taskId);
return ResponseEntity.ok(desMap.get(taskBto.getId()));
Optional<DeviceCheckStat> optional= statRepo.findById(taskBto.getBillId());
if (optional.isPresent()){
DeviceCheckStat deviceCheckStat=optional.get();
if (deviceCheckStat.getCheckType().getId()==0){
return ResponseEntity.ok(desMap.get(taskBto.getId()));
}else {
return ResponseEntity.ok(desMap.get(taskId));
}
}else {
throw new ApiException(ResponseEntity.status(500).body("没有找到id"));
}
}
/**
* 根据taskId查询Remark
*/
@ApiOperation(value = "根据BillId查询Remark", notes = "根据taskId查询Remark")
@GetMapping("/selectRemarkBill/{billId}")
public ResponseEntity selectRemarkBill(@PathVariable Integer billId){
return ResponseEntity.ok(desBillMap.get(billId));
}
private TaskBto selectProvTask(Integer taskId){
TaskBto taskBto= taskService.get(taskId);
if (taskBto.getParentTaskId()==0){
......@@ -755,7 +781,9 @@ public class DeviceCheckController {
// 3-2 构建被查单位的 自查任务 (根据被查单位的级别来区分是县级状态是市级状态)
TaskBto checkedTask = new TaskBto(CHECK_EXAM_DETAIL_0.id, "自核查任务", cityStatTask.getId(), addNode(cityStatTask.getNodeIdDetail(), cityStatTask.getId()), CONFIRM_CHECK_DETAIL.id, detail.getId(), unit.getUnitId(), 0);
checkedTask.setCustomInfo("manual");
taskService.start(checkedTask);
checkedTask=taskService.start(checkedTask);
desBillMap.put(detail.getId(),ed.getRemark());
desMap.put(checkedTask.getId(),ed.getRemark());
}
// 4. 重新设置并保存统计账单
......
......@@ -46,4 +46,6 @@ public class DeviceNotInLibVo {
private String typeName;
private String secretLevelName;
private String lifeStatusName;
}
......@@ -296,6 +296,7 @@ public class ObjTransUtil {
//依据proofResult 判断是否是在库装备
if (proofResult == 3) {
// 非在库装备
notInLibVoList.add(toCheckNotInLibVo(device));
} else {
// 在库装备
......@@ -362,7 +363,8 @@ public class ObjTransUtil {
device.getSecretLevel(),
device.getInvisibleRangeName(),
device.getTypeName(),
device.getSecretLevelName()
device.getSecretLevelName(),
device.getLifeStatusName()
);
}
}
......
......@@ -132,25 +132,21 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
lifeStatus.add(DeviceLifeStatus.IN_TRANSIT.id);
lifeStatus.add(DeviceLifeStatus.USE.id);
lifeStatus.add(DeviceLifeStatus.SEND_BACK.id);
lifeStatus.add(DeviceLifeStatus.TO_BE_DESTROYED.id);
lifeStatus.add(DeviceLifeStatus.TO_BE_SCRAPPED.id);
List<String> directlUnderUnitNames=new ArrayList<>();
AtomicBoolean directlUnderUnit= new AtomicBoolean(false);
AtomicBoolean correspondingLevel= new AtomicBoolean(false);
deviceRepel.setFielding(StringUtils.ListToString(deviceRepel.getFieldingIds()));
deviceRepel.setFiles(FilesUtil.stringFileToList(deviceRepel.getFileRets()));
Map<String,List<Integer>> unitNameMap=new HashMap<>();
Map<String,Integer> unitNameMap=new HashMap<>();
List<String> seqNumbers=DeviceSeqUtil.selectDeviceSeqs(deviceRepel.getSeqNumbers());
if (seqNumbers.size()!=0){
log.info("申请任务触发清退任务");
deviceLibraryService.findAllBySeqNumber(seqNumbers).forEach(
deviceLibrary -> {
if (unitNameMap.containsKey(deviceLibrary.getOwnUnit())){
List<Integer> ids =unitNameMap.get(deviceLibrary.getOwnUnit());
ids.add(deviceLibrary.getId());
unitNameMap.put(deviceLibrary.getOwnUnit(),ids);
}else {
List<Integer> ids =new ArrayList<>();
ids.add(deviceLibrary.getId());
unitNameMap.put(deviceLibrary.getOwnUnit(),ids);
if (!unitNameMap.containsKey(deviceLibrary.getOwnUnit())){
unitNameMap.put(deviceLibrary.getOwnUnit(),0);
}
}
);
......@@ -878,10 +874,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail.setRepelStatus(2);
TaskBto fatherTask=taskService.get(taskBto.getParentTaskId());
taskService.moveToEnd(fatherTask);
deviceRepelDetail.setReceiveTime(new Date());
DeviceRepelDetail deviceRepelDetailFather= deviceRepelDetailService.findDeviceRepelDetail(fatherTask.getBillId());
deviceRepelDetailFather.setReceiveTime(new Date());
deviceRepelDetailService.saveDeviceRepelDetail(deviceRepelDetailFather);
RepelTaskStatistical repelTaskStatistical = repelTaskStatisticalService.findRepelTaskStatistical(fatherTask.getId(),deviceRepelDetailFather.getRepelId());
repelTaskStatistical.setTaskStatus(1);
repelTaskStatisticalService.saveRepelTaskStatistical(repelTaskStatistical);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论