fix:修复供应商属性返回文件列表;物料验收检验联调整个流程;

This commit is contained in:
shusir
2026-04-03 18:00:32 +08:00
parent 59cf9bd8b6
commit ceb3c7084b
15 changed files with 176 additions and 25 deletions

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.qms.mq.producer;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import com.zt.plat.module.qms.mq.SampleEntrustRegistrationAssayCompleteMessage;
@@ -21,6 +22,7 @@ public class SampleEntrustRegistrationAssayCompleteProducer {
* 发送到消息队列
* @param message
*/
@Async
public void sendMessage(SampleEntrustRegistrationAssayCompleteMessage message) {
// rocketMQTemplate.syncSend(SampleEntrustRegistrationAssayCompleteMessage.TOPIC, message);
rocketMQTemplate.syncSendDelayTimeSeconds(SampleEntrustRegistrationAssayCompleteMessage.TOPIC, message, 15);

View File

@@ -102,7 +102,7 @@ public class SupplierPropertiesController extends AbstractFileUploadController i
SupplierPropertiesDO supplierProperties = supplierPropertiesService.getSupplierProperties(id);
CommonResult<List<BusinessFileWithUrlRespDTO>> result = businessFileService.getBusinessFileList(id);
SupplierPropertiesRespVO respVO = BeanUtils.toBean(supplierProperties, SupplierPropertiesRespVO.class);
respVO.setBusinessFileRet(result.getData());
respVO.setBusinessFileRet(result);
return success(respVO);
}

View File

@@ -1,5 +1,6 @@
package com.zt.plat.module.qms.office.supplier.controller.vo;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -66,6 +67,6 @@ public class SupplierPropertiesRespVO {
private LocalDateTime createTime;
@Schema(description = "附件对象")
private List<BusinessFileWithUrlRespDTO> businessFileRet;
private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;
}

View File

@@ -8,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
import com.zt.plat.module.qms.resource.material.controller.vo.assist.MaterialAssayResult;
import com.zt.plat.module.qms.resource.material.enums.MaterialAssayStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@@ -79,7 +80,7 @@ public class MaterialCorrelationAssayRespVO {
@Schema(description = "结果,检化验结果")
@ExcelProperty("结果,检化验结果")
private MaterialAssayResult result;
private String result;
@Schema(description = "是否合格,字典")
@ExcelProperty("是否合格,字典")
@@ -110,4 +111,24 @@ public class MaterialCorrelationAssayRespVO {
return array.toList(Long.class);
}
public String getAssayStatus_dictText() {
if (StrUtil.isBlank(this.assayStatus)) {
return MaterialAssayStatus.not_start.getName();
}
try {
return MaterialAssayStatus.valueOf(this.assayStatus).getName();
} catch (IllegalArgumentException e) {
return "未知状态";
}
}
public MaterialAssayResult getResultObj() {
try {
return JSONUtil.toBean(this.result, MaterialAssayResult.class);
} catch (Exception e) {
log.error("result解析失败:{}", e.getMessage());
return null;
}
}
}

View File

@@ -3,6 +3,7 @@ package com.zt.plat.module.qms.resource.material.controller.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -115,6 +116,6 @@ public class MaterialLifecycleRespVO {
private List<MaterialLifecycleDetailRespVO> detailList;
@Schema(description = "附件对象")
private List<BusinessFileWithUrlRespDTO> businessFileRet;
private CommonResult<List<BusinessFileWithUrlRespDTO>> businessFileRet;
}

View File

@@ -129,6 +129,11 @@ public class MaterialBatchDO extends BusinessBaseDO {
@TableField("ACPT_STS")
private String acceptanceStatus;
/**
* 是否可入库,1-可入库0-不可入库,要和验收状态联合判断
*/
@TableField("INB_FLG")
private Integer inboundFlag;
/**
* 是否检化验,1-是0-否
*/
@TableField("ASY_FLG")

View File

@@ -88,8 +88,8 @@ public class MaterialCorrelationAssayDO extends BusinessBaseDO {
/**
* 结果,检化验结果
*/
@TableField(value = "RSLT", typeHandler = JacksonTypeHandler.class)
private MaterialAssayResult result;
@TableField("RSLT")
private String result;
/**
* 是否合格,字典
*/

View File

@@ -49,7 +49,8 @@ public interface MaterialBatchMapper extends BaseMapperX<MaterialBatchDO> {
.orderByDesc(MaterialBatchDO::getId));
}
@QmsPermission(deptIdColumn = "ASN_DEPT_ID", moduleDataRoleCodes = "ytjy_material_admin")
// @QmsPermission(deptIdColumn = "ASN_DEPT_ID", moduleDataRoleCodes = "ytjy_material_admin")
@QmsPermission(deptIdColumn = "ASN_DEPT_ID", moduleDataRoleCodes = "ytjyAdmin,ytjy_material_admin")
default PageResult<MaterialBatchRespVO> selectPageWithPdtInfo(MaterialBatchPageReqVO reqVO, List<Long> pdtIds) {
MPJLambdaWrapper<MaterialBatchDO> wrapper = new MPJLambdaWrapperX<MaterialBatchDO>()

View File

@@ -0,0 +1,27 @@
package com.zt.plat.module.qms.resource.material.enums;
import lombok.Getter;
@Getter
public enum MaterialAssayResultAssessmentType {
inbound("入库"),
not_inbound("不入库"),
;
private final String name;
MaterialAssayResultAssessmentType(String name) {
this.name = name;
}
public static MaterialAssayResultAssessmentType fromName(String name) {
for (MaterialAssayResultAssessmentType type : MaterialAssayResultAssessmentType.values()) {
if (type.getName().equals(name)) {
return type;
}
}
throw new IllegalArgumentException("No enum constant with name: " + name);
}
}

View File

@@ -0,0 +1,29 @@
package com.zt.plat.module.qms.resource.material.enums;
import lombok.Getter;
@Getter
public enum MaterialAssayStatus {
not_start("未开始"),
in_progress("进行中"),
completed("已完成"),
;
private final String name;
MaterialAssayStatus(String name) {
this.name = name;
}
public static MaterialAssayStatus fromName(String name) {
for (MaterialAssayStatus type : MaterialAssayStatus.values()) {
if (type.getName().equals(name)) {
return type;
}
}
throw new IllegalArgumentException("No enum constant with name: " + name);
}
}

Some files were not shown because too many files have changed in this diff Show More