提交 70beb095 authored 作者: zhoushaopan's avatar zhoushaopan

feat(配套设备库模块): 新增了维修业务

新增了维修业务
上级 05a3e180
......@@ -381,8 +381,89 @@ public enum LogType {
DAILY_CHECKED(176,DAILY_SELF_CHECK.id,WAIT_CHECK.id,WAIT_CHECK_RESULT.id,"等待上传校验结果"),
DAILY_CHECK_END(177,DAILY_SELF_CHECK.id,WAIT_CHECK_FILE.id,END.id,"日常检查任务完结"),
DAILY_CHECK_RE(178,DAILY_SELF_CHECK.id,WAIT_CHECK_RESULT.id,WAIT_CHECK_FILE.id,"上传检查结果"),
DAILY_CHECK_RE2(179,DAILY_SELF_CHECK.id,WAIT_CHECK_FILE.id,WAIT_CHECK_FILE.id,"上传检查结果");
DAILY_CHECK_RE2(179,DAILY_SELF_CHECK.id,WAIT_CHECK_FILE.id,WAIT_CHECK_FILE.id,"上传检查结果"),
MATCHING_REPAIR_SEND_1(180,MATCHING_REPAIR.id, ORIGIN_STATUS.id, MATCHING_WAIT_RECEIVE.id, "向(%receiveUnit)发起装备维修"),
MATCHING_REPAIR_SEND_2(181,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_CONFIRM.id, MATCHING_WAIT_RECEIVE.id, "审核成功并出库"),
MATCHING_REPAIR_SEND_3(182,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_CONFIRM.id, ARCHIVE.id, "维修出库审核失败"),
MATCHING_REPAIR_SEND_4(183,MATCHING_REPAIR.id, MATCHING_WAIT_RECEIVE.id, END.id, "上传相关单据,任务结束"),
MATCHING_REPAIR_SEND_5(184,MATCHING_REPAIR.id, MATCHING_WAIT_RECEIVE.id, MATCHING_WAIT_UPLOAD_FILE.id, "接收维修装备并发起入库(缺少单据)"),
MATCHING_REPAIR_SEND_6(185,MATCHING_REPAIR.id, MATCHING_WAIT_UPLOAD_FILE.id, END.id, "上传送修单据"),
MATCHING_REPAIR_SEND_7(186,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_CONFIRM.id, MATCHING_COUNTRY_REPAIRING.id, "审核成功并出库"),
MATCHING_REPAIR_BACK_1(187,MATCHING_REPAIR_BACK.id, ORIGIN_STATUS.id, MATCHING_WAIT_BACK_RECEIVE.id, "向(%receiveUnit)退还维修配套设备"),
MATCHING_REPAIR_BACK_2(188,MATCHING_REPAIR_BACK.id, MATCHING_WAIT_BACK_RECEIVE.id, MATCHING_WAIT_UPLOAD_BACK_FILE.id, "维修退回装备接收并发起入库(缺失单据)"),
MATCHING_REPAIR_BACK_3(189,MATCHING_REPAIR_BACK.id, MATCHING_WAIT_UPLOAD_BACK_FILE.id, END.id, "上传相关单据,任务完成"),
MATCHING_REPAIR_BACK_4(190,MATCHING_REPAIR_BACK.id, MATCHING_WAIT_BACK_RECEIVE.id, END.id, "维修退回配套设备接收并发起入库"),
MATCHING_REPAIR_BACK_5(191,MATCHING_REPAIR_BACK.id, ORIGIN_STATUS.id, MATCHING_WAIT_UPLOAD_BACK_FILE.id, "维修退回配套设备接收并发起入库(缺失单据)"),
MATCHING_REPAIR_BACK_6(192,MATCHING_REPAIR_BACK.id, MATCHING_WAIT_UPLOAD_BACK_SEND_FILE.id, ARCHIVE.id, "取消上传领取单"),
MATCHING_REPAIR_SEND_14(193, MATCHING_REPAIR.id, ORIGIN_STATUS.id, MATCHING_REPAIR_SEND_SIGN_WAIT_CONFIRM.id, "申请电子签章"),
MATCHING_REPAIR_SEND_15(194,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_DRAFT.id, MATCHING_REPAIR_SEND_SIGN_WAIT_CONFIRM.id, "申请电子签章"),
MATCHING_REPAIR_SEND_16(195,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_SIGN_WAIT_CONFIRM.id, MATCHING_REPAIR_SEND_DRAFT.id, "拒绝电子签章申请"),
MATCHING_REPAIR_SEND_17(196,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_SIGN_WAIT_CONFIRM.id, MATCHING_REPAIR_SEND_WAIT_SIGN.id, "同意电子签章申请"),
MATCHING_REPAIR_SEND_18(197,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_WAIT_SIGN.id, MATCHING_WAIT_RECEIVE.id, "盖电子签章并出库"),
// REPAIR_SEND_19(129,REPAIR.id, REPAIR_SEND_WAIT_SIGN.id, END.id, "盖电子签章并入库"),
MATCHING_REPAIR_SEND_19(198,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_WAIT_SIGN.id, END.id, "上传相关单据,业务办结"),
MATCHING_REPAIR_SEND_20(199,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_WAIT_SIGN.id, MATCHING_WAIT_UPLOAD_FILE.id, "盖电子签章并入库"),
MATCHING_REPAIR_SEND_21(200,MATCHING_REPAIR.id, MATCHING_REPAIR_SEND_SIGN_WAIT_CONFIRM.id, MATCHING_WAIT_RECEIVE.id, "拒绝电子签章申请"),
// REPAIR_SEND_22(131,REPAIR.id, REPAIR_SEND_SIGN_WAIT_CONFIRM.id, WAIT_RECEIVE.id, "拒绝电子签章申请"),
MATCHING_REPAIR_BACK_14(201, MATCHING_REPAIR.id, ORIGIN_STATUS.id, MATCHING_REPAIR_BACK_SIGN_WAIT_CONFIRM.id, "申请电子签章"),
MATCHING_REPAIR_BACK_16(202,MATCHING_REPAIR.id, MATCHING_REPAIR_BACK_SIGN_WAIT_CONFIRM.id, MATCHING_REPAIR_BACK_DRAFT.id, "拒绝电子签章申请"),
MATCHING_REPAIR_BACK_17(203,MATCHING_REPAIR_BACK.id, MATCHING_REPAIR_BACK_SIGN_WAIT_CONFIRM.id, MATCHING_REPAIR_BACK_WAIT_SIGN.id, "同意电子签章申请"),
// REPAIR_BACK_18(136,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_BACK_RECEIVE.id, "盖电子签章并出库"),
MATCHING_REPAIR_BACK_18(204,MATCHING_REPAIR_BACK.id, MATCHING_REPAIR_BACK_WAIT_SIGN.id, MATCHING_WAIT_BACK_RECEIVE.id, "等待接收维修装备"),
MATCHING_REPAIR_BACK_19(205,MATCHING_REPAIR_BACK.id, MATCHING_REPAIR_BACK_WAIT_SIGN.id, END.id, "盖电子签章并出库"),
// REPAIR_BACK_20(138,REPAIR.id, REPAIR_BACK_WAIT_SIGN.id, WAIT_UPLOAD_BACK_FILE.id, "盖电子签章并入库"),
MATCHING_REPAIR_BACK_20(206,MATCHING_REPAIR_BACK.id, MATCHING_REPAIR_BACK_WAIT_SIGN.id, MATCHING_WAIT_UPLOAD_BACK_FILE.id, "上传签收单"),
MATCHING_REPAIR_BACK_22(207,MATCHING_REPAIR_BACK.id, ORIGIN_STATUS.id, MATCHING_REPAIR_BACK_DRAFT.id, "维修退回等待出库"),
MATCHING_REPAIR_BACK_23(208,MATCHING_REPAIR_BACK.id, MATCHING_REPAIR_BACK_DRAFT.id, MATCHING_REPAIR_BACK_SIGN_WAIT_CONFIRM.id, "申请签章待审核"),
// REPAIR_SEND_22(147,REPAIR.id, ORIGIN_STATUS.id, REPAIR_SEND_DRAFT.id, "送修等待出库"),
MATCHING_REPAIR_SEND_23(209,MATCHING_REPAIR.id, ORIGIN_STATUS.id, MATCHING_WAIT_UPLOAD_SEND_FILE.id, "等待上传回执单"),
MATCHING_REPAIR_BACK_24(210,MATCHING_REPAIR_BACK.id,REPAIR_BACK_SIGN_WAIT_CONFIRM.id,REPAIR_BACK_WAIT_SIGN.id,"同意签章审核"),
MATCHING_REPAIR_BACK_25(211,MATCHING_REPAIR_BACK.id,MATCHING_WAIT_BACK_RECEIVE.id,MATCHING_REPAIR_BACK_SIGN_WAIT_CONFIRM.id,"等待签章审核"),
MATCHING_REPAIR_BACK_26(212,MATCHING_REPAIR_BACK.id,MATCHING_REPAIR_BACK_SIGN_WAIT_CONFIRM.id,MATCHING_REPAIR_BACK_WAIT_SIGN.id,"等待签章审核"),
MATCHING_REPAIR_BACK_27(213,MATCHING_REPAIR_BACK.id,MATCHING_REPAIR_BACK_WAIT_SIGN.id,MATCHING_WAIT_BACK_RECEIVE.id,"等待签章审核"),
MATCHING_REPAIR_BACK_28(214,MATCHING_REPAIR_BACK.id,MATCHING_REPAIR_BACK_WAIT_SIGN.id,MATCHING_WAIT_UPLOAD_BACK_FILE.id,"等待上传相关单据"),
MATCHING_REPAIR_SEND_24(215,MATCHING_REPAIR.id, MATCHING_WAIT_RECEIVE.id, MATCHING_REPAIR_SEND_SIGN_WAIT_CONFIRM.id, "申请电子签章审核"),
MATCHING_REPAIR_SEND_25(216,MATCHING_REPAIR.id, ORIGIN_STATUS.id, MATCHING_REPAIR_SEND_DRAFT.id, "等待出库"),
MATCHING_REPAIR_BACK_30(217,MATCHING_REPAIR_BACK.id, MATCHING_REPAIR_BACK_SIGN_WAIT_CONFIRM.id, MATCHING_REPAIR_BACK_DRAFT.id, "拒绝签章"),
MATCHING_REPAIR_BACK_31(218,MATCHING_REPAIR_BACK.id, MATCHING_REPAIR_BACK_WAIT_SIGN.id, END.id, "上传相关单据,任务结束"),
MATCHING_REPAIR_BACK_21(219,MATCHING_REPAIR.id, ORIGIN_STATUS.id, MATCHING_REPAIR_SEND_UNDER_DRAFT.id, "省直属等待出库");
public Integer id;
/**
......
......@@ -113,7 +113,13 @@ public enum DeviceLifeStatus {
/**
* 待退回
*/
WAIT_BACK(22,"待退回");
WAIT_BACK(22,"待退回"),
/**
* 停用
*/
STOP(23,"停用");
public Integer id;
......
......@@ -37,6 +37,7 @@ public class SystemConfigServiceImpl implements SystemConfigService {
@Override
public void delete(Integer id) {
systemConfigDao.deleteById(id);
configCache.refresh(systemConfigDao.findAll());
}
@Override
......
package com.tykj.dev.device.matching.controller;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.matching.service.MatchingRepairBackBillService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 10:45
*/
@RestController
@RequestMapping(value = "/matchingBackRepair")
@AutoDocument
@Api(tags = "配套设备维修退回模块", description = "配套设备维修退回模块")
@Slf4j
public class MatchingBackRepairController {
@Resource
private MatchingRepairBackBillService backBillService;
}
package com.tykj.dev.device.matching.controller;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.matching.service.MatchingRepairDetailService;
import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import com.tykj.dev.misc.utils.MessageFormatUtil;
import com.tykj.dev.misc.utils.StringSplitUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 10:45
*/
@RestController
@RequestMapping(value = "/matchingDetailRepair")
@AutoDocument
@Api(tags = "配套设备维修详情模块", description = "配套设备维修详情模块")
@Slf4j
public class MatchingDetailRepairController {
@Resource
private MatchingRepairDetailService detailService;
@ApiOperation(value = "添加维修装备", notes = "可以通过这个接口发起维修")
@PostMapping(value = "/add")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity addRepairDevice(@RequestBody List<Integer> ids) {
detailService.addList(ids);
return ResponseEntity.ok("添加成功");
}
}
......@@ -382,10 +382,10 @@ public class MatchingDeviceController {
if (matchingDeviceSelectVo.getMatchingType() == 1){
//只查询停用的
matchingDeviceLibraryList = matchingDeviceLibraryList.stream().filter(matchingDeviceLibrary ->
matchingDeviceLibrary.getMatchingDeviceStatus() == 3).collect(Collectors.toList());
matchingDeviceLibrary.getLifeStatus() == 23).collect(Collectors.toList());
}else {
matchingDeviceLibraryList = matchingDeviceLibraryList.stream().filter(matchingDeviceLibrary ->
matchingDeviceLibrary.getMatchingDeviceStatus() != 3).collect(Collectors.toList());
matchingDeviceLibrary.getLifeStatus() != 23).collect(Collectors.toList());
}
//处理装备的序列号
matchingDeviceLibraryList.forEach(matchingDeviceLibrary -> {
......@@ -504,6 +504,7 @@ public class MatchingDeviceController {
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null, null);
deviceLogService.addLog(deviceLogDto);
m.setLifeStatus(matchingDeviceEditVo.getLifeStatus());
m.setStopUnitId(userUtils.getCurrentUnitId());
}
if (matchingDeviceEditVo.getDeviceId() != null && m.getDeviceId() == 0) {
//添加设备日志
......@@ -578,15 +579,15 @@ public class MatchingDeviceController {
m.setMatchingDeviceStorageLocationId(matchingDeviceEditVo.getMatchingDeviceStorageLocationId());
}
if (matchingDeviceEditVo.getMatchingDeviceStatus() != null &&
!matchingDeviceEditVo.getMatchingDeviceStatus().equals(m.getMatchingDeviceStatus())) {
//添加设备日志 设备的状态
String remark = "将设备的状态改为" + matchingDeviceEditVo.getMatchingDeviceStatusName();
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null, null);
deviceLogService.addLog(deviceLogDto);
m.setMatchingDeviceStatus(matchingDeviceEditVo.getMatchingDeviceStatus());
m.setStopUnitId(userUtils.getCurrentUnitId());
}
// if (matchingDeviceEditVo.getMatchingDeviceStatus() != null &&
// !matchingDeviceEditVo.getMatchingDeviceStatus().equals(m.getMatchingDeviceStatus())) {
// //添加设备日志 设备的状态
// String remark = "将设备的状态改为" + matchingDeviceEditVo.getMatchingDeviceStatusName();
// DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null, null);
// deviceLogService.addLog(deviceLogDto);
// m.setMatchingDeviceStatus(matchingDeviceEditVo.getMatchingDeviceStatus());
//
// }
if (matchingDeviceEditVo.getRemake() != null &&
!matchingDeviceEditVo.getRemake().equals(m.getRemake())) {
//添加设备 设备的状态
......@@ -612,7 +613,7 @@ public class MatchingDeviceController {
@ApiOperation(value = "查询新增配套任务详情", notes = "可以通过这个接口查询新增配套任务详情")
@GetMapping(value = "/detail/{billId}")
public ResponseEntity selectDetail(@PathVariable("billId") int billId) {
MacthingDetailVo macthingDetailVo = new MacthingDetailVo();
MatchingDetailVo macthingDetailVo = new MatchingDetailVo();
//获取业务
TaskBto taskBto = taskService.get(billId, BusinessEnum.ADD_MATCHING_DEVICE.id);
//获取账单
......
//package com.tykj.dev.device.matching.controller;
//
//import com.tykj.dev.config.swagger.AutoDocument;
//import com.tykj.dev.device.library.service.DeviceLogService;
//import com.tykj.dev.device.task.service.TaskLogService;
//import com.tykj.dev.device.task.service.TaskService;
//import com.tykj.dev.device.user.cache.UnitsCache;
//import com.tykj.dev.device.user.read.service.MessageService;
//import com.tykj.dev.device.user.subject.dao.UserDao;
//import com.tykj.dev.device.user.subject.service.UnitsService;
//import com.tykj.dev.device.user.subject.service.UserPublicService;
//import com.tykj.dev.device.user.util.UserUtils;
//import com.tykj.dev.misc.utils.*;
//import io.swagger.annotations.Api;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import javax.annotation.Resource;
//
//
///**
// * @author zsp
// * @version 1.0
// * @date 2022/6/6 9:54
// */
//@RestController
//@RequestMapping(value = "/matchingRepair")
//@AutoDocument
//@Api(tags = "配套设备维修模块", description = "配套设备维修模块")
//@Slf4j
//public class MatchingRepairController {
//
//
// @Autowired
// private UserPublicService userPublicService;
//
//
// @Autowired
// private UserUtils userUtils;
//
// @Autowired
// private TaskService taskService;
//
// @Autowired
// private DeviceLogService deviceLogService;
//
// @Autowired
// private TaskLogService taskLogService;
//
// @Autowired
// private Snowflake snowflake;
//
// @Autowired
// private UserDao userDao;
//
// @Autowired
// private MessageService messageService;
//
// @Autowired
// private UnitsService unitsService;
//
// @Resource
// private UnitsCache unitsCache;
//
//
//// @ApiOperation(value = "判断维修装备是否同一个送修单位", notes = "可以通过这个接口判断维修装备是否同一个送修单位")
//// @PostMapping(value = "/judge")
//// @Transactional(rollbackFor = Exception.class)
//// public ResponseEntity judge(@RequestBody List<Integer> ids) {
//// //存放所有维修记录的发件单位
////// Set<String> sendUnits = new HashSet<>();
//// List<Integer> sendUnits = new ArrayList<>();
//// ids.forEach(integer -> {
//// RepairDetail repairDetail = deviceRepairDetailService.getOne(integer);
//// RepairBill repairBill = deviceRepairBillService.getOne(repairDetail.getDeviceRepairBillId());
////// sendUnits.add(repairBill.getSendUnit());
//// sendUnits.add(repairBill.getSendUnitId());
//// });
//// //去重
//// List<Integer> collect = sendUnits.stream().distinct().collect(Collectors.toList());
//// //如果是同一单位返回单位名称,否则返error
//// if (collect.size() == 1) {
////// Units units = unitsService.findById(collect.get(0));
//// Units units = unitsCache.findById(collect.get(0));
////// return ResponseEntity.ok(sendUnits.iterator().next());
//// return ResponseEntity.ok(units);
//// } else {
//// return ResponseEntity.ok("error");
//// }
//// }
//
//
//}
package com.tykj.dev.device.matching.controller;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.file.service.FilesUtil;
import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.FileVo;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import com.tykj.dev.device.matching.service.MatchingRepairSendBillService;
import com.tykj.dev.device.matching.subject.domin.MatchingRepairSendBill;
import com.tykj.dev.device.matching.subject.vo.repair.*;
import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import com.tykj.dev.device.user.subject.entity.Units;
import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 10:45
*/
@RestController
@RequestMapping(value = "/matchingRepair")
@AutoDocument
@Api(tags = "配套设备发起维修模块", description = "配套设备发起维修模块")
@Slf4j
public class MatchingSendRepairController {
@Resource
private MatchingRepairSendBillService sendBillService;
@ApiOperation(value = "保存维修操作", notes = "可以通过这个接口保存维修操作")
@PostMapping(value = "/saveRepairBill")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity saveRepairBill(@RequestBody MatchingRepairBillSaveVo repairBillSaveVo) {
sendBillService.saveRepairBill(repairBillSaveVo);
return ResponseEntity.ok("保存成功");
}
@ApiOperation(value = "发起维修", notes = "可以通过这个接口发起维修")
@PostMapping(value = "/form")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity createRepair(@RequestBody @Validated MatchingRepairBillSaveVo repairBillSaveVo) {
MatchingRepairSendBill matchingRepairSendBill = sendBillService.startSendBill(repairBillSaveVo);
return ResponseEntity.ok(matchingRepairSendBill);
}
@ApiOperation(value = "接收维修装备", notes = "可以通过这个接口接收维修装备")
@PostMapping(value = "/receive")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity receiveDevice(@RequestBody @Validated MatchingRepairReceiveVO repairReceiveVO) {
MatchingRepairSendBill matchingRepairSendBill = sendBillService.receiveRepairBill(repairReceiveVO);
return ResponseEntity.ok(matchingRepairSendBill);
}
@ApiOperation(value = "送修申请电子签章", notes = "可以通过这个接口申请电子签章")
@PostMapping(value = "/applySign")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity applySign(@RequestBody SignVO signVO) {
sendBillService.applySign(signVO);
return ResponseEntity.ok("申请成功");
}
@ApiOperation(value = "送修申请电子签章审核", notes = "可以通过这个接口申请电子签章审核")
@PostMapping(value = "/applySignConfirm/{taskId}/{status}")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity applySignConfirm(@RequestBody CheckSignVO checkSignVO) {
sendBillService.checkSign(checkSignVO);
return ResponseEntity.ok("申请成功");
}
@ApiOperation(value = "上传接收方送修单", notes = "可以通过这个接口上传送修单")
@PostMapping(value = "/uploadRepairBill")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity uploadRepairBill(@RequestBody @Validated MatchingFileUploadVO matchingFileUploadVO) {
sendBillService.receiveRepairFile(matchingFileUploadVO);
return ResponseEntity.ok("上传成功");
}
@ApiOperation(value = "市县上传发送方送修单", notes = "市县上传维修单")
@PostMapping(value = "/uploadRepairFile")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity uploadRepairFile(@RequestBody @Validated MatchingFileVO fileVo) {
sendBillService.uploadRepairFile(fileVo);
return ResponseEntity.ok("上传成功");
}
}
package com.tykj.dev.device.matching.repository;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceChange;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
/**
* @author zsp
* @version 1.0
* @date 2022/6/7 10:41
*/
@Repository
public interface MatchingDeviceChangeDao extends JpaRepository<MatchingDeviceChange,Integer>, JpaSpecificationExecutor<MatchingDeviceChange> {
}
......@@ -19,6 +19,8 @@ public interface MatchingDeviceLibraryDao extends JpaRepository<MatchingDeviceLi
List<MatchingDeviceLibrary> findAllByCreateUnitId(Integer unitId);
List<MatchingDeviceLibrary> findAllBySeqNumber(String seqNumber);
List<MatchingDeviceLibrary> findAllByCreateUnitIdIn(List<Integer> unitIds);
@Transactional
......@@ -29,11 +31,17 @@ public interface MatchingDeviceLibraryDao extends JpaRepository<MatchingDeviceLi
@Transactional
@Modifying
@Query("update MatchingDeviceLibrary m set m.matchingDeviceStatus = :status, m.remake = :remake, m.statusJson = :statusJson, m.stopUnitId = :stopUnitId where m.id in :matchingDeviceIds")
@Query("update MatchingDeviceLibrary m set m.lifeStatus = :status, m.remake = :remake, m.statusJson = :statusJson, m.stopUnitId = :stopUnitId where m.id in :matchingDeviceIds")
int batchUpdateStatus(@Param("status") Integer status,
@Param("remake") String remake,
@Param("statusJson") String statusJson,
@Param("matchingDeviceIds") List<Integer> matchingDeviceIds,
@Param("stopUnitId") Integer stopUnitId);
@Transactional
@Modifying
@Query("update MatchingDeviceLibrary o set o.lifeStatus = :lifeStatus where o.id in :ids")
int batchUpdate2(Integer lifeStatus,List<Integer> ids);
}
package com.tykj.dev.device.matching.repository;
import com.tykj.dev.device.matching.subject.domin.MatchingRepairBackBill;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.Date;
import java.util.List;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceRepairBackBillDao.java
* @Description TODO
* @createTime 2020年08月25日 10:29:00
*/
public interface MatchingRepairBackBillDao extends JpaRepository<MatchingRepairBackBill, Integer>, JpaSpecificationExecutor<MatchingRepairBackBill> {
MatchingRepairBackBill findByDeviceRepairBillId(Integer repairBillId);
@Query("select o from MatchingRepairBackBill o where o.receiveUnit= :unitName and o.createTime >= :startTime and o.createTime <= :endTime")
List<MatchingRepairBackBill> findAllByUnitBetweenTime(String unitName, Date startTime, Date endTime);
}
package com.tykj.dev.device.matching.repository;
import com.tykj.dev.device.matching.subject.domin.MatchingRepairDetail;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
public interface MatchingRepairDetailDao extends JpaRepository<MatchingRepairDetail, Integer>, JpaSpecificationExecutor<MatchingRepairDetail> {
List<MatchingRepairDetail> findByDeviceSendRepairBillId(Integer billId);
List<MatchingRepairDetail> findByRepairBackBillId(Integer billId);
List<MatchingRepairDetail> findAllByRepairStatusAndOwnUnit(Integer repairStatus,String ownUnit);
List<MatchingRepairDetail> findAllByRepairStatusIn(List<Integer> repairStatus, Sort s);
List<MatchingRepairDetail> findAllByRepairStatusNotIn(List<Integer> repairStatus, Sort s);
List<MatchingRepairDetail> findAllByRepairStatus(Integer repairStatus);
List<MatchingRepairDetail> findAllByRepairStatus(Integer repairStatus, Sort s);
List<MatchingRepairDetail> findAllByDeviceId(Integer deviceId);
List<MatchingRepairDetail> findAllByPid(Integer pid);
@Transactional
@Modifying
@Query("update MatchingRepairDetail r set r.record = :record where r.id = :id")
void updateRecord(String record,Integer id);
@Transactional
@Modifying
@Query("update MatchingRepairDetail r set r.record2 = :record where r.id = :id")
void updateRecord2(String record,Integer id);
@Transactional
@Modifying
@Query("update MatchingRepairDetail r set r.record3 = :record where r.id = :id")
void updateRecord3(String record,Integer id);
List<MatchingRepairDetail> findAllByIdIn(List<Integer> ids);
@Transactional
@Modifying
@Query("update RepairDetail r set r.model = :model where r.deviceId in :ids")
void updateModel(String model,List<Integer> ids);
List<MatchingRepairDetail> findAllByModel(String model);
List<MatchingRepairDetail> findAllByDeviceIdIn(List<Integer> deviceIds);
@Transactional
@Modifying
@Query("update MatchingRepairDetail r set r.remark = :remake where r.id in :repairDetailIds")
void updateRemakeForClear(@Param("remake") String remake,@Param("repairDetailIds") List<Integer> repairDetailIds);
}
package com.tykj.dev.device.matching.repository;
import com.tykj.dev.device.matching.subject.domin.MatchingRepairSendBill;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import java.util.List;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 9:59
*/
public interface MatchingRepairSendBillDao extends JpaRepository<MatchingRepairSendBill, Integer>, JpaSpecificationExecutor<MatchingRepairSendBill> {
// MatchingRepairSendBill findByDeviceRepairBillId(Integer id);
List<MatchingRepairSendBill> findAllByIdIn(List<Integer> ids);
}
package com.tykj.dev.device.matching.service;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceChange;
/**
* @author zsp
* @version 1.0
* @date 2022/6/7 10:41
*/
public interface MatchingDeviceChangeService {
void add(MatchingDeviceChange matchingDeviceChange);
}
package com.tykj.dev.device.matching.service;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceLibrary;
import com.tykj.dev.device.matching.subject.vo.MatchingUnitVo;
import com.tykj.dev.device.matching.subject.vo.MatchingDeviceSelectVo;
......@@ -22,6 +23,7 @@ public interface MatchingDeviceLibraryService {
*/
MatchingDeviceLibrary addEntity(MatchingDeviceLibrary matchingDeviceLibraryEntity);
/**
* @param matchingDeviceLibraries 异步上链
*/
......@@ -115,4 +117,36 @@ public interface MatchingDeviceLibraryService {
void updateMatchingDeviceCreateUnitNameByUnitName(MatchingUnitVo matchingUnitVo);
void batchUpdateStatus(StatusVO statusVO);
/**
* 判断装备状态是否在库(若不是抛出303异常)
*/
void isInStock(List<Integer> ids);
/**
* 根据id查询集合
* @param ids 配套设备id的集合
* @return 配套设备
*/
List<MatchingDeviceLibrary> findAllById(List<Integer> ids);
/**
* 判断配套设备是不是在库或者维修
* @param split
*/
void isInStockOrRepairing(List<Integer> split);
List<MatchingDeviceLibrary> getAllBySeqNumber(String seqNumber);
/**
* 获取所有配套设备装备id map
*/
Map<Integer, MatchingDeviceLibrary> getAllDeviceMap();
/**
* @param lifeStatus 更新装备生命信息
*/
void updateLifeStatus2(Integer lifeStatus,List<Integer> ids);
}
package com.tykj.dev.device.matching.service;
import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.matching.subject.domin.MatchingRepairBackBill;
import com.tykj.dev.device.matching.subject.domin.MatchingRepairDetail;
import com.tykj.dev.device.matching.subject.vo.repair.MatchingFileUploadVO;
import com.tykj.dev.device.matching.subject.vo.repair.MatchingFileVO;
import com.tykj.dev.device.matching.subject.vo.repair.MatchingRepairBillSelectVo;
import com.tykj.dev.device.matching.subject.vo.repair.MatchingRepairReceiveVO;
import com.tykj.dev.device.matching.subject.vo.repair.back.MatchingRepairBackBillSaveVo;
import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Map;
/**
* @author zsp
*/
public interface MatchingRepairBackBillService {
MatchingRepairBackBill getOne(Integer id);
/**
* @param repairBackBills 异步上链
*/
void sendHash(List<MatchingRepairBackBill> repairBackBills);
MatchingRepairBackBill save(MatchingRepairBackBill matchingRepairBackBill);
MatchingRepairBackBill update(MatchingRepairBackBill matchingRepairBackBill);
Page<MatchingRepairBackBill> getPage(MatchingRepairBillSelectVo deviceRepairBillSelectVo, Pageable pageable);
/**
* 根据taskId查询单据
* @param taskId
* @return
*/
Map<String,List<FileRet>> getFileList(Integer taskId);
/**
* 判断维修装备是否同一个送修单位
* @return
*/
List<Integer> judge(List<Integer> ids);
/**
* 保存维修退回操作(草稿)
*/
MatchingRepairBackBill saveRepairBackBill(MatchingRepairBackBillSaveVo repairBackBillSaveVo);
/**
* 修好装备出库
*/
MatchingRepairBackBill repairBack(MatchingRepairBackBillSaveVo repairBackBillSaveVo);
/**
* 修好装备送回接收入库
*/
void backReceive(MatchingRepairReceiveVO repairReceiveVo);
/**
* 维修退回申请电子签章
*/
void backApplySign(Integer taskId,Integer userId);
/**
* 维修退回申请电子签章审核
*/
void backApplySignConfirm(Integer taskId,Integer status);
/**
* 接收方上传领取单
*/
void uploadRepairBackBill(MatchingFileUploadVO fileUploadVo);
/**
* 发件方上传领取单
*/
void uploadFile(MatchingFileVO fileVo);
/**
* 维修退回的撤回
*/
MessageBto revokeRepairBackTask(Integer taskId);
void delete(Integer id);
}
package com.tykj.dev.device.matching.service;
import com.tykj.dev.device.matching.subject.domin.MatchingRepairDetail;
import com.tykj.dev.device.matching.subject.vo.repair.MatchingFileVO;
import com.tykj.dev.device.matching.subject.vo.repair.MatchingRepairRecord;
import com.tykj.dev.device.matching.subject.vo.repair.MatchingUpdateRemarkVOs;
import com.tykj.dev.device.matching.subject.vo.repair.detail.MatchingRepairBillDetailVo;
import com.tykj.dev.device.matching.subject.vo.repair.detail.MatchingRepairTaskSelectVo;
import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity;
import java.util.List;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceRepairDetailService.java
* @Description TODO
* @createTime 2020年08月25日 10:33:00
*/
public interface MatchingRepairDetailService {
/**
* 根据billid查询维修单的设备
*
* @param billId 维修单id
* @return 所对应的装备信息
*/
List<MatchingRepairDetail> findByBillId(Integer billId);
/**
* 根据billid查询维修单的设备
*
* @param billId 维修退回单据id
* @return 所对应的装备信息
*/
List<MatchingRepairDetail> findByBackBillId(Integer billId);
/**
* 修改业务对应装备的状态
*
* @param id 对应装备的id
* @param status 修改的状态
* @return 修改的对装备对象
*/
MatchingRepairDetail updateIdAndStatus(Integer id, Integer status);
/**
* @param id 主键id
* 根据主键Id查询
*/
MatchingRepairDetail getOne(Integer id);
/**
* 配套设备加入待维修列表
* @param ids 设备的id
*/
void addList(List<Integer> ids);
void update(MatchingRepairDetail oldRepairDetail);
MatchingRepairDetail save(MatchingRepairDetail repairDetail);
void updateRemark(MatchingUpdateRemarkVOs updateRemarkVOs);
/**
* 上传维修记录备注
* @param repairRecord
*/
void uploadRecord(MatchingRepairRecord repairRecord);
/**
* 查询待领取装备阅知详情
* @param s
* @return
*/
List<MatchingRepairDetail> getDetail(String s);
List<MatchingRepairDetail> findByRepairBackBillId(Integer id);
/**
* 查询维修详情
* @param id 任务id
*/
MatchingRepairBillDetailVo getDetailList(Integer id);
/**
* 查询维修管理列表
*/
ResponseEntity getRepairList(MatchingRepairTaskSelectVo repairTaskSelectVo);
}
package com.tykj.dev.device.matching.service;
import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.matching.subject.domin.MatchingRepairSendBill;
import com.tykj.dev.device.matching.subject.vo.repair.*;
import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 9:57
*/
public interface MatchingRepairSendBillService {
MatchingRepairSendBill addEntity(MatchingRepairSendBill deviceRepairSendBillEntity);
Page<MatchingRepairSendBill> getPage(MatchingRepairBillSelectVo deviceRepairBillSelectVo, Pageable pageable);
MatchingRepairSendBill getOne(Integer id);
MatchingRepairSendBill update(MatchingRepairSendBill deviceRepairSendBillEntity);
void delete(Integer id);
/**
* 根据taskId查询单据
* @param taskId
* @return
*/
Map<String,List<FileRet>> getFileList(Integer taskId);
/**
* 发起配套设备的维修
* @param repairBillSaveVo repairBillSave
* @return MatchingRepairSendBill
*/
MatchingRepairSendBill startSendBill(MatchingRepairBillSaveVo repairBillSaveVo);
/**
* 保存维修操作
* @param repairBillSaveVo
*/
MatchingRepairSendBill saveRepairBill(MatchingRepairBillSaveVo repairBillSaveVo);
/**
* 接收维修装备
* @param repairReceiveVO 接收的vo
* @return 实体
*/
MatchingRepairSendBill receiveRepairBill(MatchingRepairReceiveVO repairReceiveVO);
/**
* 申请签章
* @param signVO
*/
void applySign(SignVO signVO);
/**
* 签章审核
* @param checkSignVO 审核vo
*/
void checkSign(CheckSignVO checkSignVO);
/**
* 上传接收方送修单
* @param matchingFileUploadVO
* @return
*/
MatchingRepairSendBill receiveRepairFile(MatchingFileUploadVO matchingFileUploadVO);
/**
*市县上传发送方送修单
*/
void uploadRepairFile(MatchingFileVO fileVo);
/**
* 更改维修装备状态
* @param repairStatusChangeVo
*/
void changeRepairDeviceStatus(MatchingRepairStatusChangeVO repairStatusChangeVo);
/**
* 配套设备换新
* @param deviceEditVo
*/
void change(MatchingRepairDeviceEditVO deviceEditVo);
List<MatchingRepairSendBill> findByIds(List<Integer> sendRepairIds);
/**
* 维修撤回
*/
MessageBto revokeRepairTask(Integer taskId);
}
package com.tykj.dev.device.matching.service.impl;
import com.tykj.dev.device.matching.repository.MatchingDeviceChangeDao;
import com.tykj.dev.device.matching.service.MatchingDeviceChangeService;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceChange;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* @author zsp
* @version 1.0
* @date 2022/6/7 10:41
*/
@Service
public class MatchingDeviceChangeServiceImpl implements MatchingDeviceChangeService {
@Resource
private MatchingDeviceChangeDao matchingDeviceChangeDao;
@Override
public void add(MatchingDeviceChange matchingDeviceChange) {
matchingDeviceChangeDao.save(matchingDeviceChange);
}
}
......@@ -7,6 +7,7 @@ import com.tykj.dev.blockcha.subject.service.BlockChainUtil;
import com.tykj.dev.config.TaskBeanConfig;
import com.tykj.dev.device.library.service.DeviceLogService;
import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.matching.repository.MatchingDeviceLibraryDao;
import com.tykj.dev.device.matching.rfid.MatchingDeviceRfidService;
import com.tykj.dev.device.matching.rfid.MatchingDeviceRfidServiceImpl;
......@@ -30,6 +31,7 @@ import com.tykj.dev.rfid.entity.vo.RfidPrintVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
......@@ -229,7 +231,7 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
List<Integer> unitIds = userPublicService.findByUnitIdSubordinateAll(unitId).stream().map(Units::getUnitId).collect(Collectors.toList());
return matchingDeviceLibraryDao.findAllByCreateUnitIdIn(unitIds).stream().filter(matchingDeviceLibrary -> matchingDeviceLibrary.getMatchingDeviceStatus()!=3).collect(Collectors.toList());
return matchingDeviceLibraryDao.findAllByCreateUnitIdIn(unitIds).stream().filter(matchingDeviceLibrary -> matchingDeviceLibrary.getLifeStatus()!=5).collect(Collectors.toList());
}
/**
......@@ -368,6 +370,48 @@ public class MatchingDeviceLibraryServiceImpl implements MatchingDeviceLibrarySe
deviceLogService.addAllLog(deviceLogDtos);
}
@Override
public void isInStock(List<Integer> ids) {
ids.forEach(integer -> {
MatchingDeviceLibrary library = getOne(integer);
if (library.getLifeStatus()!=2&&library.getLifeStatus()!=3){
throw new ApiException(ResponseEntity.status(303).body("序列号"+library.getSeqNumber()+"的装备已被其他专管员操作"));
}
});
}
@Override
public List<MatchingDeviceLibrary> findAllById(List<Integer> ids) {
return matchingDeviceLibraryDao.findAllById(ids);
}
@Override
public void isInStockOrRepairing(List<Integer> split) {
split.forEach(integer -> {
MatchingDeviceLibrary library = getOne(integer);
if (library.getLifeStatus()!=2 &&library.getLifeStatus()!=3 && library.getLifeStatus()!=4){
throw new ApiException(ResponseEntity.status(303).body("序列号"+library.getSeqNumber()+"的装备已被其他专管员操作"));
}
});
}
@Override
public List<MatchingDeviceLibrary> getAllBySeqNumber(String seqNumber) {
return matchingDeviceLibraryDao.findAllBySeqNumber(seqNumber);
}
@Override
public Map<Integer, MatchingDeviceLibrary> getAllDeviceMap() {
List<MatchingDeviceLibrary> libraries = matchingDeviceLibraryDao.findAll();
libraries.forEach(MatchingDeviceLibrary::setConfigName);
return libraries.stream().collect(Collectors.toMap(MatchingDeviceLibrary::getId, Function.identity()));
}
@Override
public void updateLifeStatus2(Integer lifeStatus, List<Integer> ids) {
matchingDeviceLibraryDao.batchUpdate2(lifeStatus,ids);
}
/**
* @param matchingDeviceSelectVo 配套设备查询vo
......
package com.tykj.dev.device.matching.subject.domin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
/**
* @author zsp
* @version 1.0
* @date 2022/6/7 10:39
*/
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update matching_device_change set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0")
@ApiModel("配套设备维修新装备换新表")
public class MatchingDeviceChange {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY) @ApiModelProperty(name = "主键id")
@Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT")
private Integer id;
@ApiModelProperty(name = "旧装备id")
private Integer oldDeviceId;
@ApiModelProperty(name = "新装备id")
private Integer newDeviceId;
@CreatedBy
@ApiModelProperty(value = "创建用户id")
private Integer createUserId;
/**
* 创建时间
*/
@CreatedDate
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
/**
* 更新用户id
*/
@LastModifiedBy
@ApiModelProperty(value = "更新用户id")
private Integer updateUserId;
/**
* 更新时间
*/
@LastModifiedDate
@ApiModelProperty(value = "更新时间")
private java.util.Date updateTime;
@ApiModelProperty(value = "删除标记(0:未删除,1:已删除)")
private Integer deleteTag = 0;
@ApiModelProperty(value = "区块链记录id")
private String recordId;
@Column(name = "change_files",columnDefinition = "TEXT")
private String changeFiles;
}
......@@ -67,6 +67,12 @@ public class MatchingDeviceLibrary {
@ApiModelProperty(value = "创建单位Id")
private Integer createUnitId;
/**
* 所在单位
*/
@ApiModelProperty(value = "所在单位Id")
private Integer locationUnitId;
/**
* 设备序列号
*/
......@@ -85,7 +91,7 @@ public class MatchingDeviceLibrary {
/**
* 生命状态,0,-入库待审核,1-入库审核失败,2-在库
*/
@ApiModelProperty(value = "生命状态,0,-入库待审核,1-入库审核失败,2-在库")
@ApiModelProperty(value = "生命状态,0,-入库待审核,1-入库审核失败,2-在库 3 使用中 4 维修 5停用 6 已报废 7 丢失")
private Integer lifeStatus;
/**
* 创建用户id
......@@ -145,8 +151,8 @@ public class MatchingDeviceLibrary {
@ApiModelProperty(value = "存放位置id")
private Integer matchingDeviceStorageLocationId;
@ApiModelProperty(value = "设备状态",example = "0 在库 1 使用中 2 维修 3停用")
private Integer matchingDeviceStatus = 0;
// @ApiModelProperty(value = "设备状态",example = "0 在库 1 使用中 2 维修 3停用")
// private Integer matchingDeviceStatus = 0;
@ApiModelProperty(value = "备注")
@Column(name = "remake",columnDefinition = "TEXT")
......@@ -155,6 +161,12 @@ public class MatchingDeviceLibrary {
@ApiModelProperty(value = "停用设备信息的单位id")
private Integer stopUnitId = 0;
/**
* 锁定状态,0-未锁定可用,1-锁定不可用
*/
@ApiModelProperty(value = "锁定状态,0-未锁定可用,1-锁定不可用")
private Integer lockStatus = 0;
@ApiModelProperty(value = "停用单位的id")
@Column(name = "status_json",columnDefinition = "TEXT")
private String statusJson;
......@@ -162,6 +174,17 @@ public class MatchingDeviceLibrary {
@Transient
private FileRet statusJsonRet;
/**
* 检查结果(0:丢失,1:无误,2:新增)
*/
@ApiModelProperty(value = "检查结果(0:丢失,1:无误,2:新增)")
@Transient
private Integer checkResult;
@ApiModelProperty(value = "维修状态")
@Transient
private Integer repairStatus;
public MatchingDeviceLibrary setConfigName(){
ConfigCache configCache = SpringUtils.getBean("initConfigCache");
if (configCache != null) {
......
package com.tykj.dev.device.matching.subject.domin;
import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* entity class for repair_back_bill
* 装备维修完成退回账单
*/
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update repair_back_bill set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0")
@ApiModel("装备维修完成退回账单")
public class MatchingRepairBackBill {
/**
* 主键id
*/
@Id
@GeneratedValue
@ApiModelProperty(name = "主键id")
@Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT")
private Integer id;
/**
* 维修退回标题
*/
@ApiModelProperty(value = "维修退回标题")
private String title;
/**
* 申请文号
*/
@ApiModelProperty(value = "申请文号")
private String applyNumber;
/**
* 批复文号
*/
@ApiModelProperty(value = "批复文号")
private String replayNumber;
/**
* 发件单位
*/
@ApiModelProperty(value = "发件单位")
private String sendUnit;
@ApiModelProperty(value = "发件单位Id")
private Integer sendUnitId;
/**
* 收件单位
*/
@ApiModelProperty(value = "收件单位")
private String receiveUnit;
@ApiModelProperty(value = "收件单位Id")
private Integer receiveUnitId;
/**
* 配发时间
*/
@ApiModelProperty(value = "配发时间")
private Date sendTime;
/**
* 接收时间
*/
@ApiModelProperty(value = "接收时间")
private Date receiveTime;
/**
* 维修单id
*/
@ApiModelProperty(value = "维修单id")
private Integer deviceRepairBillId;
/**
* 维修完成退回经办人id(省A岗)
*/
@ApiModelProperty(value = "维修完成退回经办人id(省A岗)")
private Integer startUseraId;
/**
* 维修完成退回审核人id(省B岗)
*/
@ApiModelProperty(value = "维修完成退回审核人id(省B岗)")
private Integer startUserbId;
/**
* 维修完成接收单位经办人id(市A岗)
*/
@ApiModelProperty(value = "维修完成接收单位经办人id(市A岗)")
private Integer receiveUseraId;
/**
* 维修完成接收单位审核人id(市B岗)
*/
@ApiModelProperty(value = "维修完成接收单位审核人id(市B岗)")
private Integer receiveUserbId;
/**
* 出库附件文件名
*/
@ApiModelProperty(value = "出库附件文件名")
private String fileName;
/**
* 出库附件文件地址URL
*/
@Column(name = "file_url",columnDefinition = "TEXT")
@ApiModelProperty(value = "出库附件文件地址URL")
private String fileUrl;
/**
* 入库附件文件名
*/
@ApiModelProperty(value = "入库附件文件名")
private String receiveFileName;
/**
* 入库附件文件地址URL
*/
@Column(name = "receive_file_url",columnDefinition = "TEXT")
@ApiModelProperty(value = "入库附件文件地址URL")
private String receiveFileUrl;
/**
* 账单文件名
*/
@ApiModelProperty(value = "账单文件名")
private String billFileName;
/**
* 账单文件地址URL
*/
@Column(name = "bill_file_url",columnDefinition = "TEXT")
@ApiModelProperty(value = "账单文件地址URL")
private String billFileUrl;
/**
* 应出库装备数量
*/
@ApiModelProperty(value = "应出库装备数量")
private Integer sendingCount;
/**
* 已出库装备数量
*/
@ApiModelProperty(value = "已出库装备数量")
private Integer sendedCount;
/**
* 已接收装备数量
*/
@ApiModelProperty(value = "已接收装备数量")
private Integer receiveCount;
/**
* 退回状态(1:维修成功出库待审核,2:维修成功出库审核失败,3:重新配发出库待审核,4:重新配发出库审核失败,5:退回中,5:送修方接收待审核,6:送修方接收审核失败,7:维修退回完成)
*/
@ApiModelProperty(value = "退回状态(0:草稿,2:退回中,5:维修退回完成)")
private Integer backStatus;
/**
* 维修完成出库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配
*/
@Column(name = "back_check_detail",columnDefinition = "TEXT")
@ApiModelProperty(value = "维修完成出库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配")
private String backCheckDetail;
/**
* 维修完成出库检查结果
*/
@ApiModelProperty(value = "维修完成出库检查结果")
private String backCheckResult;
/**
* 维修完成接收入库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配
*/
@Column(name = "back_recive_check_detail",columnDefinition = "TEXT")
@ApiModelProperty(value = "维修完成接收入库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配")
private String backReciveCheckDetail;
/**
* 维修完成接收入库检查结果
*/
@ApiModelProperty(value = "维修完成接收入库检查结果")
private String backReciveCheckResult;
/**
* 创建用户id
*/
@CreatedBy
@ApiModelProperty(value = "创建用户id")
private Integer createUserId;
/**
* 创建时间
*/
@CreatedDate
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新用户id
*/
@LastModifiedBy
@ApiModelProperty(value = "更新用户id")
private Integer updateUserId;
/**
* 更新时间
*/
@LastModifiedDate
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 删除标记(0:未删除,1:已删除)
*/
@ApiModelProperty(value = "删除标记(0:未删除,1:已删除)")
private Integer deleteTag = 0;
/**
* 签发人
*/
@ApiModelProperty(value = "签发人")
private String agent;
/**
* 维修回执单档案号
*/
@ApiModelProperty(value = "维修单档案号")
private String docNum;
@ApiModelProperty(value = "发起人")
@Transient
private String startUserA;
@ApiModelProperty(value = "发起确认人")
@Transient
private String startUserB;
@ApiModelProperty(value = "接收人")
@Transient
private String receiveUserA;
@ApiModelProperty(value = "接收确认人")
@Transient
private String receiveUserB;
@ApiModelProperty(value = "发件单位签章id")
private String leftSignatureId;
@ApiModelProperty(value = "收件单位签章id")
private String rightSignatureId;
@ApiModelProperty(value = "区块链记录id")
private String recordId;
@ApiModelProperty(value = "发件方上传单据")
@Column(name = "send_files",columnDefinition = "TEXT")
private String sendFiles;
@ApiModelProperty(value = "收件方上传单据")
@Column(name = "receive_files",columnDefinition = "TEXT")
private String receiveFiles;
@ApiModelProperty(value = "单据json")
@Column(name = "script_json",columnDefinition = "TEXT")
private String scriptJson;
@Transient
private List<ScriptSaveVo> scripts = new ArrayList<>();
@Transient
private List<FileRet> sendFileList = new ArrayList<>();
@Transient
private List<FileRet> receiveFileList = new ArrayList<>();
@ApiModelProperty("任务id")
@Transient
private Integer taskId;
@ApiModelProperty(value = "装备集合")
@Transient
private List<MatchingDeviceLibrary> deviceLibraries;
}
package com.tykj.dev.device.matching.subject.domin;
import com.tykj.dev.config.cache.ConfigCache;
import com.tykj.dev.misc.utils.SpringUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.util.Date;
/**
* entity class for repair_detail
* 装备维修账单
*/
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update repair_detail set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0")
@ApiModel("装备维修详情")
public class MatchingRepairDetail {
/**
* 主键id
*/
@Id
@GeneratedValue
@ApiModelProperty(name = "主键id")
@Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT")
private Integer id;
@ApiModelProperty(name = "父id")
private Integer pid;
/**
* 装备id
*/
@ApiModelProperty(value = "装备id")
private Integer deviceId;
/**
* 型号
*/
@ApiModelProperty(value = "型号")
private String model;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
private String name;
/**
* 类型
*/
@ApiModelProperty(value = "类型")
private Integer type;
/**
* 装备序列号
*/
@ApiModelProperty(value = "装备序列号")
private String seqNumber;
/**
* rfid表面号
*/
@ApiModelProperty(value = "rfid表面号")
private String rfidSurfaceId;
/**
* 维修单id
*/
@ApiModelProperty(value = "维修单id")
private Integer deviceSendRepairBillId;
/**
* 所在单位
*/
@ApiModelProperty(value = "所在单位")
private String locationUnit;
@ApiModelProperty(value = "所在单位Id")
private Integer locationUnitId;
/**
* 所属单位
*/
@ApiModelProperty(value = "所属单位")
private String ownUnit;
@ApiModelProperty(value = "所属单位Id")
private Integer ownUnitId;
/**
* 维修状态
*/
@ApiModelProperty(value = "维修状态")
private Integer repairStatus;
/**
* 维修备注
*/
@ApiModelProperty(value = "维修备注")
private String remark;
/**
* 维修领取备注
*/
@ApiModelProperty(value = "维修领取备注")
private String backRemark;
/**
* 已报废换新装备详情主键Id(null代表没有报废,0代表已报废还没有换新)
*/
@ApiModelProperty(value = "已报废换新装备详情主键Id(null代表没有报废,0代表已报废还没有换新)")
private Integer newDeviceDetailId;
/**
* 创建用户id
*/
@ApiModelProperty(value = "创建用户id")
@CreatedBy
private Integer createUserId;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@CreatedDate
private Date createTime;
/**
* 更新用户id
*/
@ApiModelProperty(value = "更新用户id")
@LastModifiedBy
private Integer updateUserId;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
@LastModifiedDate
private Date updateTime;
/**
* 删除标记(0:未删除,1:已删除)
*/
@ApiModelProperty(value = "删除标记(0:未删除,1:已删除)")
private Integer deleteTag = 0;
@ApiModelProperty(value = "区块链记录id")
private String recordId;
@ApiModelProperty(value = "省维修记录信息")
private String record;
@ApiModelProperty(value = "市维修记录信息")
private String record2;
@ApiModelProperty(value = "县维修记录信息")
private String record3;
@ApiModelProperty(value = "领取单id")
private Integer repairBackBillId;
@ApiModelProperty(value = "形态")
@Transient
private String typeName;
/**
* set 中文名称
*/
public MatchingRepairDetail setConfigName(){
ConfigCache configCache = SpringUtils.getBean("initConfigCache");
if (configCache != null) {
setTypeName(configCache.getStyleMap().get(this.type)==null?"-":configCache.getStyleMap().get(this.type));
}
return this;
}
}
package com.tykj.dev.device.matching.subject.domin;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 10:00
*/
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update matching_repair_send_bill set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0")
@ApiModel("装备送修账单")
public class MatchingRepairSendBill {
/**
* 主键id
*/
@Id
@GeneratedValue
@ApiModelProperty(name = "主键id")
@Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT")
private Integer id;
/**
* 维修标题
*/
@ApiModelProperty(value = "维修标题")
private String title;
/**
* 申请文号
*/
@ApiModelProperty(value = "申请文号")
private String applyNumber;
/**
* 批复文号
*/
@ApiModelProperty(value = "批复文号")
private String replayNumber;
/**
* 发件单位
*/
@ApiModelProperty(value = "发件单位")
private String sendUnit;
@ApiModelProperty(value = "发件单位Id")
private Integer sendUnitId;
/**
* 收件单位
*/
@ApiModelProperty(value = "收件单位")
private String receiveUnit;
@ApiModelProperty(value = "收件单位Id")
private Integer receiveUnitId;
/**
* 配发时间
*/
@ApiModelProperty(value = "配发时间")
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",shape = JsonFormat.Shape.STRING,timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
private Date sendTime;
/**
* 接收时间
*/
@ApiModelProperty(value = "接收时间")
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",shape = JsonFormat.Shape.STRING,timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
private Date receiveTime;
/**
* 发起维修经办人id(市A岗)
*/
@ApiModelProperty(value = "发起维修经办人id(市A岗)")
private Integer startUseraId;
/**
* 发起维修审核人id(市B岗)
*/
@ApiModelProperty(value = "发起维修审核人id(市B岗)")
private Integer startUserbId;
/**
* 维修接收单位经办人id(省A岗)
*/
@ApiModelProperty(value = "维修接收单位经办人id(省A岗)")
private Integer repairUseraId;
/**
* 维修接收单位审核人id(省B岗)
*/
@ApiModelProperty(value = "维修接收单位审核人id(省B岗)")
private Integer repairUserbId;
/**
* 维修状态(0:草稿,1:维修任务审核失败,2:维修装备送到上级中,3:上级接收维修装备待审核,4:上级接收维修装备审核失败,5:维修中,6:维修完成退回中,7:维修完成)
*/
@ApiModelProperty(value = "维修状态(0:草稿,1:维修任务审核失败,2:维修装备送到上级中,3:上级接收维修装备待审核,4:上级接收维修装备审核失败,5:维修中,6:维修完成退回中,7:维修完成)")
private Integer repairStatus;
@Column(name = "repair_device_detail",columnDefinition = "TEXT")
@ApiModelProperty(value = "Ǵ作为分隔符,维修装备的主键id加备注,例如x1Ǵ备注1Ǵx2Ǵ备注2Ǵx,意为id为1的装备在维修,备注为备注1,id为2的装备在维修,备注为备注2")
private String repairDeviceDetail;
/**
* 送修装备出库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配
*/
@Column(name = "repair_device_check_detail",columnDefinition = "TEXT")
@ApiModelProperty(value = "送修装备出库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配")
private String repairDeviceCheckDetail;
/**
* 送修装备出库检查结果
*/
@ApiModelProperty(value = "送修装备出库检查结果")
private String repairDeviceCheckResult;
/**
* 送修装备接收入库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配
*/
@Column(name = "repair_recive_check_detail",columnDefinition = "TEXT")
@ApiModelProperty(value = "送修装备接收入库详情(装备主键id+核对结果(0缺失1无误3不匹配,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的不匹配")
private String repairReciveCheckDetail;
/**
* 送修装备接收入库检查结果
*/
@ApiModelProperty(value = "送修装备接收入库检查结果")
private String repairReciveCheckResult;
/**
* 出库附件文件名
*/
@ApiModelProperty(value = "出库附件文件名")
private String fileName;
/**
* 出库附件文件地址URL
*/
@Column(name = "file_url",columnDefinition = "TEXT")
@ApiModelProperty(value = "出库附件文件地址URL")
private String fileUrl;
/**
* 入库附件文件名
*/
@ApiModelProperty(value = "入库附件文件名")
private String receiveFileName;
/**
* 入库附件文件地址URL
*/
@Column(name = "receive_file_url",columnDefinition = "TEXT")
@ApiModelProperty(value = "入库附件文件地址URL")
private String receiveFileUrl;
/**
* 账单文件名
*/
@ApiModelProperty(value = "账单文件名")
private String billFileName;
/**
* 账单文件地址URL
*/
@Column(name = "bill_file_url",columnDefinition = "TEXT")
@ApiModelProperty(value = "账单文件地址URL")
private String billFileUrl;
/**
* 应出库装备数量
*/
@ApiModelProperty(value = "应出库装备数量")
private Integer sendingCount;
/**
* 已出库装备数量
*/
@ApiModelProperty(value = "已出库装备数量")
private Integer sendedCount;
/**
* 已接收装备数量
*/
@ApiModelProperty(value = "已接收装备数量")
private Integer receiveCount;
/**
* 创建用户id
*/
@CreatedBy
@ApiModelProperty(value = "创建用户id")
private Integer createUserId;
/**
* 创建时间
*/
@CreatedDate
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新用户id
*/
@LastModifiedBy
@ApiModelProperty(value = "更新用户id")
private Integer updateUserId;
/**
* 更新时间
*/
@LastModifiedDate
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 删除标记(0:未删除,1:已删除)
*/
@ApiModelProperty(value = "删除标记(0:未删除,1:已删除)")
private Integer deleteTag = 0;
/**
* 签发人
*/
@ApiModelProperty(value = "签发人")
private String agent;
@ApiModelProperty(value = "申请人")
@Transient
private String startUserA;
@ApiModelProperty(value = "申请确认人")
@Transient
private String startUserB;
@ApiModelProperty(value = "维修经手人")
private String repairUserA;
@ApiModelProperty(value = "维修核验人")
@Transient
private String repairUserB;
@ApiModelProperty(value = "区块链记录id")
private String recordId;
@ApiModelProperty(value = "发件方上传单据")
@Column(name = "send_files",columnDefinition = "TEXT")
private String sendFiles;
@ApiModelProperty(value = "收件方上传单据")
@Column(name = "receive_files",columnDefinition = "TEXT")
private String receiveFiles;
@ApiModelProperty(value = "单据json")
@Column(name = "script_json",columnDefinition = "TEXT")
private String scriptJson;
@ApiModelProperty(value = "发件单位签章id")
private String leftSignatureId;
@ApiModelProperty(value = "收件单位签章id")
private String rightSignatureId;
/**
* 维修单档案号
*/
@ApiModelProperty(value = "维修单档案号")
private String docNum;
@Transient
private List<ScriptSaveVo> scripts = new ArrayList<>();
@Transient
private List<FileRet> sendFileList = new ArrayList<>();
@Transient
private List<FileRet> receiveFileList = new ArrayList<>();
@ApiModelProperty(value = "任务id")
@Transient
private Integer taskId;
@ApiModelProperty(value = "任务id")
@Transient
private List<MatchingDeviceLibrary> deviceLibraries;
}
package com.tykj.dev.device.matching.subject.vo;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceBill;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceLibrary;
import com.tykj.dev.device.task.subject.vo.TaskLogUserVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author dengdiyi
*/
@Data
@ApiModel("新增配套详情返回类")
public class MatchingDetailVo {
@ApiModelProperty(name = "新增单")
private MatchingDeviceBill matchingDeviceBill;
@ApiModelProperty(name = "新增配套设备")
private List<MatchingDeviceLibrary> matchingDeviceLibraries;
@ApiModelProperty(name = "业务日志")
private List<TaskLogUserVo> taskLogUserVos;
}
......@@ -46,6 +46,8 @@ public class MatchingDeviceBillSaveVo {
@ApiModelProperty(value = "任务id")
private Integer taskId = 0;
@Valid
@NotEmpty(message = "matchingDeviceSaveVoList不能为空")
@ApiModelProperty(value = "配套设备列表")
......
package com.tykj.dev.device.matching.subject.vo;
import com.tykj.dev.device.library.subject.vo.DeviceLogUserVo;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceLibrary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author dengdiyi
*/
@Data
@ApiModel("配套设备详情返回类")
public class MatchingDeviceDetailVo {
@ApiModelProperty(name = "配套设备")
private MatchingDeviceLibrary matchingDeviceLibrary;
@ApiModelProperty(name = "设备履历日志")
private List<DeviceLogUserVo> deviceLogUserVos;
}
......@@ -58,6 +58,9 @@ public class MatchingDeviceEditVo {
@ApiModelProperty(value = "生命状态", example = "1")
private Integer lifeStatus;
@ApiModelProperty(value = "设备状态",example = "2-在库 3 使用中 4 维修 5停用")
private String lifeStatusName;
@ApiModelProperty(value = "新增装备信息列表")
private Integer addDeviceId;
......@@ -70,11 +73,7 @@ public class MatchingDeviceEditVo {
@ApiModelProperty(value = "存放位置id")
private Integer matchingDeviceStorageLocationId;
@ApiModelProperty(value = "设备状态",example = "0 在库 1 使用中 2 维修")
private Integer matchingDeviceStatus;
@ApiModelProperty(value = "设备状态",example = "0 在库 1 使用中 2 维修")
private String matchingDeviceStatusName;
@ApiModelProperty(value = "备注")
private String remake;
......
package com.tykj.dev.device.matching.subject.vo;
import com.tykj.dev.device.library.subject.vo.PackingVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zsp
* @version 1.0
* @date 2022/6/7 10:23
*/
@Data
@ApiModel("配套设备编辑更新类")
public class MatchingDeviceLibraryUpdateVo {
@ApiModelProperty(value = "型号", example = "bmxx")
public String model;
@ApiModelProperty(value = "类型", example = "1")
public Integer type;
@ApiModelProperty(value = "密级", example = "1")
public Integer secretLevel;
@ApiModelProperty(value = "可见范围(应用领域)", example = "1")
public Integer invisibleRange;
@ApiModelProperty(value = "名称", example = "BM-1")
public String name;
@ApiModelProperty(value = "所属单位", example = "省机要局")
public String ownUnit;
@ApiModelProperty(value = "所在单位", example = "省机要局")
public String locationUnit;
/**
* 生命状态,0-入库待审核,1-入库审核失败,2-在库,3-运输中,4-维修中,5,维修失败(报废在省库),6-清退,7-待退装,8-退装,9-待销毁,10-已销毁,11-丢失,12-退役,13-报废不在省库,14-使用
*/
@ApiModelProperty(value = "生命状态", example = "1")
public Integer lifeStatus;
@ApiModelProperty(value = "需要更新信息的装备id")
private Integer deviceId;
@ApiModelProperty(value = "装备序列号")
private String seqNumber;
@ApiModelProperty(value = "生产序列号")
private String prodNumber;
@ApiModelProperty("备注")
private String record;
}
......@@ -40,6 +40,10 @@ public class MatchingDeviceSaveVo {
@ApiModelProperty(value = "创建单位Id")
private Integer createUnitId;
@NotNull(message = "createUnitId不能为空")
@ApiModelProperty(value = "所在单位Id")
private Integer locationUnitId;
@NotNull(message = "seqNumber不能为空")
@ApiModelProperty(value = "设备序列号")
private String seqNumber;
......@@ -64,14 +68,21 @@ public class MatchingDeviceSaveVo {
@ApiModelProperty(value = "存放位置id")
private Integer matchingDeviceStorageLocationId;
@ApiModelProperty(value = "设备状态")
private Integer matchingDeviceStatus =0;
// @ApiModelProperty(value = "设备状态")
// private Integer matchingDeviceStatus =0;
/**
* 锁定状态,0-未锁定可用,1-锁定不可用
*/
@ApiModelProperty(value = "锁定状态,0-未锁定可用,1-锁定不可用")
private Integer lockStatus = 0;
public MatchingDeviceLibrary toDo() {
MatchingDeviceLibrary matchingDeviceLibraryEntity = new MatchingDeviceLibrary();
BeanUtils.copyProperties(this, matchingDeviceLibraryEntity);
matchingDeviceLibraryEntity.setLifeStatus(2);
matchingDeviceLibraryEntity.setDeviceId(0);
matchingDeviceLibraryEntity.setLocationUnitId(this.createUnitId);
// if (matchingDeviceLibraryEntity.getRfidCardId()==null||"".equals(matchingDeviceLibraryEntity.getRfidCardId())){
// matchingDeviceLibraryEntity.setRfidCardId(UUID.randomUUID().toString());
// }
......
package com.tykj.dev.device.matching.subject.vo.repair;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 15:08
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "配套设备签章审核的vo")
public class CheckSignVO {
@ApiModelProperty("任务id")
private Integer taskId;
@ApiModelProperty("状态 1 同意")
private Integer status;
}
package com.tykj.dev.device.matching.subject.vo.repair;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.DeviceLogUserVo;
import com.tykj.dev.device.matching.subject.domin.MatchingDeviceLibrary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.stereotype.Repository;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 13:01
*/
@Data
@ApiModel("配套设备维修详情类")
public class MatchingDeviceVO {
@Min(value = 1,message = "id不能小于1")
@ApiModelProperty(value = "维修详情ID", example = "1")
private Integer id;
@NotNull(message = "deviceId不能为空")
@Min(value = 1,message = "deviceId不能小于1")
@ApiModelProperty(value = "配套设备ID", example = "1")
private Integer deviceId;
@ApiModelProperty(value = "备注")
private String remark;
}
package com.tykj.dev.device.matching.subject.vo.repair;
import com.tykj.dev.device.file.entity.FileRet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 15:17
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("配套设备维修单据上传类")
public class MatchingFileUploadVO {
@NotNull(message = "taskId不能为空")
@Min(value = 1,message = "taskId不能小于1")
@ApiModelProperty(value = "任务Id")
private Integer taskId;
// @NotNull(message = "billFileName不能为空")
@ApiModelProperty(value = "配发单附件名字")
private String billFileName;
// @NotNull(message = "billFileUrl不能为空")
@ApiModelProperty(value = "配发单附件URL")
private String billFileUrl;
@NotNull(message = "status不能为空")
@ApiModelProperty(value = "是否上传单据(0:否,1:是)")
private Integer status;
@ApiModelProperty(value = "接收方配发单")
private List<FileRet> receiveFiles;
@ApiModelProperty(value = "接收单位B岗")
private Integer startUserbId;
@ApiModelProperty(value = "接收单位B岗")
private Integer receiveUserbId;
@ApiModelProperty(value = "接收单位A岗")
private Integer repairUseraId;
@ApiModelProperty(value = "接收单位B岗")
private Integer repairUserbId;
@ApiModelProperty(value = "型号的集合")
private List<String> models;
@ApiModelProperty(value = "接收维修装备的数量")
private Integer deviceCount;
}
package com.tykj.dev.device.matching.subject.vo.repair;
import com.tykj.dev.device.file.entity.FileRet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 16:06
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("配套设备维修单据vo")
public class MatchingFileVO {
@NotNull(message = "taskId不能为空")
@Min(value = 1,message = "taskId不能小于1")
@ApiModelProperty(value = "任务Id")
private Integer taskId;
@ApiModelProperty(value = "领取单附件")
private List<FileRet> sendFiles;
// @NotNull(message = "status不能为空")
@ApiModelProperty(value = "是否上传单据(0:否,1:是)")
private Integer status;
@ApiModelProperty(value = "接收单位A岗")
private Integer receiveUseraId;
@ApiModelProperty(value = "接收单位B岗")
private Integer receiveUserbId;
@ApiModelProperty(value = "发件单位B岗")
private Integer startUserbId;
@ApiModelProperty(value = "接收维修装备的数量")
private Integer deviceCount;
}
package com.tykj.dev.device.matching.subject.vo.repair;
import com.tykj.dev.device.file.entity.FileRet;
import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author zsp
* @version 1.0
* @date 2022/6/6 12:59
*/
@Data
@ApiModel("配套设备维修单存储类")
public class MatchingRepairBillSaveVo {
@ApiModelProperty(value = "维修标题")
private String title;
@NotNull(message = "startUseraId不能为空")
@Min(value = 1,message = "startUseraId不能小于1")
@ApiModelProperty(value = "发起申请人", example = "1")
private Integer startUseraId;
@ApiModelProperty(value = "发起确认人", example = "1")
private Integer startUserbId;
@NotNull(message = "receiveUnit不能为空")
@ApiModelProperty(value = "接收单位", example = "市机要局")
private String receiveUnit;
@NotNull(message = "receiveUnitId不能为空")
@ApiModelProperty(value = "接收单位Id", example = "市机要局")
private Integer receiveUnitId;
@NotNull(message = "sendUnit不能为空")
@ApiModelProperty(value = "发起单位", example = "市机要局")
private String sendUnit;
@NotNull(message = "sendUnitId不能为空")
@ApiModelProperty(value = "发起单位Id", example = "市机要局")
private Integer sendUnitId;
@ApiModelProperty(value = "维修经手人", example = "1")
private Integer repairUseraId;
// @NotNull(message = "applyNumber不能为空")
@ApiModelProperty(value = "申请文号")
private String applyNumber;
// @NotNull(message = "replayNumber不能为空")
@ApiModelProperty(value = "批复文号")
private String replayNumber;
@ApiModelProperty(value = "签发人")
private String agent;
// @NotNull(message = "fileName不能为空")
@ApiModelProperty(value = "出库附件文件名")
private String fileName;
// @NotNull(message = "fileUrl不能为空")
@ApiModelProperty(value = "出库附件文件地址URL")
private String fileUrl;
@ApiModelProperty(value = "维修经手人")
private String repairUserA;
@NotNull(message = "sendingCount不能为空")
@Min(value = 1,message = "sendingCount不能小于1")
@ApiModelProperty(value = "应出库装备数量")
private Integer sendingCount;
@NotNull(message = "sendedCount不能为空")
@Min(value = 0,message = "sendedCount不能小于0")
@ApiModelProperty(value = "已出库装备数量")
private Integer sendedCount;
@NotNull(message = "repairDeviceCheckDetail不能为空")
@ApiModelProperty(value = "送修装备出库详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增")
private String repairDeviceCheckDetail;
@NotNull(message = "repairDeviceCheckResult不能为空")
@ApiModelProperty(value = "送修装备出库检查结果")
private String repairDeviceCheckResult;
@Valid
@NotEmpty(message = "deviceList不能为空")
@ApiModelProperty(value = "维修装备详情列表")
private List<MatchingDeviceVO> deviceList;
@ApiModelProperty(value = "任务Id")
private Integer taskId;
@ApiModelProperty(value = "左签章Id")
private String leftSignatureId;
@ApiModelProperty(value = "发送方附件")
private List<FileRet> sendFileList;
@ApiModelProperty(value = "收件方附件")
private List<FileRet> receiveFileList;
@ApiModelProperty(value = "单据保存vo")
private List<ScriptSaveVo> scriptSaveVos;
@ApiModelProperty(value = "接收单据")
private List<FileRet> receiveFiles;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论