|
@@ -60,6 +60,16 @@ public class HisWjwMatchService {
|
|
|
} else if (type == 4) {
|
|
|
hisList = dao.selectSurgeries();
|
|
|
wjwList = dao.selectChargeCodes();
|
|
|
+ for (HisWjwMatchEntity entity : hisList) {
|
|
|
+ if (null != entity.getWjwCode()) {
|
|
|
+ entity.setChargeCode(entity.getWjwCode().split("\\^"));
|
|
|
+ entity.setWjwCode(null);
|
|
|
+ }
|
|
|
+ if (null != entity.getWjwName()) {
|
|
|
+ entity.setChargeName(entity.getWjwName().split("\\^"));
|
|
|
+ entity.setWjwName(null);
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
hisList = dao.selectNationTempData(histable);
|
|
|
wjwList = new ArrayList<>();
|
|
@@ -91,10 +101,26 @@ public class HisWjwMatchService {
|
|
|
|
|
|
public String executeMatchAction(HisWjwMatchEntity entity) {
|
|
|
log.info("匹配卫健委/国临字典:{}", JSONObject.toJSONString(entity));
|
|
|
- dao.executeMatchAction(entity);
|
|
|
if (entity.getLabel().equals("surgery_chargeCode")) {
|
|
|
+ if (null != entity.getChargeCode()) {
|
|
|
+ StringBuilder codeBuilder = new StringBuilder();
|
|
|
+ StringBuilder nameBuilder = new StringBuilder();
|
|
|
+ for (String code : entity.getChargeCode()) {
|
|
|
+ codeBuilder.append(code).append('^');
|
|
|
+ }
|
|
|
+ if (codeBuilder.length() > 1) {
|
|
|
+ entity.setWjwCode(codeBuilder.substring(0, codeBuilder.length() - 1));
|
|
|
+ }
|
|
|
+ for (String name : entity.getChargeName()) {
|
|
|
+ nameBuilder.append(name).append('^');
|
|
|
+ }
|
|
|
+ if (nameBuilder.length() > 1) {
|
|
|
+ entity.setWjwName(nameBuilder.substring(0, nameBuilder.length() - 1));
|
|
|
+ }
|
|
|
+ }
|
|
|
dao.updateDateAndOper(entity.getCode(), TokenUtil.getTokenUserId());
|
|
|
}
|
|
|
+ dao.executeMatchAction(entity);
|
|
|
return StringUtil.isBlank(entity.getWjwCode()) ? "撤销匹配成功" : "匹配成功";
|
|
|
}
|
|
|
|