Commit 69ba1013 authored by 竹天卫's avatar 竹天卫

优化代码

parent b7ccdb33
......@@ -118,7 +118,8 @@ public class EntrustController {
@ApiOperation("导出委托单")
public void getReportDetail(@PathVariable("entrustId") Integer entrustId,
HttpServletResponse response) {
EntrustVo entrustVo = entrustService.getDetailCapacity(entrustId).getData();
// EntrustVo entrustVo = entrustService.getDetailCapacity(entrustId).getData();
EntrustVo entrustVo = entrustService.getBaseDtail(entrustId).getData();
if (entrustVo == null) {
return;
}
......
......@@ -589,6 +589,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
}
sampleVo.setTeamName(teamName);
sampleVo.setSampleDistributionTeamVoList(sampleNoDistributionTeamVoList);
sampleVoList.add(sampleVo);
}
}
......@@ -829,6 +830,10 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if (StringUtils.isEmpty(sampleQuery.getCementCode())) {
return BaseResponse.errorMsg("本所编号不能为空");
}
String regex = "[0-9]{2}\\-[0-9]{4}";
if(!sampleQuery.getCementCode().matches(regex) || sampleQuery.getCementCode().length() != getMaxCementCode().getData().length()){
return BaseResponse.errorMsg("本所编号格式不符合规范");
}
//前端传入的本所编号
Integer cementCodeInteger = commonService.getIntegerCode(sampleQuery.getCementCode());
if (cementCodeInteger <= integerMaxCode) {
......@@ -2397,6 +2402,19 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
entrustVo.setCheckTeam(checkTeam);
entrustVo.setCheckMethodNumber(sampleTmp.getMethodNumbers());
}
//查询报告,如果有上传的委托报告,用户可已进行下载
QueryWrapper<EntityEnclosure> wrapper = new QueryWrapper<>();
wrapper.eq("entity_type", EntityEnclosure.EntityType.ENTRUST_REPORT);
wrapper.eq("entity_id", entrustVo.getId());
wrapper.eq("is_deleted", 1);
List<EntityEnclosure> entityEnclosureList = entityEnclosureMapper.selectList(wrapper);
if(entityEnclosureList != null && entityEnclosureList.size()>0 ){
EntityEnclosure entityEnclosure = entityEnclosureList.get(0);
entrustVo.setAlias(entityEnclosure.getAlias());
entrustVo.setEnclosureUrl(entityEnclosure.getEnclosureUrl());
entrustVo.setExtName(entityEnclosure.getExtName());
}
}
}
pages.setRecords(list);
......
......@@ -1980,7 +1980,11 @@
<!-- 这里是开头 -->
<#list list as iteam>
<w:tr wsp:rsidR="007E280A" wsp:rsidRPr="003B3488" wsp:rsidTr="003B3488">
<#--<w:tr wsp:rsidR="007E280A" wsp:rsidRPr="003B3488" wsp:rsidTr="003B3488">-->
<TEXTAREA COLS="125" placeholder="选填部分,可以不填写。如果有需要说明的事项,填写在此处!"
style="overflow-y:hidden;height:100px;"
onpropertychange="this.style.height=this.scrollHeight+'px';"
oninput="this.style.height=this.scrollHeight+'px';">
<w:trPr>
<w:trHeight w:h-rule="exact" w:val="600"/>
<w:jc
......@@ -2176,7 +2180,8 @@
</w:r>
</w:p>
</w:tc>
</w:tr>
</TEXTAREA>
<#--</w:tr>-->
</#list>
<!-- 这里是结尾 -->
<!-- ################################################################################################## -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment