app收样新需求

This commit is contained in:
hayu 2024-09-10 13:06:27 +08:00
parent 90a97c813b
commit 1140e9733f
4 changed files with 54 additions and 26 deletions

View File

@ -471,4 +471,13 @@ public interface ExperimentalAppMapper {
* @return int
*/
Integer getNotFilledDevs(Long sampleId);
/**
* 查询新增的试验设备
* @param dto
* @return List<ExperDevVo>
* @author cwchen
* @date 2024/9/4 9:07
*/
List<ExperDevAppVo> getLsExperDevs(ParamsAppDto dto);
}

View File

@ -327,7 +327,15 @@ public class ExperimentalAppServiceImpl implements ExperimentalAppService {
List<ConfigItemAppVo> configItemVos = mapper.getExperItem(configItemsVo.getId());
configItemsVo.setItemList(configItemVos);
}
List<ExperDevAppVo> experDevVos = mapper.getExperDev(dto);
List<ExperDevAppVo> experDevVos = new ArrayList<>();
experDevVos = mapper.getExperDev(dto);
// 查询新增的试验设备信息
dto.setSampleId(testAppVo.getSampleId());
dto.setDevTypeCode(testAppVo.getDevTypeCode());
List<ExperDevAppVo> lsExperDevs = mapper.getLsExperDevs(dto);
if(CollectionUtils.isNotEmpty(lsExperDevs)){
experDevVos.addAll(lsExperDevs);
}
testAppVo.setMainDeviceVos(configMainDevVos);
testAppVo.setBasisVos(experBasisVos);
testAppVo.setConfigItemsVos(configItemsVos);

View File

@ -96,7 +96,7 @@ public class WordUtils {
}
private static String createDocApp(Map<?, ?> dataMap, Template template,String batchCode) {
String fileName = batchCode+"_委托书.doc";
String fileName = batchCode+"_委托书.docx";
File f = new File(SystemUtils.getUploadPath()+ fileName);
if (!f.getParentFile().exists()){
f.getParentFile().mkdirs();
@ -107,9 +107,6 @@ public class WordUtils {
template.process(dataMap, w);
w.close();
// 这里可以保留文件或者根据需要在方法结束时删除
// 例如如果你确定不再需要这个文件可以调用 FileUtils.deleteQuietly(f);
return fileName;
} catch (Exception ex) {
ex.printStackTrace();

View File

@ -446,8 +446,10 @@
te.exper_conclu AS experConclu,
te.remarsk AS remarsk,
su.user_name AS experUserName,
te.audit_user_name AS auditUserName
te.audit_user_name AS auditUserName,
tsc.times as cycle
FROM tb_exper te
LEFT JOIN tb_exper_config tsc ON tsc.dev_type_code = te.dev_type_code AND tsc.del_flag = 0
LEFT JOIN tb_custom tc ON te.submit_unit = tc.id AND tc.del_flag = 0
LEFT JOIN sys_user su ON te.update_user = su.id AND su.del_flag = 0
WHERE te.id = #{id}
@ -641,4 +643,16 @@
LEFT JOIN tb_exper_dev ted ON tsd.id = ted.dev_id
WHERE tsd.sample_id = #{sampleId} AND tsd.del_falg = 0 AND ted.id IS NULL
</select>
<select id="getLsExperDevs" resultType="com.bonus.aqgqj.app.entity.ExperDevAppVo">
SELECT tsd.id,
tsd.dev_code AS devCode,
tsd.dev_module AS devModule,
tsd.department_id AS departmentId,
tsd.id AS devId
FROM tb_sample_device tsd
LEFT JOIN tb_exper_dev ted ON tsd.id = ted.dev_id AND ted.exper_id = #{id}
WHERE tsd.sample_id = #{sampleId} AND tsd.dev_type_code = #{devTypeCode} AND tsd.del_falg = 0 AND ted.id IS NULL
ORDER BY tsd.id
</select>
</mapper>