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

[用户 退役 ]

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