我的任务优化、工程量清单优化、gps消息websocket连接、物资管理:物资验收入库添加附件

This commit is contained in:
2025-09-10 19:38:10 +08:00
parent 7dd6d97a3e
commit 056b28af31
26 changed files with 198 additions and 17 deletions

View File

@ -42,6 +42,14 @@ public class BusBiddingLimitVersions extends BaseEntity {
*/
private String versions;
/**
* 版本号名称
*/
private String versionsName;
/**
* excel文件
*/

View File

@ -44,6 +44,14 @@ public class BusBiddingLimitVersionsBo extends BaseEntity {
@NotBlank(message = "版本号不能为空", groups = { AddGroup.class, EditGroup.class })
private String versions;
/**
* 版本号名称
*/
private String versionsName;
/**
* excel文件
*/

View File

@ -52,6 +52,14 @@ public class BusBiddingLimitVersionsVo implements Serializable {
@ExcelProperty(value = "版本号")
private String versions;
/**
* 版本号名称
*/
private String versionsName;
/**
* excel文件
*/

View File

@ -40,6 +40,11 @@ public class BusBillofquantitiesVersions extends BaseEntity {
*/
private String versions;
/**
* 版本号名称
*/
private String versionsName;
/**
* exlce文件
*/

View File

@ -39,4 +39,11 @@ public class BusBillofquantitiesVersionsBo extends BaseEntity {
private String versions;
/**
* 版本号名称
*/
private String versionsName;
}

View File

@ -48,6 +48,13 @@ public class BusBillofquantitiesVersionsVo implements Serializable {
private String versions;
/**
* 版本号名称
*/
private String versionsName;
/**
* Excel文件
*/

View File

@ -191,8 +191,22 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
throw new ServiceException("上传文件失败");
}
String banBen = BatchNumberGenerator.generateBatchNumber("GCLBB-");
String[] split = StringUtils.split(wordEntity.getFileName(),".xlsx");
String vName = "";
switch (bo.getWorkOrderType()){
case "0":
vName = "投标工程量清单-"+split[0];
case "1":
vName = "限价工程量清单-"+split[0];
case "2":
vName = "招采工程量清单-"+split[0];
case "3":
vName = "物资设备清单-"+split[0];
}
int insert = baseMapper.insert(new BusBillofquantitiesVersions().
setWorkOrderType(bo.getWorkOrderType()).
setVersionsName(vName).
setVersions(banBen).
setProjectId(bo.getProjectId()).
setExcelFile(wordEntity.getUrl()));

View File

@ -57,6 +57,19 @@ public class GpsEquipmentController extends BaseController {
private final IBusProjectService projectService;
/**
* 接收设备数据
* @param jsonData
* @return
*/
@PostMapping("/setData")
public R<Void> setData(@RequestBody String jsonData) {
log.info("接收设备数据:{}", jsonData);
gpsEquipmentService.setData(jsonData);
return toAjax(true);
}
/**
* 接收设备数据
* @param jsonData

View File

@ -97,4 +97,6 @@ public interface IGpsEquipmentService extends IService<GpsEquipment>{
List<GpsProjectVo> getProjectList();
List<GpsEquipmentSonVo> getClientList(Long projectId);
void setData(String jsonData);
}

View File

@ -434,5 +434,18 @@ public class GpsEquipmentServiceImpl extends ServiceImpl<GpsEquipmentMapper, Gps
return gpsEquipmentSonService.getClientList(projectId);
}
@Override
public void setData(String jsonData) {
// 发送给指定用户equipment.getUserId()
WebSocketMessageDto messageDto = new WebSocketMessageDto();
messageDto.setMessage(jsonData);
messageDto.setSessionKeys(Collections.singletonList(1897160897167638522L));
WebSocketUtils.publishMessage(messageDto);
// WebSocketUtils.publishAll(jsonData);
}
}

View File

@ -123,6 +123,16 @@ public class MatMaterialReceive extends BaseEntity {
*/
private String licenseCountFileId;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 附件名称
*/
private String attachmentName;
/**
* 设备材料入库/移交
*/

View File

@ -94,6 +94,16 @@ public class MatMaterialReceiveCreateReq implements Serializable {
*/
private String licenseCountFileId;
private String attachmentId;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 附件名称
*/
private String attachmentName;
/**
* 设备材料入库/移交
*/

View File

@ -87,6 +87,10 @@ public class MatMaterialReceiveUpdateReq implements Serializable {
*/
private String licenseCountFileId;
/**
* 附件id
*/
private String attachmentId;
/**
* 设备材料入库/移交
*/

View File

@ -134,6 +134,15 @@ public class MatMaterialReceiveVo implements Serializable {
*/
private List<SysOssVo> licenseCountFile;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 附件名称
*/
private String attachmentName;
/**
* 设备材料入库/移交
*/

View File

@ -241,7 +241,8 @@ public class MatMaterialReceiveServiceImpl extends ServiceImpl<MatMaterialReceiv
req.getLicenseCountFileId(),
req.getReportCountFileId(),
req.getTechDocCountFileId(),
req.getCertCountFileId());
req.getCertCountFileId(),
req.getAttachmentId());
boolean save = this.save(materialReceive);
if (!save) {
throw new ServiceException("物料接收单新增失败", HttpStatus.ERROR);
@ -305,7 +306,8 @@ public class MatMaterialReceiveServiceImpl extends ServiceImpl<MatMaterialReceiv
req.getLicenseCountFileId(),
req.getReportCountFileId(),
req.getTechDocCountFileId(),
req.getCertCountFileId());
req.getCertCountFileId(),
req.getAttachmentId());
boolean update = this.updateById(materialReceive);
if (!update) {
throw new ServiceException("物料接收单修改失败", HttpStatus.ERROR);
@ -482,9 +484,10 @@ public class MatMaterialReceiveServiceImpl extends ServiceImpl<MatMaterialReceiv
* @param reportCountFileId 报表文件id
* @param techDocCountFileId 技术文档文件id
* @param certCountFileId 证书文件id
* @param attachmentId
*/
private void getFileSize(MatMaterialReceive materialReceive, String licenseCountFileId,
String reportCountFileId, String techDocCountFileId, String certCountFileId) {
String reportCountFileId, String techDocCountFileId, String certCountFileId, String attachmentId) {
if (StringUtils.isNotBlank(licenseCountFileId)) {
int size = Arrays.stream(licenseCountFileId.split(",")).map(Long::parseLong).toList().size();
materialReceive.setLicenseCount(size);
@ -501,6 +504,11 @@ public class MatMaterialReceiveServiceImpl extends ServiceImpl<MatMaterialReceiv
int size = Arrays.stream(certCountFileId.split(",")).map(Long::parseLong).toList().size();
materialReceive.setCertCount(size);
}
if (StringUtils.isNotBlank(attachmentId)) {
SysOssVo ossVo = ossService.getById(Long.valueOf(attachmentId));
materialReceive.setAttachmentUrl(ossVo.getUrl());
materialReceive.setAttachmentName(ossVo.getOriginalName());
}
}
/**

View File

@ -42,6 +42,14 @@ public class BusBLimitListVersions extends BaseEntity {
*/
private String versions;
/**
* 版本号名称
*/
private String versionsName;
/**
* excel文件
*/

View File

@ -44,6 +44,14 @@ public class BusBLimitListVersionsBo extends BaseEntity {
@NotBlank(message = "版本号不能为空", groups = { AddGroup.class, EditGroup.class })
private String versions;
/**
* 版本号名称
*/
private String versionsName;
/**
* excel文件
*/

View File

@ -52,6 +52,14 @@ public class BusBLimitListVersionsVo implements Serializable {
@ExcelProperty(value = "版本号")
private String versions;
/**
* 版本号名称
*/
private String versionsName;
/**
* excel文件
*/