提交 50f008d6 authored 作者: 邓砥奕's avatar 邓砥奕

更新

上级 8f78d70d
...@@ -168,14 +168,22 @@ public class AllotBillController { ...@@ -168,14 +168,22 @@ public class AllotBillController {
userIds.add(userId); userIds.add(userId);
userIds.add(0); userIds.add(0);
TaskBto saveEntity; TaskBto saveEntity;
if (allotBillSaveVo.getTaskId()==null) { //纵向
if (allotBillSaveVo.getAllotType()==2) {
if (allotBillSaveVo.getTaskId() == null) {
TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, "配发业务", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds); TaskBto taskBto = new TaskBto(StatusEnum.ALLOTING.id, "配发业务", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()), 1, null, userIds);
saveEntity = taskService.start(taskBto); saveEntity = taskService.start(taskBto);
} } else {
else {
TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId()); TaskBto taskBto = taskService.get(allotBillSaveVo.getTaskId());
taskBto.setOwnUnit(userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit())); taskBto.setOwnUnit(userPublicService.findUnitIdByName(allotBillSaveVo.getReceiveUnit()));
saveEntity = taskService.moveToSpecial(taskBto,StatusEnum.ALLOTING,0); saveEntity = taskService.moveToSpecial(taskBto, StatusEnum.ALLOTING, 0);
}
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "配发单据", saveEntity.getId(), saveEntity.getNodeIdDetail() + saveEntity.getId() + ".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, userIds);
taskService.start(taskBto2);
}
else {
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id, "配发业务", null, ".", billId, 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 1, null, userIds);
saveEntity = taskService.start(taskBto2);
} }
List<FileVo> fileVoList = new ArrayList<>(); List<FileVo> fileVoList = new ArrayList<>();
// fileVoList.add(new FileVo("出库确认单", allotBillEntity.getFileName(), allotBillEntity.getFileUrl())); // fileVoList.add(new FileVo("出库确认单", allotBillEntity.getFileName(), allotBillEntity.getFileUrl()));
...@@ -188,8 +196,15 @@ public class AllotBillController { ...@@ -188,8 +196,15 @@ public class AllotBillController {
ids.add(id); ids.add(id);
//改变装备状态 //改变装备状态
DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id); DeviceLibrary deviceLibraryEntity = deviceLibraryService.getOne(id);
if (allotBillSaveVo.getAllotType() == 2){
deviceLibraryEntity.setLifeStatus(3); deviceLibraryEntity.setLifeStatus(3);
deviceLibraryEntity.setManageStatus(0); deviceLibraryEntity.setManageStatus(0);
}
else {
deviceLibraryEntity.setLocationUnit(allotBillSaveVo.getReceiveUnit());
deviceLibraryEntity.setOwnUnit(allotBillSaveVo.getReceiveUnit());
}
deviceLibraryService.update(deviceLibraryEntity);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + allotBillEntity.getReceiveUnit() + "发起配发", fileVoList); DeviceLogDto deviceLogDto = new DeviceLogDto(id, "对" + allotBillEntity.getReceiveUnit() + "发起配发", fileVoList);
deviceLogService.addLog(deviceLogDto); deviceLogService.addLog(deviceLogDto);
} }
...@@ -198,9 +213,11 @@ public class AllotBillController { ...@@ -198,9 +213,11 @@ public class AllotBillController {
inputOutputDeviceService.addWhiteDevices(ids, userUtils.getCurrentUnitId(), 1); inputOutputDeviceService.addWhiteDevices(ids, userUtils.getCurrentUnitId(), 1);
//发送阅知信息 //发送阅知信息
List<Integer> idList = userPublicService.findOtherUser(userId); List<Integer> idList = userPublicService.findOtherUser(userId);
if (allotBillSaveVo.getAllotType()==2) {
idList.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(allotBillEntity.getReceiveUnit())).stream() idList.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(allotBillEntity.getReceiveUnit())).stream()
.map(User::getUserId) .map(User::getUserId)
.collect(Collectors.toList())); .collect(Collectors.toList()));
}
MessageBto messageBto = new MessageBto(saveEntity.getId(),saveEntity.getBusinessType(),"对" + userPublicService.getAreaNameByUnitName(allotBillEntity.getReceiveUnit()) + "发起配发",idList,1); MessageBto messageBto = new MessageBto(saveEntity.getId(),saveEntity.getBusinessType(),"对" + userPublicService.getAreaNameByUnitName(allotBillEntity.getReceiveUnit()) + "发起配发",idList,1);
messageService.add(messageBto); messageService.add(messageBto);
log.info("[配发模块]:" + allotBillEntity.getSendUnit() + "对" + allotBillEntity.getReceiveUnit() + "发起配发"); log.info("[配发模块]:" + allotBillEntity.getSendUnit() + "对" + allotBillEntity.getReceiveUnit() + "发起配发");
...@@ -295,6 +312,11 @@ public class AllotBillController { ...@@ -295,6 +312,11 @@ public class AllotBillController {
// //推至下一阶段 // //推至下一阶段
// taskService.update(taskService.moveToNext(taskBto, allotReceiveVo.getReceiveUserbId())); // taskService.update(taskService.moveToNext(taskBto, allotReceiveVo.getReceiveUserbId()));
taskService.moveToEnd(taskBto); taskService.moveToEnd(taskBto);
//生成上级上传单据任务
List<Integer> userIds = new ArrayList();
userIds.add(0);
// TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "配发单据", taskBto.getId(), taskBto.getNodeIdDetail()+taskBto.getId()+".", taskBto.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, userIds);
// taskService.start(taskBto);
//分隔装备id信息 //分隔装备id信息
String deviceIdDetail = allotReceiveVo.getReceiveCheckDetail(); String deviceIdDetail = allotReceiveVo.getReceiveCheckDetail();
String[] strings = deviceIdDetail.split("x"); String[] strings = deviceIdDetail.split("x");
...@@ -503,4 +525,33 @@ public class AllotBillController { ...@@ -503,4 +525,33 @@ public class AllotBillController {
allotBillEntity.setReplyFileList(FilesUtil.stringFileToList(allotBillEntity.getReplyFiles())); allotBillEntity.setReplyFileList(FilesUtil.stringFileToList(allotBillEntity.getReplyFiles()));
return ResponseEntity.ok(allotBillEntity); return ResponseEntity.ok(allotBillEntity);
} }
@ApiOperation(value = "上传配发单", notes = "上传配发单")
@PostMapping(value = "/uploadFile")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity uploadFile(@RequestBody @Validated com.tykj.dev.device.allot.subject.vo.FileVo fileVo){
//获取task
TaskBto taskBto = taskService.get(fileVo.getTaskId());
//不上传单据
if (fileVo.getStatus()==0){
taskService.moveToArchive(taskBto);
}
else {
AllotBill allotBill = allotBillService.getOne(taskBto.getBillId());
//保存账单
allotBill.setSendFiles(FilesUtil.stringFileToList(fileVo.getAllotFiles()));
allotBillService.update(allotBill);
List<Integer> ids = StringSplitUtil.split(allotBill.getAllotCheckDetail());
//业务完结
taskService.moveToEnd(taskBto);
//装备日志
List<FileVo> fileVoList = new ArrayList<>();
fileVo.getAllotFiles().forEach(fileRet -> fileVoList.add(new FileVo("配发单", fileRet.getName(), fileRet.getPreviewPath())));
ids.forEach(integer -> {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer, "上传配发单", fileVoList);
deviceLogService.addLog(deviceLogDto);
});
}
return ResponseEntity.ok("OK");
}
} }
...@@ -246,6 +246,9 @@ public class AllotBill { ...@@ -246,6 +246,9 @@ public class AllotBill {
@Column(name = "reply_files",columnDefinition = "TEXT") @Column(name = "reply_files",columnDefinition = "TEXT")
private String replyFiles; private String replyFiles;
@Column(name = "send_files",columnDefinition = "TEXT")
private String sendFiles;
@Transient @Transient
private List<FileRet> replyFileList = new ArrayList<>(); private List<FileRet> replyFileList = new ArrayList<>();
} }
package com.tykj.dev.device.allot.subject.vo; package com.tykj.dev.device.allot.subject.vo;
import com.tykj.dev.device.allot.subject.domin.AllotBackBill;
import com.tykj.dev.device.allot.subject.domin.AllotBill; import com.tykj.dev.device.allot.subject.domin.AllotBill;
import com.tykj.dev.device.file.entity.FileRet; import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.file.service.FilesUtil; import com.tykj.dev.device.file.service.FilesUtil;
...@@ -53,11 +54,11 @@ public class AllotBillSaveVo { ...@@ -53,11 +54,11 @@ public class AllotBillSaveVo {
@ApiModelProperty(value = "收件方(A岗位)") @ApiModelProperty(value = "收件方(A岗位)")
private Integer receiveUseraId; private Integer receiveUseraId;
@NotNull(message = "fileName不能为空") // @NotNull(message = "fileName不能为空")
@ApiModelProperty(value = "账单文件名") @ApiModelProperty(value = "账单文件名")
private String fileName; private String fileName;
@NotNull(message = "fileUrl不能为空") // @NotNull(message = "fileUrl不能为空")
@ApiModelProperty(value = "账单文件地址URL") @ApiModelProperty(value = "账单文件地址URL")
private String fileUrl; private String fileUrl;
...@@ -97,4 +98,19 @@ public class AllotBillSaveVo { ...@@ -97,4 +98,19 @@ public class AllotBillSaveVo {
allotBillEntity.setSendTime(TimestampUtil.getCurrentTimestamp()); allotBillEntity.setSendTime(TimestampUtil.getCurrentTimestamp());
return allotBillEntity; return allotBillEntity;
} }
public AllotBackBill toBackDo() {
AllotBackBill allotBillEntity = new AllotBackBill();
BeanUtils.copyProperties(this, allotBillEntity);
if(this.replyFiles!=null&&this.replyFiles.size()>0){
allotBillEntity.setReplyFiles(FilesUtil.stringFileToList(this.replyFiles));
}
allotBillEntity.setBackStatus(0);
allotBillEntity.setSendTime(TimestampUtil.getCurrentTimestamp());
allotBillEntity.setBackCheckDetail(this.allotCheckDetail);
allotBillEntity.setBackCheckResult(this.allotCheckResult);
allotBillEntity.setBackCount(this.allotCount);
allotBillEntity.setBackedCount(this.allotedCount);
return allotBillEntity;
}
} }
package com.tykj.dev.device.allot.subject.vo;
import com.tykj.dev.device.file.entity.FileRet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author dengdiyi
*/
@Data
@ApiModel("配发上传单据类")
public class FileVo {
@NotNull(message = "taskId不能为空")
@Min(value = 1,message = "taskId不能小于1")
@ApiModelProperty(value = "任务Id")
private Integer taskId;
@ApiModelProperty(value = "配发附件")
private List<FileRet> allotFiles;
@NotNull(message = "status不能为空")
@ApiModelProperty(value = "是否上传单据(0:否,1:是)")
private Integer status;
}
...@@ -116,6 +116,12 @@ public class DeviceApplyController { ...@@ -116,6 +116,12 @@ public class DeviceApplyController {
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
//发起任务 //发起任务
TaskBto taskBto; TaskBto taskBto;
if (userUtils.getCurrentUnitLevel()==1){
List<Integer> userIds = new ArrayList<>();
userIds.add(userId);
taskBto = new TaskBto(StatusEnum.END.id, "申请业务", null, ".", deviceApplyBillEntity.getId(), 9,userUtils.getCurrentUnitId(), 0, null, userIds);
}
else {
//指定批复人 //指定批复人
if (deviceApplySaveVo.getReplyUseraId() != null) { if (deviceApplySaveVo.getReplyUseraId() != null) {
List<Integer> userIds = new ArrayList<>(); List<Integer> userIds = new ArrayList<>();
...@@ -130,12 +136,15 @@ public class DeviceApplyController { ...@@ -130,12 +136,15 @@ public class DeviceApplyController {
userIds.add(0); userIds.add(0);
taskBto = new TaskBto(StatusEnum.DEVICE_APPLY_CONFIRM.id, "申请业务", null, ".", deviceApplyBillEntity.getId(), 9, userPublicService.findUnitIdByName(deviceApplySaveVo.getReplyUnit()), 1, null, userIds); taskBto = new TaskBto(StatusEnum.DEVICE_APPLY_CONFIRM.id, "申请业务", null, ".", deviceApplyBillEntity.getId(), 9, userPublicService.findUnitIdByName(deviceApplySaveVo.getReplyUnit()), 1, null, userIds);
} }
}
TaskBto taskBto1 = taskService.start(taskBto); TaskBto taskBto1 = taskService.start(taskBto);
//发送阅知信息 //发送阅知信息
List<Integer> userIds = userPublicService.findOtherUser(userId); List<Integer> userIds = userPublicService.findOtherUser(userId);
if (userUtils.getCurrentUnitLevel()==1) {
userIds.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(deviceApplyBillEntity.getReplyUnit())).stream() userIds.addAll(userDao.findAllByUnitsId(userPublicService.findUnitIdByName(deviceApplyBillEntity.getReplyUnit())).stream()
.map(User::getUserId) .map(User::getUserId)
.collect(Collectors.toList())); .collect(Collectors.toList()));
}
MessageBto messageBto = new MessageBto(taskBto1.getId(),taskBto1.getBusinessType(),"发起装备申请",userIds); MessageBto messageBto = new MessageBto(taskBto1.getId(),taskBto1.getBusinessType(),"发起装备申请",userIds);
messageService.add(messageBto); messageService.add(messageBto);
log.info("[申请模块]:发起装备申请"); log.info("[申请模块]:发起装备申请");
...@@ -221,7 +230,7 @@ public class DeviceApplyController { ...@@ -221,7 +230,7 @@ public class DeviceApplyController {
allotBillEntity.setAllotStatus(2); allotBillEntity.setAllotStatus(2);
AllotBill allotBill = allotBillService.addEntity(allotBillEntity); AllotBill allotBill = allotBillService.addEntity(allotBillEntity);
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTime(allotBillEntity.getCreateTime()); calendar.setTime(allotBill.getCreateTime());
int year = calendar.get(Calendar.YEAR); int year = calendar.get(Calendar.YEAR);
String num = "NO:第" + year + "PF" + allotBill.getId() + "号"; String num = "NO:第" + year + "PF" + allotBill.getId() + "号";
allotBill.setNum(num); allotBill.setNum(num);
...@@ -230,14 +239,19 @@ public class DeviceApplyController { ...@@ -230,14 +239,19 @@ public class DeviceApplyController {
//生成电子签章id //生成电子签章id
Long signId = snowflake.creatNextId(); Long signId = snowflake.creatNextId();
Long signId2 = snowflake.creatNextId(); Long signId2 = snowflake.creatNextId();
allotBillEntity.setLeftSignatureId(signId.toString()); allotBill.setLeftSignatureId(signId.toString());
allotBillEntity.setRightSignatureId(signId2.toString()); allotBill.setRightSignatureId(signId2.toString());
allotBillService.update(allotBill); allotBillService.update(allotBill);
taskBto.setBillId(allotBill.getId()); taskBto.setBillId(allotBill.getId());
//配发业务移动到下一阶段 //配发业务移动到下一阶段
TaskBto taskBto1 = taskService.moveToSpecial(taskBto,StatusEnum.ALLOTING); TaskBto taskBto1 = taskService.moveToSpecial(taskBto,StatusEnum.ALLOTING);
taskBto1.setOwnUnit(userPublicService.findUnitIdByName(allotBill.getReceiveUnit())); taskBto1.setOwnUnit(userPublicService.findUnitIdByName(allotBill.getReceiveUnit()));
Task saveEntity = taskService.update(taskBto1); Task saveEntity = taskService.update(taskBto1);
List<Integer> userIds2 = new ArrayList<>();
userIds2.add(userId);
userIds2.add(0);
TaskBto taskBto2 = new TaskBto(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id, "配发单据", saveEntity.getId(), saveEntity.getNodeIdDetail()+saveEntity.getId()+".", saveEntity.getBillId(), 3, userPublicService.findUnitIdByName(allotBillEntity.getSendUnit()), 0, null, userIds2);
taskService.start(taskBto2);
//添加业务日志 //添加业务日志
List<FileVo> fileVoList = new ArrayList<>(); List<FileVo> fileVoList = new ArrayList<>();
// fileVoList.add(new FileVo("出库确认单", allotBillEntity.getFileName(), allotBillEntity.getFileUrl())); // fileVoList.add(new FileVo("出库确认单", allotBillEntity.getFileName(), allotBillEntity.getFileUrl()));
......
...@@ -121,4 +121,7 @@ public class DeviceApplyBill { ...@@ -121,4 +121,7 @@ public class DeviceApplyBill {
@ApiModelProperty(value = "区块链记录id") @ApiModelProperty(value = "区块链记录id")
private String recordId; private String recordId;
@Column(name = "apply_files",columnDefinition = "TEXT")
private String applyFiles;
} }
package com.tykj.dev.device.apply.subject.vo; package com.tykj.dev.device.apply.subject.vo;
import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill; import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill;
import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.file.service.FilesUtil;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -52,6 +54,9 @@ public class DeviceApplySaveVo { ...@@ -52,6 +54,9 @@ public class DeviceApplySaveVo {
@ApiModelProperty(value = "入库列装数量详情") @ApiModelProperty(value = "入库列装数量详情")
private List<ApplyBillDetailVo> storageBillDetailVoList; private List<ApplyBillDetailVo> storageBillDetailVoList;
@ApiModelProperty(value = "申请附件")
private List<FileRet> applyFiles;
public DeviceApplyBill toDo() { public DeviceApplyBill toDo() {
DeviceApplyBill deviceApplyBillEntity = new DeviceApplyBill(); DeviceApplyBill deviceApplyBillEntity = new DeviceApplyBill();
BeanUtils.copyProperties(this, deviceApplyBillEntity); BeanUtils.copyProperties(this, deviceApplyBillEntity);
...@@ -65,6 +70,9 @@ public class DeviceApplySaveVo { ...@@ -65,6 +70,9 @@ public class DeviceApplySaveVo {
} }
} }
deviceApplyBillEntity.setApplyDetail(stringBuffer.toString()); deviceApplyBillEntity.setApplyDetail(stringBuffer.toString());
if(this.applyFiles!=null&&this.applyFiles.size()>0){
deviceApplyBillEntity.setApplyFiles(FilesUtil.stringFileToList(this.applyFiles));
}
return deviceApplyBillEntity; return deviceApplyBillEntity;
} }
......
...@@ -36,13 +36,13 @@ public enum LogType { ...@@ -36,13 +36,13 @@ public enum LogType {
ALLOT_3(9,ALLOT.id, ALLOT_DRAFT.id, ARCHIVE.id, "删除配发草稿"), ALLOT_3(9,ALLOT.id, ALLOT_DRAFT.id, ARCHIVE.id, "删除配发草稿"),
ALLOT_4(10,ALLOT.id, ALLOT_SEND_CONFIRM.id, ALLOTING.id, "审核成功并出库"), ALLOT_4(10,ALLOT.id, WAIT_UPLOAD_ALLOT_FILE.id, END.id, "上传配发单"),
ALLOT_5(11,ALLOT.id, ALLOTING.id, ALLOT_RECEIVE_CONFIRM.id, "接收并发起入库"), ALLOT_5(11,ALLOT.id, WAIT_UPLOAD_ALLOT_FILE.id, ARCHIVE.id, "取消上传配发单"),
ALLOT_6(12,ALLOT.id, ALLOT_RECEIVE_CONFIRM.id, END.id, "审核成功并入库"), ALLOT_6(12,ALLOT.id, ORIGIN_STATUS.id, WAIT_UPLOAD_CROSS_FILE.id, "对(%receiveUnit)发起配发"),
ALLOT_7(13,ALLOT.id, ALLOT_RECEIVE_CONFIRM.id, ARCHIVE.id, "配发入库审核失败"), ALLOT_7(13,ALLOT.id, WAIT_UPLOAD_CROSS_FILE.id, END.id, "上传配发单"),
RFID_1(14,TAG.id, ORIGIN_STATUS.id, RFID_BUSINESS_NEED_CONFIRM.id, "发起标签替换"), RFID_1(14,TAG.id, ORIGIN_STATUS.id, RFID_BUSINESS_NEED_CONFIRM.id, "发起标签替换"),
...@@ -219,6 +219,7 @@ public enum LogType { ...@@ -219,6 +219,7 @@ public enum LogType {
SCRAP_2(91,SCRAP.id, WAIT_UPLOAD_SCRAP_FILE.id, END.id, "上传报废单据"), SCRAP_2(91,SCRAP.id, WAIT_UPLOAD_SCRAP_FILE.id, END.id, "上传报废单据"),
SELF_CHECK_5(92,SELF_CHECK.id, ORIGIN_STATUS.id, END.id, "终端自查"), SELF_CHECK_5(92,SELF_CHECK.id, ORIGIN_STATUS.id, END.id, "终端自查"),
SELF_CHECK_6(93,SELF_CHECK.id, WAIT_SELF_CHECK.id, END.id, "周期自查"), SELF_CHECK_6(93,SELF_CHECK.id, WAIT_SELF_CHECK.id, END.id, "周期自查"),
APPLY_4(94,APPLY.id, ORIGIN_STATUS.id, END.id, "发起装备申请"),
; ;
public Integer id; public Integer id;
......
...@@ -57,12 +57,12 @@ public class DeviceLibraryController { ...@@ -57,12 +57,12 @@ public class DeviceLibraryController {
private UserUtils userUtils; private UserUtils userUtils;
@ApiOperation(value = "修改装备备注", notes = "修改装备备注") @ApiOperation(value = "修改装备备注", notes = "修改装备备注")
@PostMapping("/setRecord/{id}/{record}") @PostMapping("/setRecord")
public ResponseEntity setRecord(@PathVariable("id") int id,@PathVariable("record") String record){ public ResponseEntity setRecord(@RequestBody Record record){
DeviceLibrary deviceLibrary = deviceLibraryService.getOne(id); DeviceLibrary deviceLibrary = deviceLibraryService.getOne(record.getId());
deviceLibrary.setRecord(record); deviceLibrary.setRecord(record.getRecord());
deviceLibraryService.update(deviceLibrary); deviceLibraryService.update(deviceLibrary);
DeviceLogDto deviceLogDto = new DeviceLogDto(id, "将备注改为"+record, null); DeviceLogDto deviceLogDto = new DeviceLogDto(record.getId(), "将备注改为"+record.getRecord(), null);
deviceLogService.addLog(deviceLogDto); deviceLogService.addLog(deviceLogDto);
return ResponseEntity.ok("修改成功"); return ResponseEntity.ok("修改成功");
} }
......
package com.tykj.dev.device.library.subject.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.stereotype.Repository;
/**
* @author dengdiyi
*/
@Data
@ApiModel("装备备注类")
@Repository
public class Record {
private Integer id;
private String record;
}
...@@ -90,9 +90,9 @@ public enum BusinessEnum { ...@@ -90,9 +90,9 @@ public enum BusinessEnum {
*/ */
WORK_HANDOVER(21, "工作交接"), WORK_HANDOVER(21, "工作交接"),
/** /**
* 配发退回 * 退回
*/ */
ALLOT_BACK(22, "配发退回"), ALLOT_BACK(22, "退回"),
/** /**
* 报废 * 报废
*/ */
......
...@@ -167,6 +167,16 @@ public enum StatusEnum { ...@@ -167,6 +167,16 @@ public enum StatusEnum {
*/ */
ALLOT_RECEIVE_CONFIRM(303, "配发入库待审核"), ALLOT_RECEIVE_CONFIRM(303, "配发入库待审核"),
/**
* 待上传横向配发单
*/
WAIT_UPLOAD_CROSS_FILE(311,"待上传配发单"),
/**
* 待上传纵向配发单
*/
WAIT_UPLOAD_ALLOT_FILE(322,"待上传配发单"),
/** /**
* 草稿 * 草稿
*/ */
......
...@@ -218,7 +218,7 @@ public class RepairController { ...@@ -218,7 +218,7 @@ public class RepairController {
//如果当前为省像国家发起的 //如果当前为省像国家发起的
if (level == 1) { if (level == 1) {
deviceLibraryEntity.setLifeStatus(4); deviceLibraryEntity.setLifeStatus(4);
deviceLibraryEntity.setLocationUnit("中办"); deviceLibraryEntity.setLocationUnit(repairBillSaveVo.getReceiveUnit());
} else { } else {
deviceLibraryEntity.setLifeStatus(4); deviceLibraryEntity.setLifeStatus(4);
} }
...@@ -276,7 +276,7 @@ public class RepairController { ...@@ -276,7 +276,7 @@ public class RepairController {
} }
//改变维修详情装备所在单位为中办,状态为维修中 //改变维修详情装备所在单位为中办,状态为维修中
repairDetailEntities.forEach(repairDetail -> { repairDetailEntities.forEach(repairDetail -> {
repairDetail.setLocationUnit("中办"); repairDetail.setLocationUnit(repairBillSaveVo.getReceiveUnit());
repairDetail.setRepairStatus(1); repairDetail.setRepairStatus(1);
deviceRepairDetailService.update(repairDetail); deviceRepairDetailService.update(repairDetail);
}); });
...@@ -831,7 +831,7 @@ public class RepairController { ...@@ -831,7 +831,7 @@ public class RepairController {
// } // }
// RepairSendBill repairSendBill = deviceRepairSendBillDao.findByDeviceRepairBillId(taskBto.getBillId()); // RepairSendBill repairSendBill = deviceRepairSendBillDao.findByDeviceRepairBillId(taskBto.getBillId());
repairBackBill = new RepairBackBill(); repairBackBill = new RepairBackBill();
repairBackBill.setSendUnit("中办"); repairBackBill.setSendUnit(deviceRepairDetailService.getOne(repairReceiveVo.getDeviceList().get(0).getId()).getLocationUnit());
repairBackBill.setReceiveUnit(userUtils.getCurrentUserUnitName()); repairBackBill.setReceiveUnit(userUtils.getCurrentUserUnitName());
repairBackBill.setBackCheckDetail(repairReceiveVo.getReceiveCheckDetail()); repairBackBill.setBackCheckDetail(repairReceiveVo.getReceiveCheckDetail());
// repairBackBill.setDeviceRepairBillId(taskBto.getBillId()); // repairBackBill.setDeviceRepairBillId(taskBto.getBillId());
......
...@@ -165,7 +165,7 @@ public class DeviceRetiredController { ...@@ -165,7 +165,7 @@ public class DeviceRetiredController {
packingLibraryService.update(packingLibraryServiceOne); packingLibraryService.update(packingLibraryServiceOne);
setSonsRetired(packingLibraryServiceOne); setSonsRetired(packingLibraryServiceOne);
//更改对应的装备为退装 //更改对应的装备为退装
changeDeviceToRetired(packingLibraryServiceOne.getId()); // changeDeviceToRetired(packingLibraryServiceOne.getId());
} }
} }
myWebSocket.sendMessage1(); myWebSocket.sendMessage1();
......
...@@ -8,11 +8,13 @@ import com.tykj.dev.device.allot.service.AllotBillService; ...@@ -8,11 +8,13 @@ import com.tykj.dev.device.allot.service.AllotBillService;
import com.tykj.dev.device.allot.subject.domin.AllotBackBill; import com.tykj.dev.device.allot.subject.domin.AllotBackBill;
import com.tykj.dev.device.allot.subject.domin.AllotBill; import com.tykj.dev.device.allot.subject.domin.AllotBill;
import com.tykj.dev.device.apply.service.DeviceApplyBillService; import com.tykj.dev.device.apply.service.DeviceApplyBillService;
import com.tykj.dev.device.apply.subject.domin.DeviceApplyBill;
import com.tykj.dev.device.confirmcheck.repository.DeviceCheckBillDao; import com.tykj.dev.device.confirmcheck.repository.DeviceCheckBillDao;
import com.tykj.dev.device.confirmcheck.repository.DeviceCheckDetailDao; import com.tykj.dev.device.confirmcheck.repository.DeviceCheckDetailDao;
import com.tykj.dev.device.confirmcheck.repository.DeviceCheckStatDao; import com.tykj.dev.device.confirmcheck.repository.DeviceCheckStatDao;
import com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill; import com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill;
import com.tykj.dev.device.destroy.service.DeviceDestroyBillService; import com.tykj.dev.device.destroy.service.DeviceDestroyBillService;
import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.subject.vo.FileVo; import com.tykj.dev.device.library.subject.vo.FileVo;
import com.tykj.dev.device.matching.service.MatchingDeviceBillService; import com.tykj.dev.device.matching.service.MatchingDeviceBillService;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceBill; import com.tykj.dev.device.matching.subject.domin.MatchingDeviceBill;
...@@ -288,6 +290,12 @@ public class LogAspect { ...@@ -288,6 +290,12 @@ public class LogAspect {
this.fileVos.add(new FileVo("配发单", allotBill.getBillFileName(), allotBill.getBillFileUrl())); this.fileVos.add(new FileVo("配发单", allotBill.getBillFileName(), allotBill.getBillFileUrl()));
// this.fileVos.add(new FileVo("入库确认单", allotBill.getReceiveFileName(), allotBill.getReceiveFileUrl())); // this.fileVos.add(new FileVo("入库确认单", allotBill.getReceiveFileName(), allotBill.getReceiveFileUrl()));
} }
if ((this.oldStatus.equals(StatusEnum.WAIT_UPLOAD_ALLOT_FILE.id) && this.newStatus.equals(StatusEnum.END.id))
|| this.oldStatus.equals(StatusEnum.WAIT_UPLOAD_CROSS_FILE.id) && this.newStatus.equals(StatusEnum.END.id)) {
FilesUtil.stringFileToList(allotBill.getSendFiles()).forEach(fileRet -> {
this.fileVos.add(new FileVo("配发单", fileRet.getName(), fileRet.getPreviewPath()));
});
}
} }
break; break;
case 22: case 22:
...@@ -354,7 +362,13 @@ public class LogAspect { ...@@ -354,7 +362,13 @@ public class LogAspect {
case 9: case 9:
DeviceApplyBillService deviceApplyBillService = SpringUtils.getBean("deviceApplyBillServiceImpl"); DeviceApplyBillService deviceApplyBillService = SpringUtils.getBean("deviceApplyBillServiceImpl");
if (deviceApplyBillService != null) { if (deviceApplyBillService != null) {
DeviceApplyBill deviceApplyBill = deviceApplyBillService.getOne(outPutTask.getBillId());
getFieldsParam(deviceApplyBillService.getOne(outPutTask.getBillId())); getFieldsParam(deviceApplyBillService.getOne(outPutTask.getBillId()));
if ((this.oldStatus.equals(StatusEnum.ORIGIN_STATUS.id) && this.newStatus.equals(StatusEnum.END.id))) {
FilesUtil.stringFileToList(deviceApplyBill.getApplyFiles()).forEach(fileRet -> {
this.fileVos.add(new FileVo("申请单", fileRet.getName(), fileRet.getPreviewPath()));
});
}
} }
break; break;
case 10: case 10:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论