기능수정

This commit is contained in:
Macbook
2026-07-12 19:05:29 +09:00
parent 07a8114927
commit dca36c7b19
19 changed files with 714 additions and 253 deletions
@@ -814,7 +814,7 @@ class CareReceptionController {
String carrier = blankToNull(f.get("carrier"));
String branch = blankToNull(f.get("branch"));
String counselor = blankToNull(f.get("counselor"));
String processor = blankToNull(f.get("processor"));
String processor = blankToNull(first(f, "processor", "processors", "centerNames"));
String region = blankToNull(first(f, "region", "customerSido"));
String giftCategory = blankToNull(first(f, "giftCategory", "giftType"));
String productCategory = blankToNull(first(f, "productCategory", "productType"));
@@ -832,8 +832,29 @@ class CareReceptionController {
String giftPlace = blankToNull(f.get("giftPlace"));
String branchEmployee = blankToNull(first(f, "branchEmployee"));
String branchName = blankToNull(f.get("branchName"));
String centerName = blankToNull(first(f, "centerName", "processorName"));
String branchGroup = blankToNull(first(f, "branchGroup", "branchGroupName", "branchGroupId"));
String paymentTransferSsid = blankToNull(first(f, "paymentTransferSsid", "paymentSsid"));
String paymentTransferNumber = blankToNull(first(f, "paymentTransferNumber", "paymentAccountNumber"));
String centerStatus = blankToNull(first(f, "centerStatus"));
String ispIdCsv = blankToNull(first(f, "ispId", "ispIds"));
String productNameCsv = blankToNull(first(f, "ispProductId", "productNames", "productNameExact"));
String sorting = blankToNull(f.get("sorting"));
Set<String> progressSet = csvSet(progress);
Set<String> settleSet = csvSet(settle);
Set<String> giftStatusSet = csvSet(giftStatus);
Set<String> centerStatusSet = csvSet(centerStatus);
Set<String> carrierSet = csvSet(carrier);
Set<String> branchSet = csvSet(branch);
Set<String> processorSet = csvSet(processor);
Set<String> regionSet = csvSet(region);
Set<String> giftCatSet = csvSet(giftCategory);
Set<String> productCatSet = csvSet(productCategory);
Set<String> ispIdSet = csvSet(ispIdCsv);
Set<String> productExactSet = csvSet(productNameCsv);
Set<String> branchGroupSet = csvSet(branchGroup);
String progressF = progress;
List<HomesReception> result = all.stream().filter(r -> {
LocalDate od = r.getOrderDate() == null ? null : r.getOrderDate().toLocalDate();
@@ -846,34 +867,95 @@ class CareReceptionController {
LocalDate gd = r.getGiftSended() != null ? r.getGiftSended() : r.getGiftDate();
if (gd == null || !gd.equals(giftSended)) return false;
}
if (progressF != null) {
if (!progressSet.isEmpty()) {
String rp = ReceptionStatuses.normalizeProgress(r.getProgressStatus());
boolean hit = progressSet.stream().anyMatch(fp -> {
String n = ReceptionStatuses.normalizeProgress(fp);
return n.equals(rp) || fp.equals(r.getProgressStatus());
});
if (!hit) return false;
} else if (progressF != null) {
String rp = ReceptionStatuses.normalizeProgress(r.getProgressStatus());
String fp = ReceptionStatuses.normalizeProgress(progressF);
if (!fp.equals(rp) && !progressF.equals(r.getProgressStatus())) return false;
}
if (settle != null) {
if (!settleSet.isEmpty()) {
String rs = ReceptionStatuses.normalizeCenter(r.getSettleStatus());
boolean hit = settleSet.stream().anyMatch(fs -> {
String n = ReceptionStatuses.normalizeCenter(fs);
return n.equals(rs) || fs.equals(r.getSettleStatus());
});
if (!hit) return false;
} else if (settle != null) {
String rs = ReceptionStatuses.normalizeCenter(r.getSettleStatus());
String fs = ReceptionStatuses.normalizeCenter(settle);
if (!fs.equals(rs) && !settle.equals(r.getSettleStatus())) return false;
}
if (giftStatus != null) {
if (!centerStatusSet.isEmpty()) {
String rs = ReceptionStatuses.normalizeCenter(r.getSettleStatus());
boolean hit = centerStatusSet.stream().anyMatch(fs -> {
String n = ReceptionStatuses.normalizeCenter(fs);
return n.equals(rs) || fs.equals(r.getSettleStatus());
});
if (!hit) return false;
}
if (!giftStatusSet.isEmpty()) {
String rg = ReceptionStatuses.normalizeGift(r.getGiftStatus());
boolean hit = giftStatusSet.stream().anyMatch(fg -> {
String n = ReceptionStatuses.normalizeGift(fg);
return n.equals(rg) || fg.equals(r.getGiftStatus());
});
if (!hit) return false;
} else if (giftStatus != null) {
String rg = ReceptionStatuses.normalizeGift(r.getGiftStatus());
String fg = ReceptionStatuses.normalizeGift(giftStatus);
if (!fg.equals(rg) && !giftStatus.equals(r.getGiftStatus())) return false;
}
if (carrier != null && !carrier.equals(r.getCarrier()) && !carrier.equals(r.getIspName())) return false;
if (!carrierSet.isEmpty()) {
if (!carrierSet.contains(nullToEmpty(r.getCarrier())) && !carrierSet.contains(nullToEmpty(r.getIspName()))) {
if (r.getIspId() == null || !carrierSet.contains(String.valueOf(r.getIspId()))) return false;
}
} else if (carrier != null && !carrier.equals(r.getCarrier()) && !carrier.equals(r.getIspName())) return false;
if (!ispIdSet.isEmpty()) {
if (r.getIspId() == null || !ispIdSet.contains(String.valueOf(r.getIspId()))) {
if (!ispIdSet.contains(nullToEmpty(r.getIspName())) && !ispIdSet.contains(nullToEmpty(r.getCarrier()))) return false;
}
}
if (ispName != null) {
String hay = (nullToEmpty(r.getIspName()) + " " + nullToEmpty(r.getCarrier())).toLowerCase();
if (!hay.contains(ispName.toLowerCase())) return false;
}
if (branch != null && !branch.equals(r.getBranch())) return false;
if (!branchSet.isEmpty()) {
if (!branchSet.contains(nullToEmpty(r.getBranch()))) return false;
} else if (branch != null && !branch.equals(r.getBranch())) return false;
if (branchName != null && !nullToEmpty(r.getBranch()).contains(branchName)) return false;
if (!branchGroupSet.isEmpty()) {
String bg = nullToEmpty(r.getBranchGroup());
boolean hit = branchGroupSet.stream().anyMatch(g -> bg.contains(g) || bg.equals(g) || String.valueOf(r.getBranchGroup()).equals(g));
if (!hit) return false;
} else if (branchGroup != null && !nullToEmpty(r.getBranchGroup()).contains(branchGroup)
&& !String.valueOf(r.getBranchGroup()).equals(branchGroup)) return false;
if (counselor != null && !counselor.equals(r.getCounselor())) return false;
if (branchEmployee != null && !nullToEmpty(r.getCounselor()).contains(branchEmployee)) return false;
if (processor != null && !processor.equals(r.getProcessor())) return false;
if (region != null && !region.equals(r.getRegion())) return false;
if (giftCategory != null && !nullToEmpty(r.getGiftCategory()).contains(giftCategory)) return false;
if (productCategory != null
if (centerName != null) {
String cn = blank(r.getProcessor()) ? "본사" : r.getProcessor();
if (!cn.contains(centerName)) return false;
}
if (!processorSet.isEmpty()) {
String cn = blank(r.getProcessor()) ? "본사" : nullToEmpty(r.getProcessor());
if (!processorSet.contains(cn) && !processorSet.contains(nullToEmpty(r.getProcessor()))) return false;
} else if (processor != null && !processor.equals(r.getProcessor())) return false;
if (!regionSet.isEmpty()) {
if (!regionSet.contains(nullToEmpty(r.getRegion()))) return false;
} else if (region != null && !region.equals(r.getRegion())) return false;
if (!giftCatSet.isEmpty()) {
boolean hit = giftCatSet.stream().anyMatch(g -> nullToEmpty(r.getGiftCategory()).contains(g));
if (!hit) return false;
} else if (giftCategory != null && !nullToEmpty(r.getGiftCategory()).contains(giftCategory)) return false;
if (!productCatSet.isEmpty()) {
if (!productCatSet.contains(nullToEmpty(r.getProductCategory()))
&& !productCatSet.contains(nullToEmpty(r.getProductType()))) return false;
} else if (productCategory != null
&& !productCategory.equals(r.getProductCategory())
&& !productCategory.equals(r.getProductType())) return false;
if (giftPlace != null && !giftPlace.equals(r.getGiftPlace())) return false;
@@ -888,7 +970,13 @@ class CareReceptionController {
if (agreementName != null && !nullToEmpty(r.getAgreementName()).contains(agreementName)) return false;
if (customerSsid != null && !nullToEmpty(r.getIdentifyNumber()).contains(customerSsid)) return false;
if (customerEmail != null && !nullToEmpty(r.getEmail()).contains(customerEmail)) return false;
if (productName != null && !nullToEmpty(r.getProductName()).contains(productName)) return false;
if (paymentTransferSsid != null && !nullToEmpty(r.getPaymentSsid()).contains(paymentTransferSsid)) return false;
if (paymentTransferNumber != null
&& !nullToEmpty(r.getPaymentAccountNumber()).contains(paymentTransferNumber)
&& !nullToEmpty(r.getPaymentCardNumber()).contains(paymentTransferNumber)) return false;
if (!productExactSet.isEmpty()) {
if (!productExactSet.contains(nullToEmpty(r.getProductName()))) return false;
} else if (productName != null && !nullToEmpty(r.getProductName()).contains(productName)) return false;
if (contractNumber != null && !nullToEmpty(r.getContractNumber()).contains(contractNumber)) return false;
if (q != null) {
String hay = (nullToEmpty(r.getCustomerName()) + " " + nullToEmpty(r.getPhone()) + " "
@@ -909,6 +997,14 @@ class CareReceptionController {
return result;
}
private Set<String> csvSet(String csv) {
if (csv == null || csv.isBlank()) return Set.of();
return Arrays.stream(csv.split(","))
.map(String::trim)
.filter(s -> !s.isEmpty())
.collect(Collectors.toCollection(LinkedHashSet::new));
}
private void apply(HomesReception r, Map<String, Object> d) {
if (d.containsKey("orderDate")) r.setOrderDate(parseDateTime(str(d.get("orderDate"))));
if (d.containsKey("counselor")) r.setCounselor(str(d.get("counselor")));
@@ -732,7 +732,7 @@ class HomesBranch extends BaseEntity {
/**
* 영업점 수수료 시트 — billing branch_fees / branch_group_fees 축소.
* BillCare는 영업점명을 문자열로 쓰므로 branchName 키.
* BizCare는 영업점명을 문자열로 쓰므로 branchName 키.
*/
@Entity @Table(name = "homes_branch_fees") @Getter @Setter @Builder @NoArgsConstructor @AllArgsConstructor
class HomesBranchFee extends BaseEntity {
@@ -3,7 +3,7 @@ package com.bizcare.agent;
import java.util.*;
/**
* billing_react AppConstant 의 접수/사은품/입력처/정산 상태·전이를 BillCare 에 이식.
* billing_react AppConstant 의 접수/사은품/입력처/정산 상태·전이를 BizCare 에 이식.
*/
public final class ReceptionStatuses {
private ReceptionStatuses() {}
@@ -43,7 +43,7 @@ public final class ReceptionStatuses {
public static final Map<String, String> CENTER_COST_TYPE = map(
"k01", "정산", "k02", "위면해지", "k03", "직권해지", "k04", "유보중단환수", "k05", "해지", "k06", "voc차감");
/** 구 BillCare 한글 라벨 → 코드 */
/** 구 BizCare 한글 라벨 → 코드 */
public static final Map<String, String> LEGACY_PROGRESS = Map.ofEntries(
Map.entry("1.접수완료", "f04"),
Map.entry("2.고객통화", "f03"),
+5 -5
View File
@@ -1,8 +1,8 @@
spring:
datasource:
url: ${SPRING_DATASOURCE_URL:jdbc:mysql://localhost:3308/billcare?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Seoul&characterEncoding=UTF-8}
username: ${SPRING_DATASOURCE_USERNAME:billcare}
password: ${SPRING_DATASOURCE_PASSWORD:billcare}
url: ${SPRING_DATASOURCE_URL:jdbc:mysql://localhost:3308/bizcare?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Seoul&characterEncoding=UTF-8}
username: ${SPRING_DATASOURCE_USERNAME:bizcare}
password: ${SPRING_DATASOURCE_PASSWORD:bizcare}
jpa:
hibernate:
ddl-auto: update
@@ -23,8 +23,8 @@ server:
port: 8080
app:
jwt:
secret: ${APP_JWT_SECRET:billcare-bizcare-homes-secret-key-must-be-long-enough-256bits}
secret: ${APP_JWT_SECRET:bizcare-homes-secret-key-must-be-long-enough-256bits}
expiration-ms: ${APP_JWT_EXPIRATION_MS:86400000}
cors:
origins: ${APP_CORS_ORIGINS:http://localhost:5174,http://localhost:82,http://127.0.0.1:82,http://localhost:1420,https://billcare.exdev.co.kr,tauri://localhost,https://tauri.localhost,http://tauri.localhost}
origins: ${APP_CORS_ORIGINS:http://localhost:5174,http://localhost:82,http://127.0.0.1:82,http://localhost:1420,https://bizcare.exdev.co.kr,tauri://localhost,https://tauri.localhost,http://tauri.localhost}
upload-dir: ${APP_UPLOAD_DIR:./storage/uploads}