|
@@ -148,7 +148,7 @@ public class SampleFoodServiceImpl extends ServiceImpl<SampleFoodMapper, SampleF
|
|
|
mappings.put("非危险性样品", (WhetherEnum.NO.getCode().equals(detail.getHazard()) ? "☑" : "☐") + "非危险性样品");
|
|
|
checkbox(mappings, "危险性样品", "☐易燃易爆 ☐腐蚀性 ☐毒性(非剧毒) ☐氧化剂 ☐其他", detail.getHazardDescription());
|
|
|
mappings.put("危险性样品-其他", detail.getHazardDescription().contains("其他") ? detail.getHazardDescriptionOther(): "");
|
|
|
- checkbox(mappings, "服务时限", "☐标准时间(7个工作日) ☐5个工作日\n\n☐3个工作日 ☐1个工作日\n\n☐加急", detail.getServiceDeadline());
|
|
|
+ checkbox(mappings, "服务时限", "☐标准时间(7个工作日) ☐5个工作日 \n\n☐3个工作日 ☐1个工作日 \n\n☐加急", detail.getServiceDeadline());
|
|
|
|
|
|
List<SampleFoodDetailVo> detailList = detail.getDetailList();
|
|
|
SampleFoodDetailVo itemVo = CollUtil.isEmpty(detailList) ? new SampleFoodDetailVo() : detailList.get(0);
|
|
@@ -157,9 +157,9 @@ public class SampleFoodServiceImpl extends ServiceImpl<SampleFoodMapper, SampleF
|
|
|
mappings.put("生产日期", DateUtil.formatDate(itemVo.getProductionDate()));
|
|
|
mappings.put("批号", itemVo.getBatchNumber());
|
|
|
mappings.put("数量", itemVo.getQuantity());
|
|
|
- checkbox(mappings, "样品状态", "☐固体 ☐半固体\n☐液体 ☐其他", itemVo.getSampleStatus());
|
|
|
+ checkbox(mappings, "样品状态", "☐固体 ☐半固体 \n☐液体 ☐其他", itemVo.getSampleStatus());
|
|
|
mappings.put("样品状态-其他", itemVo.getSampleStatusOther());
|
|
|
- checkbox(mappings, "包装方式", "☐袋装 ☐罐装\n☐瓶装 ☐其他", itemVo.getPackaging());
|
|
|
+ checkbox(mappings, "包装方式", "☐袋装 ☐罐装 \n☐瓶装 ☐其他", itemVo.getPackaging());
|
|
|
mappings.put("包装方式-其他", itemVo.getPackagingOther());
|
|
|
mappings.put("样品-其他", itemVo.getOtherInfo());
|
|
|
|
|
@@ -334,14 +334,16 @@ public class SampleFoodServiceImpl extends ServiceImpl<SampleFoodMapper, SampleF
|
|
|
String[] split = content.split(",");
|
|
|
for (String s : split) {
|
|
|
if (StrUtil.isNotBlank(s)) {
|
|
|
- //勾选
|
|
|
- if (s.equals("其他")) {
|
|
|
- value = value.replace("☐" + s, "☑" + s);
|
|
|
- } else {
|
|
|
- value = value.replace("☐" + s + " ", "☑" + s + " ");
|
|
|
- }
|
|
|
+ value = value.replace("☐" + s + " ", "☑" + s + " ");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //最后一个勾选框
|
|
|
+ int lastIndex = value.lastIndexOf("☐");
|
|
|
+ String lastItem = value.substring(lastIndex + 1);
|
|
|
+ if (content.contains(lastItem)) {
|
|
|
+ value = value.substring(0, lastIndex) + "☑" + lastItem;
|
|
|
+ }
|
|
|
mappings.put(key, value);
|
|
|
}
|
|
|
|