| | |
| | | <select id="selectDeviceParameterPage" resultType="com.yuanchu.mom.dto.DeviceDto"> |
| | | select * from( |
| | | SELECT |
| | | d.*, u.name equipmentManagerUser, l.laboratory_name laboratoryName, i.inspection_item insProductItem |
| | | d.*, u.name equipmentManagerUser, l.laboratory_name laboratoryName |
| | | FROM |
| | | device d |
| | | left join `user` u on u.id = d.equipment_manager |
| | | left join laboratory l on l.id = d.subordinate_departments_id |
| | | left join ins_product i on i.id = d.ins_product_ids |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.ReportPageDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | |
| | | return Result.success(insReportService.pageInsReport(page, reportPageDto)); |
| | | } |
| | | |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "报告上传") |
| | | @PostMapping("/inReport") |
| | | @ValueAuth |
| | | public Result inReport(MultipartFile file, Integer id) { |
| | | String urlString; |
| | | String pathName; |
| | |
| | | }catch (Exception e){ |
| | | throw new ErrorException("找不到检验人的签名"); |
| | | } |
| | | if(signatureUrl == null || "".equals(signatureUrl)){ |
| | | throw new ErrorException("找不到检验人的签名"); |
| | | } |
| | | XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render( |
| | | new HashMap<String, Object>() {{ |
| | | put("order", insOrder); |
| | |
| | | String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory(); |
| | | sealUrl = insReportMapper.getLaboratoryByName(laboratory); |
| | | }catch (Exception e){ |
| | | throw new ErrorException("找不到报告章印"); |
| | | throw new ErrorException("找不到报告专用章"); |
| | | } |
| | | if(sealUrl==null) throw new ErrorException("找不到报告专用章"); |
| | | //系统生成报告地址 |
| | | String url = insReport.getUrl(); |
| | | //手动上传报告地址 |
| | |
| | | public List<StandardProductList> selectStandardProductList(InsSample insSample) { |
| | | String[] models = insSample.getModel().split("-(?=[^-]*$)");//拆分最后一个【-】 |
| | | List<StandardProductList> list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()).eq(StandardProductList::getState, 1).eq(StandardProductList::getModel, models[0])); |
| | | if(list.size() == 0){ |
| | | list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()).eq(StandardProductList::getState, 1)); |
| | | } |
| | | list = list.stream().filter(a -> { |
| | | try { |
| | | if (a.getSection() != null && !Objects.equals(a.getSection(), "")) { |
| | |
| | | filters: stat,wall,log4j # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 |
| | | useGlobalDataSourceStat: true #合并多个DruidDatasource的监控数据 |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500; #通过connectProperties属性来打开mergesql功能罗慢sQL记录 |
| | | |
| | | redis: |
| | | # redis数据库索引(默认为0),我们使用索引为3的数据库,避免和其他数据库冲突 |
| | | database: 0 |
| | |
| | | min-idle: 0 |
| | | # 从连接池中获取连接最大等待时间(默认为-1,单位为毫秒,负数表示无限) |
| | | max-wait: -1 |
| | | |