提交 3f901863 authored 作者: 邓砥奕's avatar 邓砥奕

修改bug

上级 cd3358fa
......@@ -36,7 +36,7 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
@Override
public AllotBackBill update(AllotBackBill allotBackBill) {
blockChainUtil.appendHash(JacksonUtil.toJSon(allotBackBill),allotBackBill.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(allotBackBill),allotBackBill.getRecordId());
return allotBackBillDao.save(allotBackBill);
}
......
......@@ -47,7 +47,7 @@ public class AllotBillServiceImpl implements AllotBillService {
@Override
public AllotBill update(AllotBill allotBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(allotBillEntity),allotBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(allotBillEntity),allotBillEntity.getRecordId());
return allotBillDao.save(allotBillEntity);
}
......
......@@ -34,7 +34,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
@Override
public DeviceApplyBill update(DeviceApplyBill deviceApplyBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceApplyBillEntity),deviceApplyBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceApplyBillEntity),deviceApplyBillEntity.getRecordId());
return deviceApplyBillDao.save(deviceApplyBillEntity);
}
......
package com.tykj.dev.blockcha.subject.entity;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -13,5 +14,6 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class BcHashData {
@JSONField(name = "recordID")
private String recordID;
}
......@@ -4,12 +4,9 @@ import com.tykj.dev.blockcha.conf.BcUrl;
import com.tykj.dev.blockcha.subject.entity.*;
import com.tykj.dev.blockcha.subject.service.BlockChainUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import sun.applet.Main;
import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
......
......@@ -85,7 +85,7 @@ public class DeviceDestroyBillServiceImpl implements DeviceDestroyBillService {
@Override
public DeviceDestroyBill updateEntity(DeviceDestroyBill deviceDestoryBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceDestoryBillEntity),deviceDestoryBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceDestoryBillEntity),deviceDestoryBillEntity.getRecordId());
return deviceDestroyBillDao.save(deviceDestoryBillEntity);
}
......
......@@ -33,7 +33,7 @@ public class DeviceChangeServiceImpl implements DeviceChangeService {
BcHash bcText = blockChainUtil.sendHash(1000, JacksonUtil.toJSon(deviceChange1));
String recordId = bcText.getData().getRecordID();
deviceChange1.setRecordId(recordId);
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceChange1),deviceChange1.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceChange1),deviceChange1.getRecordId());
return deviceChangeDao.save(deviceChange1);
}
......
......@@ -384,7 +384,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
@Override
public DeviceLibrary update(DeviceLibrary deviceLibraryEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceLibraryEntity),deviceLibraryEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceLibraryEntity),deviceLibraryEntity.getRecordId());
return deviceLibraryDao.save(deviceLibraryEntity);
}
......
......@@ -33,7 +33,7 @@ public class DeviceLogServiceImpl implements DeviceLogService {
BcHash bcText = blockChainUtil.sendHash(1000, JacksonUtil.toJSon(deviceLogEntity));
String recordId = bcText.getData().getRecordID();
deviceLogEntity.setRecordId(recordId);
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceLogEntity),deviceLogEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceLogEntity),deviceLogEntity.getRecordId());
return deviceLogDao.save(deviceLogEntity).parse2Dto();
}
......
......@@ -40,7 +40,7 @@ public class MatchingDeviceBillServiceImpl implements MatchingDeviceBillService
@Override
public MatchingDeviceBill update(MatchingDeviceBill matchingDeviceBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(matchingDeviceBillEntity),matchingDeviceBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(matchingDeviceBillEntity),matchingDeviceBillEntity.getRecordId());
return matchingDeviceBillDao.save(matchingDeviceBillEntity);
}
}
......@@ -59,7 +59,7 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
@Override
public MatchingDeviceLibrary update(MatchingDeviceLibrary matchingDeviceLibraryEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(matchingDeviceLibraryEntity),matchingDeviceLibraryEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(matchingDeviceLibraryEntity),matchingDeviceLibraryEntity.getRecordId());
return matchingDeviceLibraryDao.save(matchingDeviceLibraryEntity);
}
......
......@@ -104,7 +104,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
@Override
public PackingLibrary update(PackingLibrary packingLibraryEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(packingLibraryEntity),packingLibraryEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(packingLibraryEntity),packingLibraryEntity.getRecordId());
return packingLibraryDao.save(packingLibraryEntity);
}
......
......@@ -50,7 +50,7 @@ public class RepairBackBillServiceImpl implements RepairBackBillService {
@Override
public RepairBackBill update(RepairBackBill deviceRepairBackBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRepairBackBillEntity),deviceRepairBackBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRepairBackBillEntity),deviceRepairBackBillEntity.getRecordId());
return deviceRepairBackBillDao.save(deviceRepairBackBillEntity);
}
......
......@@ -57,7 +57,7 @@ public class RepairBillServiceImpl implements RepairBillService {
@Override
public RepairBill update(RepairBill deviceRepairBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRepairBillEntity),deviceRepairBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRepairBillEntity),deviceRepairBillEntity.getRecordId());
return deviceRepairBillDao.save(deviceRepairBillEntity);
}
......
......@@ -50,7 +50,7 @@ public class RepairDetailServiceImpl implements RepairDetailService {
@Override
public RepairDetail update(RepairDetail deviceRepairDetailEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRepairDetailEntity),deviceRepairDetailEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRepairDetailEntity),deviceRepairDetailEntity.getRecordId());
return deviceRepairDetailDao.save(deviceRepairDetailEntity);
}
......
......@@ -64,7 +64,7 @@ public class RepairSendBillServiceImpl implements RepairSendBillService {
@Override
public RepairSendBill update(RepairSendBill deviceRepairSendBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRepairSendBillEntity),deviceRepairSendBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRepairSendBillEntity),deviceRepairSendBillEntity.getRecordId());
return deviceRepairSendBillDao.save(deviceRepairSendBillEntity);
}
......
......@@ -51,7 +51,7 @@ public class DeviceRetiredBillServiceImpl implements DeviceRetiredBillService {
@Override
public DeviceRetiredBill update(DeviceRetiredBill deviceRetiredBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRetiredBillEntity),deviceRetiredBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceRetiredBillEntity),deviceRetiredBillEntity.getRecordId());
return deviceRetiredBillDao.save(deviceRetiredBillEntity);
}
......
......@@ -28,7 +28,7 @@ public class AccessControlNameServiceImpl implements AccessControlNameService {
BcHash bcText = blockChainUtil.sendHash(1000, JacksonUtil.toJSon(accessControlName1));
String recordId = bcText.getData().getRecordID();
accessControlName1.setRecordId(recordId);
blockChainUtil.appendHash(JacksonUtil.toJSon(accessControlName1),accessControlName1.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(accessControlName1),accessControlName1.getRecordId());
return accessControlNameDao.save(accessControlName1);
}
......
......@@ -38,7 +38,7 @@ public class InputOutputDeviceServiceImpl implements InputOutputDeviceService {
BcHash bcText = blockChainUtil.sendHash(1000, JacksonUtil.toJSon(inputOutputDevice1));
String recordId = bcText.getData().getRecordID();
inputOutputDevice1.setRecordId(recordId);
blockChainUtil.appendHash(JacksonUtil.toJSon(inputOutputDevice1),inputOutputDevice1.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(inputOutputDevice1),inputOutputDevice1.getRecordId());
return inputOutputDeviceDao.save(inputOutputDevice1);
}
......
......@@ -30,7 +30,7 @@ public class LibraryWarningLogDetailServiceImp implements LibraryWarningLogDetai
BcHash bcText = blockChainUtil.sendHash(1000, JacksonUtil.toJSon(libraryWarningLogDetail1));
String recordId = bcText.getData().getRecordID();
libraryWarningLogDetail1.setRecordId(recordId);
blockChainUtil.appendHash(JacksonUtil.toJSon(libraryWarningLogDetail1),libraryWarningLogDetail1.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(libraryWarningLogDetail1),libraryWarningLogDetail1.getRecordId());
return libraryWarningLogDetailDao.save(libraryWarningLogDetail1);
}
}
......@@ -97,7 +97,7 @@ public class LibraryWarningLogServiceImpl implements LibraryWarningLogService {
@Override
public Integer updateDetailHandleResult(WarningHandleVo warningHandleVo) {
LibraryWarningLogDetail detailEntity = libraryWarningLogDetailDao.getOne(warningHandleVo.getWarningDetailId());
LibraryWarningLogDetail detailEntity = libraryWarningLogDetailDao.findById(warningHandleVo.getWarningDetailId()).get();
detailEntity.setHandleResult(warningHandleVo.getHandleResult());
detailEntity.setWarningHandle(1);
LibraryWarningLogDetail save = libraryWarningLogDetailDao.save(detailEntity);
......@@ -129,7 +129,7 @@ public class LibraryWarningLogServiceImpl implements LibraryWarningLogService {
@Override
public LibraryWarningLog update(LibraryWarningLog libraryWarningLog) {
blockChainUtil.appendHash(JacksonUtil.toJSon(libraryWarningLog),libraryWarningLog.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(libraryWarningLog),libraryWarningLog.getRecordId());
return libraryWarningLogDao.save(libraryWarningLog);
}
......
......@@ -39,7 +39,7 @@ public class RfidChangeBillServiceImpl implements RfidChangeBillService {
@Override
public RfidChangeBill updateEntity(RfidChangeBill libraryWarningLogEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(libraryWarningLogEntity),libraryWarningLogEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(libraryWarningLogEntity),libraryWarningLogEntity.getRecordId());
return rfidChangeBillDao.save(libraryWarningLogEntity);
}
......
......@@ -52,7 +52,7 @@ public class RfidChangeLogServiceImpl implements RfidChangeLogService {
@Override
public RfidChangeLog updateEntity(RfidChangeLog rfidChangeLog) {
blockChainUtil.appendHash(JacksonUtil.toJSon(rfidChangeLog),rfidChangeLog.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(rfidChangeLog),rfidChangeLog.getRecordId());
return rfidChangeLogDao.save(rfidChangeLog);
}
......
......@@ -89,7 +89,7 @@ public class RfidServiceImpl implements RfidService {
Connection connection = new TcpConnection("192.168.0.222", 6101);
connection.open();
printer = ZebraPrinterFactory.getInstance(connection);
String demoFile = createDemoFile(printer.getPrinterControlLanguage(),makeNumber,deviceNumber, content, 53, 80);
String demoFile = createDemoFile(printer.getPrinterControlLanguage(),makeNumber,deviceNumber, content, 60, 55);
printer.sendFileContents(demoFile);
} catch (ConnectionException e) {
throw new ApiException(ResultUtil.failed("未找到对应的打印机"));
......@@ -145,17 +145,17 @@ public class RfidServiceImpl implements RfidService {
"^LS0\n" +
"\n" +
"^LH" + marginLeft + "," + marginTop + "\n" +
"^A1N,30,,E:SIM000.FNT^FR^FD\n" +
"^LH"+marginLeft+",+"+marginTop +
"^FDxx测试^FS\n" +
"^A1N,30,,E:SIM000.FNT^FR^FD\n" +
"^FO0,50^FD生产号:"+makeNumber+"^FS\n" +
"^A1N,30,,E:SIM000.FNT^FR^FD\n" +
"^FO0,90^FD装备号:"+deviceNumber+"^FS\n" +
"^A1N,32,,E:SIM000.FNT^FR^FD\n" +
"^FO0,130^FD表面号:^FS"+
"^A1N,32,,E:SIM000.FNT^FR^FD\n" +
"^FO0,170^FD"+content+"^FS"+
// "^A1N,22,,E:SIM000.FNT^FR^FD\n" +
// "^LH"+marginLeft+",+"+marginTop +
// "^FDxx测试^FS\n" +
"^A1N,25,,E:SIM000.FNT^FR^FD\n" +
"^FO0,0^FD生产号:"+makeNumber+"^FS\n" +
"^A1N,25,,E:SIM000.FNT^FR^FD\n" +
"^FO0,30^FD装备号:"+deviceNumber+"^FS\n" +
"^A1N,25,,E:SIM000.FNT^FR^FD\n" +
"^FO0,60^FD表面号:^FS"+
"^A1N,25,,E:SIM000.FNT^FR^FD\n" +
"^FO0,90^FD"+content+"^FS"+
"^PQ1,0,1,Y\n" +
"^XZ\n" +
"^XZ").getBytes();
......
......@@ -52,7 +52,7 @@ public class ScrapBillServiceImpl implements ScrapBillService {
@Override
public ScrapBill update(ScrapBill scrapBill) {
blockChainUtil.appendHash(JacksonUtil.toJSon(scrapBill),scrapBill.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(scrapBill),scrapBill.getRecordId());
return scrapBillDao.save(scrapBill);
}
......
......@@ -48,7 +48,7 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
@Override
public SelfCheckBill update(SelfCheckBill selfExaminationBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(selfExaminationBillEntity),selfExaminationBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(selfExaminationBillEntity),selfExaminationBillEntity.getRecordId());
return selfExaminationBillDao.save(selfExaminationBillEntity);
}
......
package com.tykj.dev.device.storage.controller;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.service.DeviceLogService;
import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
......@@ -24,6 +25,7 @@ import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.device.user.util.UserUtils;
import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.DeviceSeqUtil;
import com.tykj.dev.misc.utils.ResultUtil;
import com.tykj.dev.misc.utils.StringSplitUtil;
......@@ -78,6 +80,9 @@ public class StorageBillController {
@Autowired
private MessageService messageService;
@Autowired
private DeviceLibraryDao deviceLibraryDao;
@ApiOperation(value = "获取序列号区间列表", notes = "可以通过这个接口获取序列号区间列表")
@GetMapping(value = "/getSeq/{num}/{string}")
public ResponseEntity getSeq(@PathVariable("string") String s,@PathVariable("num") Integer num){
......@@ -149,37 +154,42 @@ public class StorageBillController {
//3.存装备
Integer parentId = null;
for (DeviceLibrarySaveVo d : storageBillSaveVo.getDeviceLibrarySaveVoList()) {
DeviceLibrary saveEntity = new DeviceLibrary();
DeviceLibrary deviceLibraryEntity = new DeviceLibrary();
PackingLibrary packingLibraryEntity = packingLibraryService.getOne(d.getPackingId());
BeanUtils.copyProperties(packingLibraryEntity, deviceLibraryEntity);
deviceLibraryEntity.setId(null);
deviceLibraryEntity.setLifeStatus(2);
BeanUtils.copyProperties(d, deviceLibraryEntity);
deviceLibraryEntity.setStorageBillId(storageBillId);
deviceLibraryEntity.setLocationUnit(userUtils.getCurrentUserUnitName());
deviceLibraryEntity.setOwnUnit(userUtils.getCurrentUserUnitName());
deviceLibraryEntity.setPartParentId(null);
//如果不是单独的配件,设置父装备id为上一个装备的id
if (d.getIsSinglePart() == 0) {
if (deviceLibraryEntity.getIsPart() == 0) {
saveEntity = deviceLibraryService.addEntity(deviceLibraryEntity);
parentId = saveEntity.getId();
if (deviceLibraryDao.getAllByRfidCardId(d.getRfidCardId()).size()==0) {
DeviceLibrary saveEntity = new DeviceLibrary();
DeviceLibrary deviceLibraryEntity = new DeviceLibrary();
PackingLibrary packingLibraryEntity = packingLibraryService.getOne(d.getPackingId());
BeanUtils.copyProperties(packingLibraryEntity, deviceLibraryEntity);
deviceLibraryEntity.setId(null);
deviceLibraryEntity.setLifeStatus(2);
BeanUtils.copyProperties(d, deviceLibraryEntity);
deviceLibraryEntity.setStorageBillId(storageBillId);
deviceLibraryEntity.setLocationUnit(userUtils.getCurrentUserUnitName());
deviceLibraryEntity.setOwnUnit(userUtils.getCurrentUserUnitName());
deviceLibraryEntity.setPartParentId(null);
//如果不是单独的配件,设置父装备id为上一个装备的id
if (d.getIsSinglePart() == 0) {
if (deviceLibraryEntity.getIsPart() == 0) {
saveEntity = deviceLibraryService.addEntity(deviceLibraryEntity);
parentId = saveEntity.getId();
}
if (deviceLibraryEntity.getIsPart() == 1) {
deviceLibraryEntity.setPartParentId(parentId);
saveEntity = deviceLibraryService.addEntity(deviceLibraryEntity);
}
}
if (deviceLibraryEntity.getIsPart() == 1) {
deviceLibraryEntity.setPartParentId(parentId);
//如果是单独的配件,不用设置父装备id
else {
saveEntity = deviceLibraryService.addEntity(deviceLibraryEntity);
}
stringBuffer.append(saveEntity.getId());
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(saveEntity.getId(), "发起装备入库", fileVoList);
deviceLogService.addLog(deviceLogDto);
stringBuffer.append("x");
}
//如果是单独的配件,不用设置父装备id
else {
saveEntity = deviceLibraryService.addEntity(deviceLibraryEntity);
throw new ApiException("系统中已存在rfid卡号为"+d.getRfidCardId()+"的装备!");
}
stringBuffer.append(saveEntity.getId());
//存装备日志
DeviceLogDto deviceLogDto = new DeviceLogDto(saveEntity.getId(), "发起装备入库", fileVoList);
deviceLogService.addLog(deviceLogDto);
stringBuffer.append("x");
}
//4.更新入库单入库详情
storageBillEntity.setStorageDetail(stringBuffer.toString());
......
......@@ -47,7 +47,7 @@ public class StorageBillServiceImpl implements StorageBillService {
@Override
public StorageBill update(StorageBill storageBillEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(storageBillEntity),storageBillEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(storageBillEntity),storageBillEntity.getRecordId());
return storageBillDao.save(storageBillEntity);
}
......
......@@ -6,10 +6,7 @@ import com.tykj.dev.device.task.service.TaskLogService;
import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.task.subject.domin.Task;
import com.tykj.dev.device.task.subject.vo.TaskLogUserVo;
import com.tykj.dev.device.task.subject.vo.TaskSelectVo;
import com.tykj.dev.device.task.subject.vo.TaskTopVo;
import com.tykj.dev.device.task.subject.vo.TaskUserVo;
import com.tykj.dev.device.task.subject.vo.*;
import com.tykj.dev.device.task.utils.TaskUtils;
import com.tykj.dev.device.user.util.UserUtils;
import com.tykj.dev.misc.base.BusinessEnum;
......@@ -175,4 +172,10 @@ public class TaskController {
.collect(Collectors.toList());
return ResultUtil.success(taskLogUserVoList);
}
@ApiOperation(value = "查询所有业务日志", notes = "可以通过这个接口查询业务日志")
@PostMapping("/manage/detail/logs")
public ResponseEntity selectAllLogs(@RequestBody TaskLogSelectVo taskLogSelectVo){
return ResponseEntity.ok( PageUtil.getPerPage(taskLogSelectVo.getPage(), taskLogSelectVo.getSize(), taskLogService.getAllByTime(taskLogSelectVo), taskLogSelectVo.getPageable()));
}
}
......@@ -42,7 +42,7 @@ public class TaskLogServiceImpl implements TaskLogService {
BcHash bcText = blockChainUtil.sendHash(1000, JacksonUtil.toJSon(taskLog));
String recordId = bcText.getData().getRecordID();
taskLog.setRecordId(recordId);
blockChainUtil.appendHash(JacksonUtil.toJSon(taskLog),taskLog.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(taskLog),taskLog.getRecordId());
return taskLogDao.save(taskLog).parse2bto();
}
......
......@@ -284,7 +284,7 @@ public class TaskServiceImpl implements TaskService {
*/
@Override
public Task update(TaskBto taskBto) {
blockChainUtil.appendHash(JacksonUtil.toJSon(taskBto.toDo()),taskBto.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(taskBto.toDo()),taskBto.getRecordId());
return taskDao.save(taskBto.toDo());
}
......@@ -584,9 +584,10 @@ public class TaskServiceImpl implements TaskService {
.filter(taskBto -> {
boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId);
// boolean involveExists = taskBto.getInvolveUserIdList().contains(userId);
boolean userConfirm2 = taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint()) == -1;
boolean pointExists = taskBto.getCurrentPoint() < taskBto.getInvolveUserIdList().size();
boolean userConfirm = userId.equals(taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint()));
return unitExists && pointExists && !userConfirm;
return unitExists && pointExists && !userConfirm && !userConfirm2;
})
.collect(Collectors.toList());
//涉及人员当前指针为-1,且所属单位为当前单位
......
package com.tykj.dev.device.task.subject.vo;
import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -11,7 +12,7 @@ import java.util.Date;
*/
@Data
@ApiModel("业务日志查询类")
public class TaskLogSelectVo {
public class TaskLogSelectVo extends CustomPage {
@ApiModelProperty(value = "发起时间", example = "2020-10-10 01:10:10")
public Date startTime;
......
......@@ -56,8 +56,8 @@ public class UserPublicServiceImpl implements UserPublicService {
@Override
public User getOne(Integer userId) {
if (userId!=null) {
Optional<User> resultEntity = userDao.findById(userId);
return resultEntity.orElse(null);
User resultEntity = userCache.findById(userId);
return resultEntity;
}else {
return new User();
}
......
......@@ -108,7 +108,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
@Override
public DeviceUseReport update(DeviceUseReport deviceUseReportEntity) {
blockChainUtil.appendHash(JacksonUtil.toJSon(deviceUseReportEntity),deviceUseReportEntity.getRecordId());
// blockChainUtil.appendHash(JacksonUtil.toJSon(deviceUseReportEntity),deviceUseReportEntity.getRecordId());
return deviceUseReportDao.save(deviceUseReportEntity);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论