详情增加检测记录图片

This commit is contained in:
liang.chao 2024-12-23 10:07:37 +08:00
parent 46431af1b1
commit 3821004d0e
5 changed files with 28 additions and 0 deletions

View File

@ -66,6 +66,9 @@ public class MaDevQc extends BaseEntity implements Serializable {
@ApiModelProperty(value = "附件信息")
private List<BmFileInfo> fileInfoList;
@ApiModelProperty(value = "附件信息")
private BmFileInfo fileInfo;
@ApiModelProperty(value = "附件地址")
private String url;

View File

@ -27,6 +27,7 @@ public interface BmFileInfoMapper {
* @return 附件集合
*/
List<BmFileInfo> selectBmFileInfoList(BmFileInfo bmFileInfo);
BmFileInfo selectBmFileInfo(BmFileInfo bmFileInfo);
/**
* 新增附件

View File

@ -167,6 +167,15 @@ public class DevInfoServiceImpl implements DevInfoService {
//查询质检记录
List<MaDevQc> qcList = maDevQcMapper.getQcList(maId);
for (MaDevQc maDevQc : qcList) {
BmFileInfo fileInfo = new BmFileInfo();
fileInfo.setTaskId(Long.valueOf(maDevQc.getId()));
fileInfo.setModelId(Long.valueOf(maDevQc.getMaId()));
fileInfo.setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE);
fileInfo.setFileType(4L);
BmFileInfo bmFileInfos = bmFileInfoMapper.selectBmFileInfo(fileInfo);
maDevQc.setFileInfo(bmFileInfos);
}
devInfoVo.setQcList(qcList);
}
return devInfoVo;

View File

@ -41,6 +41,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getTypeInfo" resultType="com.bonus.common.biz.domain.TypeInfo">
select type_id from ma_type where type_name = #{deviceName}
</select>
<select id="selectBmFileInfo" resultType="com.bonus.common.biz.domain.BmFileInfo">
select
id, task_type, task_id, model_id, name as fileName, url as fileUrl, file_type, create_by, create_time
from bm_file_info
<where>
<if test="taskType != null "> and task_type = #{taskType}</if>
<if test="taskId != null "> and task_id = #{taskId}</if>
<if test="modelId != null "> and model_id = #{modelId}</if>
<if test="fileName != null and name != ''"> and name like concat('%', #{fileName}, '%')</if>
<if test="fileUrl != null and url != ''"> and url = #{fileUrl}</if>
<if test="fileType != null "> and file_type = #{fileType}</if>
</where>
</select>
<insert id="insertBmFileInfo" parameterType="com.bonus.common.biz.domain.BmFileInfo" useGeneratedKeys="true" keyProperty="id">
insert into bm_file_info

View File

@ -119,6 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getQcList" resultType="com.bonus.material.device.domain.MaDevQc">
SELECT
mdc.qc_time,
mdc.id,
mdc.ma_id,
mt.maintenance_alarm_day,
sd.dept_name comName
FROM