项目库-项目详情-参数收集统计-去掉百分号
This commit is contained in:
+4
-2
@@ -720,12 +720,14 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl<ParamsManifestEOMap
|
||||
*/
|
||||
private String getRatio(Double d1, Double d2) {
|
||||
if (d1 == null || d2 == null || d2 <= 0) {
|
||||
return "0.00%";
|
||||
// return "0.00%";
|
||||
return "0.00"; // 前端不需要返百分号
|
||||
}
|
||||
NumberFormat percent = NumberFormat.getPercentInstance();
|
||||
percent.setMaximumFractionDigits(2);
|
||||
percent.setMinimumFractionDigits(2);
|
||||
return percent.format(d1/d2);
|
||||
String result = percent.format(d1/d2);
|
||||
return result.substring(0,result.lastIndexOf("%")); // 前端不需要返百分号
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
-3
@@ -40,7 +40,10 @@
|
||||
AND params_name LIKE CONCAT(CONCAT('%',#{paramsReportDetailEO.paramsName}),'%')
|
||||
</if>
|
||||
<if test="paramsReportDetailEO.certCategory !=null and paramsReportDetailEO.certCategory !=''">
|
||||
AND cert_category LIKE CONCAT(CONCAT('%',#{paramsReportDetailEO.certCategory}),'%')
|
||||
AND
|
||||
<foreach collection="paramsReportDetailEO.certCategory.split(',')" index="" item="item" open="(" close=")" separator="or">
|
||||
cert_category LIKE CONCAT(CONCAT('%',#{item}),'%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="paramsReportDetailEO.sdt !=null and paramsReportDetailEO.sdt !=''">
|
||||
AND sdt in
|
||||
@@ -102,7 +105,7 @@
|
||||
select *
|
||||
from params_report_detail
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by nio_number asc, sync_time desc
|
||||
order by sync_time desc, nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="listInfoForExport" resultType="java.util.LinkedHashMap">
|
||||
@@ -123,7 +126,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by prd.nio_number ASC
|
||||
order by prd.sync_time desc, prd.nio_number ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+6
-6
@@ -42,10 +42,10 @@ public class ParamsExportTemplateEOServiceImpl extends ServiceImpl<ParamsExportT
|
||||
// 模板名称唯一校验
|
||||
boolean isRepeat = verifyTemplateName(paramsExportTemplateEO.getTemplateName());
|
||||
if (isRepeat) {
|
||||
if (CutEnum.CN.equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
} else {
|
||||
if (CutEnum.EN.getValue().equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("Template Name already exists!");
|
||||
} else {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
}
|
||||
}
|
||||
// 处理附件模板 修改文件表关联信息connect_id 一个文件
|
||||
@@ -84,10 +84,10 @@ public class ParamsExportTemplateEOServiceImpl extends ServiceImpl<ParamsExportT
|
||||
// 模板名称唯一校验
|
||||
boolean isRepeat = verifyTemplateName(paramsExportTemplateEO.getTemplateName());
|
||||
if (isRepeat) {
|
||||
if (CutEnum.CN.equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
} else {
|
||||
if (CutEnum.EN.getValue().equals(paramsExportTemplateEO.getCut())) {
|
||||
throw new JeroBootException("Template Name already exists!");
|
||||
} else {
|
||||
throw new JeroBootException("模板名称已存在!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user