Commit 87428e3d authored by wdy's avatar wdy

Merge branch 'wangdingyi' into 'dev'

检验报告图片非空判断&标准库条件查询

See merge request !320
parents a770274c 625c2463
...@@ -359,6 +359,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -359,6 +359,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
PdfPTable pictureTable = new PdfPTable(new float[]{25, 25, 25, 25}); PdfPTable pictureTable = new PdfPTable(new float[]{25, 25, 25, 25});
pictureTable.setWidthPercentage(90); pictureTable.setWidthPercentage(90);
pictureTable.setSpacingBefore(10); pictureTable.setSpacingBefore(10);
if (samplePhoto != null) {
List<String> pictureList = Arrays.stream(samplePhoto.split(",")).filter(StringUtils::isNotBlank).collect(Collectors.toList()); List<String> pictureList = Arrays.stream(samplePhoto.split(",")).filter(StringUtils::isNotBlank).collect(Collectors.toList());
int result = pictureList.size(); int result = pictureList.size();
while (result % 4 != 0) { while (result % 4 != 0) {
...@@ -382,6 +383,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe ...@@ -382,6 +383,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
} }
document.addContent(pictureTable); document.addContent(pictureTable);
} }
}
/** /**
* 车型试验原始记录 - 1.检验依据 * 车型试验原始记录 - 1.检验依据
......
...@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
@ApiModel(value = "StandardEditRequest", description = "编辑标准") @ApiModel(value = "StandardEditRequest", description = "编辑标准")
@Data @Data
...@@ -36,4 +37,7 @@ public class StandardEditRequest { ...@@ -36,4 +37,7 @@ public class StandardEditRequest {
@ApiModelProperty("实施日期") @ApiModelProperty("实施日期")
private Date implementationDate; private Date implementationDate;
@ApiModelProperty("实施日期")
List<Long> dictList;
} }
...@@ -9,6 +9,17 @@ import lombok.Data; ...@@ -9,6 +9,17 @@ import lombok.Data;
@Data @Data
public class StandardListRequest extends PageDomain { public class StandardListRequest extends PageDomain {
@ApiModelProperty("关键字") @ApiModelProperty("标准号")
private String keyWord; private String standardNo;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准分类")
private String standardType;
@ApiModelProperty("标准状态")
private String standardStatus;
} }
...@@ -19,8 +19,17 @@ ...@@ -19,8 +19,17 @@
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date
FROM t_standard FROM t_standard
<where> <where>
<if test="keyWord != null and keyWord != ''"> <if test="standardType != null and standardType != ''">
name like concat('%',#{keyWord},'%') OR standard_no like concat('%',#{keyWord},'%') standard_type = #{standardType}
</if>
<if test="standardNo != null and standardNo != ''">
and standard_no like concat('%', #{standardNo}, '%')
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="standardStatus != null and standardStatus != ''">
and standard_status = #{standardStatus}
</if> </if>
</where> </where>
</select> </select>
......
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