提交 e6052266 authored 作者: zhoushaopan's avatar zhoushaopan

[多模块]修改多个代码

上级 2ffcd1d4
......@@ -216,13 +216,14 @@ public class AllotBillController {
if (allotBillSaveVo.getAllotType() == 1) {
//直接发起
if (allotBillSaveVo.getTaskId() == null) {
TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit(), null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
// TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit(), null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, "["+allotBillSaveVo.getReceiveUnit()+"]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件" , null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
saveEntity = taskService.start(taskBto);
}
//从草稿发起
else {
TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId());
taskBto.setTitle(allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit());
taskBto.setTitle("["+allotBillSaveVo.getReceiveUnit() + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件");
//添加当前操作人为涉及人员
TaskBto taskBto1 = taskService.addInvolveUser(taskBto, userId);
//任务所属单位改为收件单位
......@@ -231,20 +232,20 @@ public class AllotBillController {
saveEntity = taskService.moveToSpecial(taskBto1, StatusEnum.ALLOTING, 0);
}
//生成发件方上传配发单的子任务
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit(), saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, Collections.singletonList(0));
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "["+allotBillSaveVo.getReceiveUnit() + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, Collections.singletonList(0));
taskService.start(taskBto2);
}
//横向配发
else {
//直接发起
if (allotBillSaveVo.getTaskId() == null) {
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id, allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit(), null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 1, "country", userIds);
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id, "["+allotBillSaveVo.getReceiveUnit() + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 1, "country", userIds);
saveEntity = taskService.start(taskBto2);
}
//从草稿发起
else {
TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId());
taskBto.setTitle(allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit());
taskBto.setTitle("["+allotBillSaveVo.getReceiveUnit() + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件");
taskBto.setCustomInfo("country");
//添加当前操作人为涉及人员
TaskBto taskBto1 = taskService.addInvolveUser(taskBto, userId);
......@@ -497,7 +498,7 @@ public class AllotBillController {
allotBill1.setSendUseraId(userId);
AllotBill allotBill = allotBillService.addEntity(allotBill1);
//发起草稿任务
TaskBto taskBto = new TaskBto(StatusEnum.ALLOT_DRAFT.id, allotBillSaveVo.getSendUnit() + "配发型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件至" + allotBillSaveVo.getReceiveUnit(), null, ".", allotBill.getId(), 3, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.ALLOT_DRAFT.id, "["+allotBillSaveVo.getReceiveUnit()+ "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件", null, ".", allotBill.getId(), 3, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto1 = taskService.start(taskBto);
//返回保存成功的id
Integer id = taskBto1.getId();
......
......@@ -145,7 +145,7 @@ public class BackController {
//直接发起
if (allotBillSaveVo.getTaskId()==null) {
TaskBto taskBto = new TaskBto(StatusEnum.ALLOT_BACKING.id, allotBillSaveVo.getSendUnit()+"退回型号"+StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"的装备共有"+allotBillSaveVo.getAllotCount()+"件至"+allotBillSaveVo.getReceiveUnit(), null, ".", billId, 22, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.ALLOT_BACKING.id, "["+allotBillSaveVo.getReceiveUnit()+"]型号"+StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"的装备共有"+allotBillSaveVo.getAllotCount()+"件", null, ".", billId, 22, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
saveEntity = taskService.start(taskBto);
}
//从草稿发起
......@@ -159,7 +159,7 @@ public class BackController {
saveEntity = taskService.moveToSpecial(taskBto1,StatusEnum.ALLOT_BACKING,0);
}
//生成发件方上传退回单的子任务
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_BACK_FILE_2.id, allotBillSaveVo.getSendUnit()+"退回型号"+StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"的装备共有"+allotBillSaveVo.getAllotCount()+"件至"+allotBillSaveVo.getReceiveUnit(), saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 22, userPublicService.findUnitIdByName(allotBackBill1.getSendUnit()), 0, null, Collections.singletonList(0));
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_BACK_FILE_2.id, allotBillSaveVo.getSendUnit()+"]型号"+StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"的装备共有"+allotBillSaveVo.getAllotCount()+"件至"+allotBillSaveVo.getReceiveUnit(), saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 22, userPublicService.findUnitIdByName(allotBackBill1.getSendUnit()), 0, null, Collections.singletonList(0));
taskService.start(taskBto2);
List<FileVo> fileVoList = new ArrayList<>();
//存装备日志
......@@ -498,7 +498,7 @@ public class BackController {
allotBackBill.setSendUseraId(userId);
AllotBackBill allotBackBill1 = allotBackBillService.addEntity(allotBackBill);
//发起草稿任务
TaskBto taskBto = new TaskBto(StatusEnum.BACK_DRAFT.id, allotBillSaveVo.getSendUnit()+"退回型号"+StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"的装备共有"+allotBillSaveVo.getAllotCount()+"件至"+allotBillSaveVo.getReceiveUnit(), null, ".", allotBackBill1.getId(), 22, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto = new TaskBto(StatusEnum.BACK_DRAFT.id, "["+allotBillSaveVo.getReceiveUnit()+"]型号"+StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList()))+"的装备共有"+allotBillSaveVo.getAllotCount()+"件", null, ".", allotBackBill1.getId(), 22, userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto1 = taskService.start(taskBto);
//返回保存成功的id
Integer id = taskBto1.getId();
......
......@@ -358,6 +358,10 @@ public enum LogType {
ALLOT_BACK_19(166,ALLOT_BACK.id, ORIGIN_STATUS.id, WAIT_UPLOAD_BACK_FILE_2.id, "待上传回执单"),
ALLOT_BACK_20(167,ALLOT_BACK.id, ALLOT_BACKING.id, BACK_SIGN_WAIT_CONFIRM.id, "申请签章待审核"),
REPAIR_BACK_32(168,REPAIR_BACK.id, REPAIR_BACK_SIGN_WAIT_CONFIRM.id, WAIT_BACK_RECEIVE.id, "等待接收维修退回装备"),
//zsp: [业务操作日志]存储失败:找不到业务类型为+4,旧状态为0,新状态为400的日志模板
SELF_CHECK_7(169, SELF_CHECK.id,ORIGIN_STATUS.id,WAIT_SELF_CHECK.id,"待自查任务"),
//[业务操作日志]存储失败:找不到业务类型为+4,旧状态为400,新状态为8888的日志模板
SELF_CHECK_8(170,SELF_CHECK.id,WAIT_SELF_CHECK.id,ARCHIVE.id,"核查结束,系统发起的自查自动结束"),
;
public Integer id;
......
......@@ -214,7 +214,8 @@ public class DeviceCheckController {
CheckStatVo ctVo = transUtil.checkStatDo2Vo(ct);
linkVo.setTitle(ctVo.getTitle());
LocalDateTime endTime = ctVo.getEndTime();
//新增修改时间
LocalDateTime updateTime = ctVo.getUpdateTime();
linkVo.setEndTime(ctVo.getEndTime().toLocalDate());
List<LinkCheckDetail> lcdList = new ArrayList<>();
List<LinkExamDetail> ledList = new ArrayList<>();
......@@ -267,7 +268,7 @@ public class DeviceCheckController {
String areaName = auService.findOne(AuExample.UnitId, child.getOwnUnit()).getName();
CheckAreaStatVo cas = combineCaList(totalList, areaName);
LinkCheckDetail lcd = rev2lcd(child, endTime, cas.reverse());
LinkCheckDetail lcd = rev2lcd(child, endTime, updateTime,cas.reverse());
lcd.setCheckUnit(unitName);
if (child.getTitle().contains("统计确认待办任务")) {
lcd.setCheckSituation("统计确认待办任务");
......@@ -306,7 +307,7 @@ public class DeviceCheckController {
// .reduce(CheckAreaStatVo::combine)
// .orElse(new CheckAreaStatVo("默认地区", 0, 0, 0, 0, 0, 0));
LinkExamDetail led = rev2led(child, endTime, cas.reverse());
LinkExamDetail led = rev2led(child, endTime, updateTime,cas.reverse());
led.setCheckUnit(unitName);
ledList.add(led);
......@@ -379,7 +380,7 @@ public class DeviceCheckController {
// .reduce(CheckAreaStatVo::combine)
// .get();
LinkExamDetail led = rev2led(child, endTime, cas.reverse());
LinkExamDetail led = rev2led(child, endTime, updateTime,cas.reverse());
led.setCheckUnit(unitName);
//设置名称
......@@ -406,7 +407,8 @@ public class DeviceCheckController {
}
private LinkCheckDetail rev2lcd(Task task, LocalDateTime endTime, RevAreaStat revAreaStat) {
//进行了更新 使用修改时间去做是否逾期判断
private LinkCheckDetail rev2lcd(Task task, LocalDateTime endTime, LocalDateTime updateTime,RevAreaStat revAreaStat) {
LinkCheckDetail lcd = new LinkCheckDetail();
lcd.setId(task.getBillId());
......@@ -436,7 +438,10 @@ public class DeviceCheckController {
// }
// } else {
if (task.getBillStatus() == 9999) {
if (endTime.isBefore(LocalDateTime.now())) {
// if (endTime.isBefore(LocalDateTime.now())) {
// lcd.setCheckResult("逾期完成");
// }
if (endTime.isBefore(updateTime)) {
lcd.setCheckResult("逾期完成");
} else {
lcd.setCheckResult("完成");
......@@ -452,7 +457,10 @@ public class DeviceCheckController {
} else if (revAreaStat.getComProgress() == 2 && task.getBillStatus() % 10 == 1) {
lcd.setCheckResult("进行中");
} else if (revAreaStat.getComProgress() == 2) {
if (endTime.isBefore(LocalDateTime.now())) {
// if (endTime.isBefore(LocalDateTime.now())) {
// lcd.setCheckResult("逾期完成");
// }
if (endTime.isBefore(updateTime)) {
lcd.setCheckResult("逾期完成");
} else {
lcd.setCheckResult("完成");
......@@ -467,8 +475,8 @@ public class DeviceCheckController {
return lcd;
}
private LinkExamDetail rev2led(Task task, LocalDateTime endTime, RevAreaStat revAreaStat) {
//修改
private LinkExamDetail rev2led(Task task, LocalDateTime endTime, LocalDateTime updateTime,RevAreaStat revAreaStat) {
LinkExamDetail led = new LinkExamDetail();
led.setId(task.getBillId());
......@@ -489,7 +497,10 @@ public class DeviceCheckController {
//核查结果
if (task.getBillStatus() == 9999) {
if (endTime.isBefore(LocalDateTime.now())) {
// if (endTime.isBefore(LocalDateTime.now())) {
// led.setCheckResult("逾期完成");
// }
if (endTime.isBefore(updateTime)) {
led.setCheckResult("逾期完成");
} else {
led.setCheckResult("完成");
......
......@@ -103,7 +103,6 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
if (selectAreaId == null) {
List<DeviceLibrary> libraryEntities;
//unitId为null,按照父子结构查询返回当前单位的所有装备
long start = System.currentTimeMillis();
if (selectUnitId == null) {
libraryEntities = getList2(deviceLibrarySelectVo);
}
......@@ -141,7 +140,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
//查询该区域下的所有单位
units = userPublicService.findAllUnitNameByAreaId(selectAreaId);
}
//市或县筛选出装备所属单位在units列表中的装备
//市或县筛选出装备所属单位在units列表中的装备 zsp:或者所在
if (selectLevel == 3 || selectLevel == 2 || selectLevel ==4) {
List<DeviceLibrary> libraryEntities = getAllList(deviceLibrarySelectVo).stream()
.filter(deviceLibraryEntity -> units.contains(deviceLibraryEntity.getOwnUnit()))
......@@ -614,12 +613,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
@Override
public List<DeviceLibrary> getAllList(DeviceLibrarySelectVo deviceLibrarySelectVo) {
long l = System.currentTimeMillis();
List<DeviceLibrary> all = deviceLibraryDao.findAll(getSelectSpecification4(deviceLibrarySelectVo), deviceLibrarySelectVo.getPageable().getSort());
// return deviceLibraryDao.findAll(getSelectSpecification4(deviceLibrarySelectVo),deviceLibrarySelectVo.getPageable().getSort());
System.out.println(System.currentTimeMillis()-l);
System.out.println("all");
return all;
return deviceLibraryDao.findAll(getSelectSpecification4(deviceLibrarySelectVo),deviceLibrarySelectVo.getPageable().getSort());
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论