外购下单:出厂检验报告检验值小数位数生成错误问题修复
| | |
| | | @ApiModelProperty("手动上传报告地址") |
| | | private String enterUrlS; |
| | | |
| | | @ApiModelProperty("进厂报告审批状态(1:批准通过,0:批准不通过)") |
| | | private Integer enterRatifyStatus; |
| | | |
| | | // 季度 |
| | | @ApiModelProperty("季度订单id") |
| | | private Integer quarterOrderId; |
| | |
| | | @ApiModelProperty("手动上传报告地址") |
| | | private String quarterUrlS; |
| | | |
| | | @ApiModelProperty("季度检验报告审批状态(1:批准通过,0:批准不通过)") |
| | | private Integer quarterRatifyStatus; |
| | | |
| | | private Integer orderState; |
| | | |
| | | @ApiModelProperty("下发时间") |
| | |
| | | ir1.id enter_report_id, |
| | | ir1.url enter_url, |
| | | ir1.url_s enter_url_s, |
| | | ir1.is_ratify enter_ratify_status, |
| | | io2.id quarter_order_id, |
| | | ir2.id quarter_report_id, |
| | | ir2.url quarter_url, |
| | | ir2.url_s quarter_url_s, |
| | | ir2.is_ratify quarter_ratify_status, |
| | | group_concat(distinct isa.sample_code, ' ') sample_code, |
| | | group_concat(distinct isa.sample, ' ') sample_name, |
| | | group_concat(distinct isa.model, ' ') sample_model, |
| | |
| | | } |
| | | |
| | | |
| | | private static int getDecimalPlaces(String str) { |
| | | // 查找小数点位置 |
| | | int decimalPointIndex = str.lastIndexOf('.'); |
| | | |
| | | if (decimalPointIndex == -1) { |
| | | // 如果没有小数点,返回0位小数 |
| | | return 0; |
| | | private static int getDecimalPlaces(String str) { |
| | | // 使用正则匹配所有带小数点的数字,取最大小数位数 |
| | | java.util.regex.Matcher matcher = Pattern.compile("\\d+\\.(\\d+)").matcher(str); |
| | | int maxDecimalPlaces = 0; |
| | | while (matcher.find()) { |
| | | int places = matcher.group(1).length(); |
| | | if (places > maxDecimalPlaces) { |
| | | maxDecimalPlaces = places; |
| | | } |
| | | } |
| | | |
| | | // 计算小数点后的位数 |
| | | return str.length() - decimalPointIndex - 1; |
| | | return maxDecimalPlaces; |
| | | } |
| | | |
| | | /** |