|
@@ -1,22 +1,23 @@
|
|
-package com.diagbot.facade.rule;
|
|
|
|
|
|
+package com.diagbot.process;
|
|
|
|
|
|
import com.diagbot.dto.BillDTO;
|
|
import com.diagbot.dto.BillDTO;
|
|
import com.diagbot.dto.BillMsg;
|
|
import com.diagbot.dto.BillMsg;
|
|
import com.diagbot.dto.BillNeoDTO;
|
|
import com.diagbot.dto.BillNeoDTO;
|
|
import com.diagbot.dto.DrugBillNeoDTO;
|
|
import com.diagbot.dto.DrugBillNeoDTO;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
|
|
+import com.diagbot.rule.AgeRule;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @Description: 规则facade
|
|
|
|
|
|
+ * @Description: 开单总入口
|
|
* @author: zhoutg
|
|
* @author: zhoutg
|
|
* @time: 2018/8/6 9:11
|
|
* @time: 2018/8/6 9:11
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
-public class BillRuleFacade {
|
|
|
|
|
|
+public class BillProcess {
|
|
|
|
|
|
public BillDTO process(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO) {
|
|
public BillDTO process(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO) {
|
|
BillDTO billDTO = new BillDTO();
|
|
BillDTO billDTO = new BillDTO();
|
|
@@ -59,17 +60,18 @@ public class BillRuleFacade {
|
|
* @param billDTO
|
|
* @param billDTO
|
|
*/
|
|
*/
|
|
public void processBillWithDrug(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
public void processBillWithDrug(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
|
|
+ List<BillMsg> drugBill = new ArrayList<>();
|
|
for (BillNeoDTO bill : billNeoDTOList) {
|
|
for (BillNeoDTO bill : billNeoDTOList) {
|
|
List<DrugBillNeoDTO> drugBillNeoDTOList = bill.getDrugBillNeoDTOList();
|
|
List<DrugBillNeoDTO> drugBillNeoDTOList = bill.getDrugBillNeoDTOList();
|
|
- List<BillMsg> drugBill = new ArrayList<>();
|
|
|
|
for (DrugBillNeoDTO drug : drugBillNeoDTOList) {
|
|
for (DrugBillNeoDTO drug : drugBillNeoDTOList) {
|
|
// 性别
|
|
// 性别
|
|
- BillMsg billMsg = RuleUtil.compareSexWithBill(drug.getGender(), wordCrfDTO, bill.getName());
|
|
|
|
|
|
+ BillMsg billMsg = AgeRule.compareSexWithBill(drug.getGender(), wordCrfDTO, bill.getName());
|
|
if (billMsg != null) {
|
|
if (billMsg != null) {
|
|
drugBill.add(billMsg);
|
|
drugBill.add(billMsg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ billDTO.setDrugBill(drugBill);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|