init:米东项目初始化
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 银行对账单下载记录(BankbillGetinfo)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2021-09-10 09:21:54
|
||||
*/
|
||||
public interface BankbillGetinfoService {
|
||||
|
||||
HashMap<Object, Object> findBankbillGetinfoById(HashMap<Object,Object> map);
|
||||
|
||||
List<HashMap<Object, Object>> findBankbillGetinfoList(HashMap<Object,Object> map);
|
||||
|
||||
void insertBankbillGetinfo(HashMap<Object,Object> map);
|
||||
|
||||
void updateBankbillGetinfo(HashMap<Object,Object> map);
|
||||
|
||||
void deleteBankbillGetinfoById(HashMap<Object,Object> map);
|
||||
|
||||
List<HashMap<Object, Object>> findBankbillGetinfoByParam(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
|
||||
import com.saye.hospitalgd.entity.BankbillHistory;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
/**
|
||||
* (BankbillHistory)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2021-09-09 15:35:53
|
||||
*/
|
||||
public interface BankbillHistoryService {
|
||||
|
||||
List<HashMap<Object,Object>> findBankbillHistoryById(HashMap<Object,Object> map);
|
||||
|
||||
List<HashMap<Object, Object>> findBankbillHistoryList(HashMap<Object,Object> map);
|
||||
|
||||
void insertBankBillOriginal(List<BankbillHistory> list, String trade_date, String bill_table_name) throws Exception;
|
||||
|
||||
void insertAllBankHistory(List<BankbillHistory> list,String trade_date,String bill_table_name) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findCzffs() throws Exception;
|
||||
|
||||
void deleteTempTable() throws Exception;
|
||||
|
||||
void findBankbillHistoryToTemp(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findBankbillHistoryByParam(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findBankbillHistoryByTimeAndPlatformTransId(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findBankBillNumByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findBankBillMoneyByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findbankbillHistoryCount(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findbankbillHistorySum(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findBankbillCountData(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import com.saye.hospitalgd.entity.BankbillsHistory;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2022/12/6
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface BankbillsHistoryService {
|
||||
List<HashMap<Object, Object>> findBankbillHistoryByParam(HashMap<Object, Object> searchNotUniqueObjMap);
|
||||
|
||||
List<HashMap<Object, Object>> findBankBillsByDate(HashMap<Object, Object> searchMap);
|
||||
|
||||
|
||||
void insertOriginal(List<BankbillsHistory> bankbillsHistories, String trade_date, String bill_table_name);
|
||||
|
||||
void insertHistory(List<BankbillsHistory> bankbillsHistories, String trade_date, String bill_table_name);
|
||||
|
||||
int saveOriginalData(List<HashMap<Object, Object>> savList, String trade_date);
|
||||
|
||||
int saveHistoryData(List<HashMap<Object, Object>> savList, String trade_date);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
public interface CashUnilateralService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface HisDetailService {
|
||||
|
||||
List<HashMap<Object, Object>> findHisDetail(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void insertHisBillOriginal(List<HashMap<Object, Object>> list, String trade_date, String his_wsdl_id) throws Exception;
|
||||
|
||||
void insertHisBillOriginalWN(List<HashMap<Object, Object>> list, String trade_date, String his_wsdl_id) throws Exception;
|
||||
|
||||
void insertHisBillOriginalHY(List<HashMap<Object, Object>> list, String trade_date, String his_wsdl_id) throws Exception;
|
||||
|
||||
void insertHisBillList(List<HashMap<Object, Object>> list,String trade_date,String his_wsdl_id) throws Exception;
|
||||
|
||||
void findHisDetailToTemp(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void deleteTempTable() throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findHisDetailByParam(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findHisDetailByTimeAndYSDDH(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findHisDetailFirmNumByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findHisCashDetail(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findHisDetailCountData(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface HisInterFaceConfigService {
|
||||
List<HashMap<Object, Object>> findConfigById(String id) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findAllconfig() throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import com.saye.hospitalgd.entity.HisbillsHistory;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2022/12/2
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface HisbillsHistoryService {
|
||||
|
||||
void saveHisHistoryData(HashMap<Object, Object> hisbillsOriginal);
|
||||
|
||||
List<HashMap<Object, Object>> findHisBillsByDate(HashMap<Object, Object> searchMap);
|
||||
|
||||
List<HashMap<Object, Object>> findHisDetailByParam(HashMap<Object, Object> searchNotUniqueObjMap) throws Exception;
|
||||
|
||||
|
||||
void saveHisbillsOriginalData(List<HisbillsHistory> hisbillsHistories, String tradeDate);
|
||||
|
||||
void saveHisbillsHistoryData(List<HisbillsHistory> hisbillsHistories, String tradeDate);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2022/12/2
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface HisbillsOriginalService {
|
||||
|
||||
void saveHisOriginalData(HashMap<Object, Object> hisbillsOriginal);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/9/29 14:55
|
||||
*/
|
||||
public interface OperatorService {
|
||||
List<HashMap<Object, Object>> findAllOperator(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void addOperator(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void modifyOperator(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void deleteOperator(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/10/9 13:36
|
||||
*/
|
||||
public interface ReconciliationResultService {
|
||||
|
||||
List<HashMap<Object, Object>> findReconciliationResultPageList(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void insertReconciliationResult(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2023/10/9
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface RefundOrderService {
|
||||
|
||||
List<HashMap<Object, Object>> findRefundOrder(HashMap<Object, Object> map);
|
||||
}
|
||||
14
src/main/java/com/saye/hospitalgd/service/RefundService.java
Normal file
14
src/main/java/com/saye/hospitalgd/service/RefundService.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/12/3 13:19
|
||||
*/
|
||||
public interface RefundService {
|
||||
|
||||
void addRefundInfo(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (ThirdFtpConfig)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2021-09-16 14:37:45
|
||||
*/
|
||||
public interface ThirdFtpConfigService {
|
||||
|
||||
HashMap<Object, Object> findThirdFtpConfigById(HashMap<Object, Object> map);
|
||||
|
||||
List<HashMap<Object, Object>> findThirdFtpConfigList(HashMap<Object, Object> map);
|
||||
|
||||
void insertThirdFtpConfig(HashMap<Object, Object> map);
|
||||
|
||||
void updateThirdFtpConfig(HashMap<Object, Object> map);
|
||||
|
||||
void deleteThirdFtpConfigById(HashMap<Object, Object> map);
|
||||
|
||||
List<HashMap<Object, Object>> findWLIF(HashMap<Object, Object> searchMap);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2022/11/7
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface ThirdSftpConfigService {
|
||||
List<HashMap<Object, Object>> findThirdSftpConfigList(HashMap<Object, Object> map);
|
||||
|
||||
List<HashMap<Object, Object>> findWLIF(HashMap<Object, Object> searchMap);
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/9/28 11:04
|
||||
*/
|
||||
public interface TransactionDetailService {
|
||||
|
||||
List<HashMap<Object, Object>> findHisAndThirdJoinData(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findHisUnilateral() throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findBankUnilateral() throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findDiff() throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findHisAndThirdJoinDataNumByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void insertHisAndThirdJoinData(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void insetHisAndCashJoinData(HashMap<Object, Object> map);
|
||||
|
||||
List<HashMap<Object, Object>> findHisAndThirdJoinDataByParam(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void updateJoinDate(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void updateJoinSetActiveByThird(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void updateJoinSetActiveByHis(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findAllBankDetailNum(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findAllBankDetailSum(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findDBZNum(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findJoinDataNumByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findDBZFLNumByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findBankBillNumByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findBankBillMoneyByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
/**
|
||||
* @description: 更新支票数据的状态
|
||||
* @author thuang
|
||||
* @date 2021/12/8 15:00
|
||||
* @version 1.0
|
||||
*/
|
||||
void updateJoinSetActiveByZhiPiao(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
/**
|
||||
* @description: 查询非唯一记录
|
||||
* @param: map
|
||||
* @author thuang
|
||||
* @date: 2022/2/23 16:02
|
||||
*/
|
||||
List<HashMap<Object, Object>> findHisAndThirdJoinDataByParamAndNotUnique(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
/**
|
||||
* @description: 删除非唯一记录
|
||||
* @author thuang
|
||||
* @date 2022/2/23 16:46
|
||||
* @version 1.0
|
||||
*/
|
||||
void deleteHisAndThirdJoinDataByParamAndNotUnique(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
/**
|
||||
* @description: 添加处理后的非唯一记录回数据
|
||||
* @author thuang
|
||||
* @date 2022/2/24 8:40
|
||||
* @version 1.0
|
||||
*/
|
||||
void addNotUniqueData(List<HashMap<Object, Object>> list) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import org.dom4j.DocumentException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2023/10/8
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface TranscationsService {
|
||||
|
||||
List<HashMap<Object, Object>> findTradeRecords(HashMap<Object, Object> map);
|
||||
|
||||
List<HashMap<Object, Object>> findActionableTrading(HashMap<Object, Object> map);
|
||||
|
||||
HashMap<Object, Object> findActionableTradingByJylsh(HashMap<Object, Object> map);
|
||||
|
||||
HashMap<String, String> refundTrade(List<HashMap<Object, Object>> list) throws DocumentException;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.saye.hospitalgd.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface UnilateralService {
|
||||
|
||||
List<HashMap<Object, Object>> findAllUnilateral(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void insertUnilateral(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void updateUnilateral(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findDBZNum(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findDBZFLNumByTime(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void deleteUnilateral(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findUnilateralByParam(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void deleteUnilateralByNoManager(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void updateUnilateralManagerStatus(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void deleteUnilateralByJoinIdNotNull(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void deleteUnilateralByIdandStatus(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.saye.hospitalgd.service.historyLog;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface CashDetailService {
|
||||
List<HashMap<Object, Object>> findCashDetailPageList(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void insertCash(List<HashMap<Object, Object>> addList) throws Exception;
|
||||
|
||||
void editCash(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void deleteCash(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findCashDetailList(HashMap<Object, Object> map)throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.saye.hospitalgd.service.historyLog;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface HisBillLogService {
|
||||
|
||||
List<HashMap<Object, Object>> findHisBillLogPageList(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void insertHisbillGetinfo(HashMap<Object, Object> map)throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findHisBillLogByParam(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.saye.hospitalgd.service.historyLog;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface ReconciliationLogService {
|
||||
|
||||
List<HashMap<Object, Object>> findReconciliationLogPageList(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
List<HashMap<Object, Object>> findReconciliationLogByParam(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
void insertReconciliationLog(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.saye.hospitalgd.service.historyLog.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.historyLog.CashDetailMapper;
|
||||
import com.saye.hospitalgd.service.historyLog.CashDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/11/5 13:20
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class CashDetailServiceImpl implements CashDetailService {
|
||||
|
||||
@Autowired
|
||||
private CashDetailMapper cashDetailMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findCashDetailPageList(HashMap<Object, Object> map) throws Exception {
|
||||
return cashDetailMapper.findCashDetailPageList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertCash(List<HashMap<Object, Object>> addList) throws Exception {
|
||||
cashDetailMapper.insertCash(addList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editCash(HashMap<Object, Object> map) throws Exception {
|
||||
cashDetailMapper.editCash(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCash(HashMap<Object, Object> map) throws Exception {
|
||||
cashDetailMapper.deleteCash(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findCashDetailList(HashMap<Object, Object> map) throws Exception {
|
||||
return cashDetailMapper.findCashDetailList(map);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.saye.hospitalgd.service.historyLog.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.historyLog.HisBillLogMapper;
|
||||
import com.saye.hospitalgd.service.historyLog.HisBillLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/8/30 10:56
|
||||
*/
|
||||
@Service
|
||||
public class HisBillLogServiceImpl implements HisBillLogService {
|
||||
|
||||
@Autowired
|
||||
private HisBillLogMapper hisBillLogMapper;
|
||||
|
||||
/**
|
||||
* @description: 查询HIS调用记录
|
||||
* @author thuang
|
||||
* @date 2021/8/30 14:33
|
||||
* @version 1.0
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisBillLogPageList(HashMap<Object, Object> map) throws Exception {
|
||||
|
||||
return hisBillLogMapper.findHisBillLogPageList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertHisbillGetinfo(HashMap<Object, Object> map) throws Exception {
|
||||
hisBillLogMapper.insertHisbillGetinfo(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisBillLogByParam(HashMap<Object, Object> map) throws Exception {
|
||||
return hisBillLogMapper.findHisBillLogByParam(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.saye.hospitalgd.service.historyLog.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.historyLog.ReconciliationLogMapper;
|
||||
import com.saye.hospitalgd.service.historyLog.ReconciliationLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/8/31 10:21
|
||||
*/
|
||||
@Service
|
||||
public class ReconciliationLogServiceImpl implements ReconciliationLogService {
|
||||
|
||||
@Autowired
|
||||
private ReconciliationLogMapper reconciliationLogMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findReconciliationLogPageList(HashMap<Object, Object> map) throws Exception {
|
||||
return reconciliationLogMapper.findReconciliationLogPageList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findReconciliationLogByParam(HashMap<Object, Object> map) throws Exception {
|
||||
return reconciliationLogMapper.findReconciliationLogByParam(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertReconciliationLog(HashMap<Object, Object> map) throws Exception {
|
||||
reconciliationLogMapper.insertReconciliationLog(map);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.BankbillGetinfoMapper;
|
||||
import com.saye.hospitalgd.service.BankbillGetinfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 银行对账单下载记录(BankbillGetinfo)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2021-09-10 09:21:56
|
||||
*/
|
||||
@Service
|
||||
public class BankbillGetinfoServiceImpl implements BankbillGetinfoService {
|
||||
@Resource
|
||||
private BankbillGetinfoMapper bankbillGetinfoMapper;
|
||||
|
||||
@Override
|
||||
public HashMap<Object, Object> findBankbillGetinfoById(HashMap<Object,Object> map) {
|
||||
return this.bankbillGetinfoMapper.findBankbillGetinfoById(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankbillGetinfoList(HashMap<Object,Object> map) {
|
||||
return this.bankbillGetinfoMapper.findBankbillGetinfoList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertBankbillGetinfo(HashMap<Object,Object> map) {
|
||||
this.bankbillGetinfoMapper.insertBankbillGetinfo(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBankbillGetinfo(HashMap<Object,Object> map) {
|
||||
this.bankbillGetinfoMapper.updateBankbillGetinfo(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBankbillGetinfoById(HashMap<Object,Object> map) {
|
||||
this.bankbillGetinfoMapper.deleteBankbillGetinfoById(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankbillGetinfoByParam(HashMap<Object, Object> map) throws Exception {
|
||||
return bankbillGetinfoMapper.findBankbillGetinfoByParam(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.entity.BankbillHistory;
|
||||
import com.saye.hospitalgd.mapper.BankbillHistoryMapper;
|
||||
import com.saye.hospitalgd.mapper.system.DicinfoMapper;
|
||||
import com.saye.hospitalgd.model.Dicinfo;
|
||||
import com.saye.hospitalgd.service.BankbillHistoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (BankbillHistory)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2021-09-09 15:35:54
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class BankbillHistoryServiceImpl implements BankbillHistoryService {
|
||||
@Resource
|
||||
private BankbillHistoryMapper bankbillHistoryMapper;
|
||||
|
||||
@Autowired
|
||||
private DicinfoMapper dicinfoMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object,Object>> findBankbillHistoryById(HashMap<Object,Object> map) {
|
||||
return this.bankbillHistoryMapper.findBankbillHistoryById(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankbillHistoryList(HashMap<Object,Object> map) {
|
||||
return this.bankbillHistoryMapper.findBankbillHistoryList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertBankBillOriginal(List<BankbillHistory> list, String trade_date, String bill_table_name) throws Exception {
|
||||
//删除之前的
|
||||
HashMap<Object,Object> deleteMap=new HashMap<>();
|
||||
deleteMap.put("trade_date",trade_date);
|
||||
deleteMap.put("bill_table_name",bill_table_name);
|
||||
this.bankbillHistoryMapper.deleteBankbillOriginalByParam(deleteMap);
|
||||
|
||||
int listNum=0;
|
||||
List<BankbillHistory> addList =new ArrayList<>();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BankbillHistory bankbillHistory = list.get(i);
|
||||
|
||||
listNum++;
|
||||
addList.add(bankbillHistory);
|
||||
if(listNum>=1000){
|
||||
this.bankbillHistoryMapper.insertBankbillOriginal(addList);
|
||||
listNum=0;
|
||||
addList=new ArrayList<>();
|
||||
}
|
||||
}
|
||||
if(listNum>0){
|
||||
this.bankbillHistoryMapper.insertBankbillOriginal(addList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertAllBankHistory(List<BankbillHistory> list,String trade_date,String bill_table_name) throws Exception{
|
||||
|
||||
//删除之前的
|
||||
HashMap<Object,Object> deleteMap=new HashMap<>();
|
||||
deleteMap.put("trade_date",trade_date);
|
||||
deleteMap.put("bill_table_name",bill_table_name);
|
||||
this.bankbillHistoryMapper.deleteBankbillHistoryByParam(deleteMap);
|
||||
|
||||
//支付方式
|
||||
List<Dicinfo> payMethodList = dicinfoMapper.findDicinfoTreeNodeList("THIRD_PAY");
|
||||
HashMap<String,String> payMethodMap=new HashMap<>();
|
||||
for (int i1 = 0; i1 < payMethodList.size(); i1++) {
|
||||
Dicinfo dicinfo = payMethodList.get(i1);
|
||||
String dicname = dicinfo.getDicname();
|
||||
//微信 支付宝 现金 特殊处理下
|
||||
if (dicname.contains("微信")){
|
||||
payMethodMap.put("微信",dicinfo.getDicvalue());
|
||||
payMethodMap.put("微信支付",dicinfo.getDicvalue());
|
||||
}else if(dicname.contains("支付宝")){
|
||||
payMethodMap.put("支付宝",dicinfo.getDicvalue());
|
||||
payMethodMap.put("支付宝支付",dicinfo.getDicvalue());
|
||||
}else if (dicname.contains("云闪付")){
|
||||
payMethodMap.put("云闪付",dicinfo.getDicvalue());
|
||||
payMethodMap.put("云闪付支付",dicinfo.getDicvalue());
|
||||
}
|
||||
|
||||
payMethodMap.put(dicinfo.getDicname(),dicinfo.getDicvalue());
|
||||
}
|
||||
|
||||
int listNum=0;
|
||||
List<BankbillHistory> addList =new ArrayList<>();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BankbillHistory bankbillHistory = list.get(i);
|
||||
|
||||
String billTableName = bankbillHistory.getBillTableName();
|
||||
String cZffs = bankbillHistory.getCZffs();
|
||||
String zffs = payMethodMap.get(cZffs);
|
||||
//修改支付方式变为字典表中对应的值
|
||||
if ("商户银联卡对账单".equals(billTableName)){
|
||||
zffs = payMethodMap.get("银行卡支付");
|
||||
bankbillHistory.setCZffs(zffs);
|
||||
}else if ("商户对账单".equals(billTableName)){
|
||||
zffs = payMethodMap.get("掌医支付");
|
||||
bankbillHistory.setCZffs(zffs);
|
||||
}else{
|
||||
if (zffs==null){
|
||||
zffs = payMethodMap.get("其他支付");
|
||||
bankbillHistory.setCZffs(zffs);
|
||||
}else {
|
||||
bankbillHistory.setCZffs(zffs);
|
||||
}
|
||||
}
|
||||
|
||||
//修改交易类型 消费 消费撤消
|
||||
String cJyje = bankbillHistory.getCJyje();
|
||||
/*String cJylx = bankbillHistory.getCJylx();
|
||||
if("消费".equals(cJylx)){
|
||||
bankbillHistory.setCJylx("1");
|
||||
}else if ("消费撤消".equals(cJylx) ||"联机退货".equals(cJylx)){
|
||||
bankbillHistory.setCJylx("2");
|
||||
}*/
|
||||
|
||||
BigDecimal bigDecimal = new BigDecimal(cJyje);
|
||||
if (bigDecimal.compareTo(new BigDecimal(0))>0){
|
||||
bankbillHistory.setCJylx("1");
|
||||
}else {
|
||||
bankbillHistory.setCJylx("2");
|
||||
}
|
||||
|
||||
listNum++;
|
||||
addList.add(bankbillHistory);
|
||||
if(listNum>=1000){
|
||||
this.bankbillHistoryMapper.insertAllBankHistory(addList);
|
||||
listNum=0;
|
||||
addList=new ArrayList<>();
|
||||
}
|
||||
}
|
||||
if(listNum>0){
|
||||
this.bankbillHistoryMapper.insertAllBankHistory(addList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findCzffs() throws Exception {
|
||||
return this.bankbillHistoryMapper.findCzffs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTempTable() throws Exception {
|
||||
bankbillHistoryMapper.deleteTempTable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findBankbillHistoryToTemp(HashMap<Object, Object> map) throws Exception {
|
||||
bankbillHistoryMapper.findBankbillHistoryToTemp(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankbillHistoryByParam(HashMap<Object, Object> map) throws Exception {
|
||||
return bankbillHistoryMapper.findBankbillHistoryByParam(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankbillHistoryByTimeAndPlatformTransId(HashMap<Object, Object> map) throws Exception {
|
||||
return bankbillHistoryMapper.findBankbillHistoryByTimeAndPlatformTransId(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankBillNumByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return bankbillHistoryMapper.findBankBillNumByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankBillMoneyByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return bankbillHistoryMapper.findBankBillMoneyByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findbankbillHistoryCount(HashMap<Object, Object> map) throws Exception {
|
||||
return bankbillHistoryMapper.findbankbillHistoryCount(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findbankbillHistorySum(HashMap<Object, Object> map) throws Exception {
|
||||
return bankbillHistoryMapper.findbankbillHistorySum(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankbillCountData(HashMap<Object, Object> map) throws Exception {
|
||||
return bankbillHistoryMapper.findBankbillCountData(map);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.saye.hospitalgd.entity.BankbillsHistory;
|
||||
import com.saye.hospitalgd.mapper.BankbillsHistoryMapper;
|
||||
import com.saye.hospitalgd.mapper.system.DicinfoMapper;
|
||||
import com.saye.hospitalgd.model.Dicinfo;
|
||||
import com.saye.hospitalgd.service.BankbillsHistoryService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2022/12/6
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class BankbillsHistoryServiceImpl implements BankbillsHistoryService {
|
||||
@Resource
|
||||
BankbillsHistoryMapper bankbillsHistoryMapper;
|
||||
|
||||
@Resource
|
||||
DicinfoMapper dicinfoMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankbillHistoryByParam(HashMap<Object, Object> searchNotUniqueObjMap) {
|
||||
return bankbillsHistoryMapper.findBankbillHistoryByParam(searchNotUniqueObjMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankBillsByDate(HashMap<Object, Object> searchMap) {
|
||||
return bankbillsHistoryMapper.findBankBillsByDate(searchMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertOriginal(List<BankbillsHistory> bankbillsHistories, String trade_date, String bill_table_name) {
|
||||
// 删除之前的
|
||||
HashMap<Object, Object> deleteMap = new HashMap<>();
|
||||
deleteMap.put("trade_date", trade_date);
|
||||
// deleteMap.put("bill_table_name", bill_table_name);
|
||||
bankbillsHistoryMapper.deleteOriginalByParam(deleteMap);
|
||||
|
||||
int listNum = 0;
|
||||
List<BankbillsHistory> addList = new ArrayList<>();
|
||||
for (int i = 0; i < bankbillsHistories.size(); i++) {
|
||||
BankbillsHistory bankbillsHistory = bankbillsHistories.get(i);
|
||||
listNum++;
|
||||
addList.add(bankbillsHistory);
|
||||
if (listNum >= 1000) {
|
||||
bankbillsHistoryMapper.insertOriginal(addList);
|
||||
listNum = 0;
|
||||
addList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
if (listNum > 0) {
|
||||
bankbillsHistoryMapper.insertOriginal(addList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertHistory(List<BankbillsHistory> bankbillsHistories, String trade_date, String bill_table_name) {
|
||||
// 删除之前的
|
||||
HashMap<Object, Object> deleteMap = new HashMap<>();
|
||||
deleteMap.put("trade_date", trade_date);
|
||||
// deleteMap.put("bill_table_name", bill_table_name);
|
||||
bankbillsHistoryMapper.deleteHistoryByParam(deleteMap);
|
||||
|
||||
// 交易渠道
|
||||
List<Dicinfo> tradeChannelList = dicinfoMapper.findDicinfoTreeNodeList("THIRD_PAY");
|
||||
HashMap<String, String> tradeChannelMap = new HashMap<>();
|
||||
for (int i1 = 0; i1 < tradeChannelList.size(); i1++) {
|
||||
Dicinfo dicinfo = tradeChannelList.get(i1);
|
||||
String dicname = dicinfo.getDicname();
|
||||
// 微信 支付宝 现金 特殊处理下
|
||||
if (dicname.contains("微信")) {
|
||||
tradeChannelMap.put("微信", dicinfo.getDicvalue());
|
||||
tradeChannelMap.put("微信支付", dicinfo.getDicvalue());
|
||||
} else if (dicname.contains("支付宝")) {
|
||||
tradeChannelMap.put("支付宝", dicinfo.getDicvalue());
|
||||
tradeChannelMap.put("支付宝支付", dicinfo.getDicvalue());
|
||||
} else if (dicname.contains("刷卡")) {
|
||||
tradeChannelMap.put("刷卡付", dicinfo.getDicvalue());
|
||||
tradeChannelMap.put("刷卡支付", dicinfo.getDicvalue());
|
||||
}
|
||||
|
||||
tradeChannelMap.put(dicinfo.getDicname(), dicinfo.getDicvalue());
|
||||
}
|
||||
|
||||
int listNum = 0;
|
||||
|
||||
List<BankbillsHistory> addList = new ArrayList<>();
|
||||
for (int i = 0; i < bankbillsHistories.size(); i++) {
|
||||
BankbillsHistory bankbillsHistory = bankbillsHistories.get(i);
|
||||
|
||||
|
||||
// String billTableName = bankbillHistory.getBillTableName();
|
||||
// 交易方式
|
||||
// String iJyfs = bankbillsHistory.getIJyfs();
|
||||
// 交易渠道
|
||||
String iJyqd = bankbillsHistory.getIJyqd();
|
||||
// 交易类型
|
||||
String iJylx = bankbillsHistory.getIJylx();
|
||||
|
||||
|
||||
if (!iJyqd.equals("")) {
|
||||
bankbillsHistory.setIJyqd(tradeChannelMap.get(iJyqd));
|
||||
} else {
|
||||
|
||||
bankbillsHistory.setIJyqd("其他交易渠道");
|
||||
}
|
||||
|
||||
if (!iJylx.equals("")) {
|
||||
if (iJylx.equals("退费")) {
|
||||
bankbillsHistory.setIJylx("2");
|
||||
} else {
|
||||
bankbillsHistory.setIJylx("1");
|
||||
}
|
||||
}
|
||||
|
||||
listNum++;
|
||||
addList.add(bankbillsHistory);
|
||||
if (listNum >= 1000) {
|
||||
this.bankbillsHistoryMapper.insertHistory(addList);
|
||||
listNum = 0;
|
||||
addList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
if (listNum > 0) {
|
||||
this.bankbillsHistoryMapper.insertHistory(addList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int saveOriginalData(List<HashMap<Object, Object>> savList, String trade_date) {
|
||||
// 删除之前的
|
||||
HashMap<Object, Object> deleteMap = new HashMap<>();
|
||||
deleteMap.put("trade_date", trade_date);
|
||||
// deleteMap.put("bill_table_name", bill_table_name);
|
||||
bankbillsHistoryMapper.deleteOriginalByParam(deleteMap);
|
||||
|
||||
return bankbillsHistoryMapper.saveOriginalData(savList);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int saveHistoryData(List<HashMap<Object, Object>> savList, String trade_date) {
|
||||
// 删除之前的
|
||||
HashMap<Object, Object> deleteMap = new HashMap<>();
|
||||
deleteMap.put("trade_date", trade_date);
|
||||
// deleteMap.put("bill_table_name", bill_table_name);
|
||||
bankbillsHistoryMapper.deleteHistoryByParam(deleteMap);
|
||||
// 交易渠道
|
||||
List<Dicinfo> tradeChannelList = dicinfoMapper.findDicinfoTreeNodeList("THIRD_PAY");
|
||||
HashMap<String, String> tradeChannelMap = new HashMap<>();
|
||||
for (int i1 = 0; i1 < tradeChannelList.size(); i1++) {
|
||||
Dicinfo dicinfo = tradeChannelList.get(i1);
|
||||
String dicname = dicinfo.getDicname();
|
||||
// 微信 支付宝 现金 特殊处理下
|
||||
if (dicname.contains("微信")) {
|
||||
tradeChannelMap.put("微信", dicinfo.getDicvalue());
|
||||
tradeChannelMap.put("微信支付", dicinfo.getDicvalue());
|
||||
} else if (dicname.contains("支付宝")) {
|
||||
tradeChannelMap.put("支付宝", dicinfo.getDicvalue());
|
||||
tradeChannelMap.put("支付宝支付", dicinfo.getDicvalue());
|
||||
} else if (dicname.contains("刷卡")) {
|
||||
tradeChannelMap.put("刷卡付", dicinfo.getDicvalue());
|
||||
tradeChannelMap.put("刷卡支付", dicinfo.getDicvalue());
|
||||
}
|
||||
|
||||
tradeChannelMap.put(dicinfo.getDicname(), dicinfo.getDicvalue());
|
||||
}
|
||||
// 遍历数据,将数据保存为易于对比的数据,主要是 支付状态,支付方式的修改
|
||||
ArrayList<HashMap<Object, Object>> maps = new ArrayList<>();
|
||||
|
||||
for (HashMap<Object, Object> map : savList) {
|
||||
if (Double.parseDouble(map.get("i_jyje").toString()) > 0) {
|
||||
map.put("i_jylx", "1");
|
||||
} else {
|
||||
map.put("i_jylx", "2");
|
||||
}
|
||||
if (!map.get("i_fxk").toString().equals("")) {
|
||||
if (StrUtil.isNotEmpty(tradeChannelMap.get(map.get("i_fxk").toString()))) {
|
||||
|
||||
map.put("i_fxk", tradeChannelMap.get(map.get("i_fxk").toString()));
|
||||
} else {
|
||||
map.put("i_fxk", "1_4");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
maps.add(map);
|
||||
}
|
||||
return bankbillsHistoryMapper.saveHistoryData(maps);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.CashUnilateralMapper;
|
||||
import com.saye.hospitalgd.service.CashUnilateralService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/11/8 14:36
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class CashUnilateralServiceImpl implements CashUnilateralService {
|
||||
|
||||
@Autowired
|
||||
private CashUnilateralMapper cashUnilateralMapper;
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.HisDetailMapper;
|
||||
import com.saye.hospitalgd.service.HisDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/9/28 13:10
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class HisDetailServiceImpl implements HisDetailService {
|
||||
|
||||
@Autowired
|
||||
private HisDetailMapper hisDetailMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisDetail(HashMap<Object, Object> map) throws Exception {
|
||||
return hisDetailMapper.findHisDetail(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 中联的原始记录表添加
|
||||
* @author thuang
|
||||
* @date 2021/11/9 13:47
|
||||
* @version 1.0
|
||||
*/
|
||||
@Override
|
||||
public void insertHisBillOriginal(List<HashMap<Object, Object>> list, String trade_date, String his_wsdl_id) throws Exception {
|
||||
//删除以前的
|
||||
HashMap<Object,Object> deleteMap=new HashMap<>();
|
||||
deleteMap.put("trade_date",trade_date);
|
||||
hisDetailMapper.deleteHisBillOriginalByParam(deleteMap);
|
||||
|
||||
int listNum=0;
|
||||
List<HashMap<Object, Object>> addList =new ArrayList<>();
|
||||
for (HashMap<Object, Object> hashMap : list) {
|
||||
listNum++;
|
||||
hashMap.put("his_wsdl_id",his_wsdl_id);
|
||||
addList.add(hashMap);
|
||||
if (listNum >= 1000) {
|
||||
this.hisDetailMapper.insertAllHisBillOriginal(addList);
|
||||
listNum = 0;
|
||||
addList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
if(listNum>0){
|
||||
this.hisDetailMapper.insertAllHisBillOriginal(addList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 卫宁的原始记录表添加
|
||||
* @author thuang
|
||||
* @date 2021/11/9 13:47
|
||||
* @version 1.0
|
||||
*/
|
||||
@Override
|
||||
public void insertHisBillOriginalWN(List<HashMap<Object, Object>> list, String trade_date, String his_wsdl_id) throws Exception {
|
||||
HashMap<Object,Object> deleteMap=new HashMap<>();
|
||||
deleteMap.put("trade_date",trade_date);
|
||||
hisDetailMapper.deleteHisBillOriginalWNByParam(deleteMap);
|
||||
|
||||
int listNum=0;
|
||||
List<HashMap<Object, Object>> addList =new ArrayList<>();
|
||||
for (HashMap<Object, Object> hashMap : list) {
|
||||
listNum++;
|
||||
hashMap.put("his_wsdl_id",his_wsdl_id);
|
||||
addList.add(hashMap);
|
||||
if (listNum >= 1000) {
|
||||
this.hisDetailMapper.insertAllHisBillOriginalWN(addList);
|
||||
listNum = 0;
|
||||
addList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
if(listNum>0){
|
||||
this.hisDetailMapper.insertAllHisBillOriginalWN(addList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertHisBillOriginalHY(List<HashMap<Object, Object>> list, String trade_date, String his_wsdl_id) throws Exception {
|
||||
//删除以前的
|
||||
HashMap<Object,Object> deleteMap=new HashMap<>();
|
||||
deleteMap.put("trade_date",trade_date);
|
||||
hisDetailMapper.deleteHisBillOriginalHYByParam(deleteMap);
|
||||
|
||||
int listNum=0;
|
||||
List<HashMap<Object, Object>> addList =new ArrayList<>();
|
||||
for (HashMap<Object, Object> hashMap : list) {
|
||||
listNum++;
|
||||
hashMap.put("his_wsdl_id",his_wsdl_id);
|
||||
addList.add(hashMap);
|
||||
if (listNum >= 1000) {
|
||||
this.hisDetailMapper.insertAllHisBillOriginalHY(addList);
|
||||
listNum = 0;
|
||||
addList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
if(listNum>0){
|
||||
this.hisDetailMapper.insertAllHisBillOriginalHY(addList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertHisBillList(List<HashMap<Object, Object>> list,String trade_date,String his_wsdl_id) throws Exception {
|
||||
|
||||
//删除以前的
|
||||
HashMap<Object,Object> deleteMap=new HashMap<>();
|
||||
deleteMap.put("trade_date",trade_date);
|
||||
hisDetailMapper.deleteHisBillByParam(deleteMap);
|
||||
|
||||
//将数据同样全部添加到历史表
|
||||
int listNum=0;
|
||||
List<HashMap<Object, Object>> addList =new ArrayList<>();
|
||||
for (HashMap<Object, Object> hashMap : list) {
|
||||
listNum++;
|
||||
hashMap.put("his_wsdl_id",his_wsdl_id);
|
||||
addList.add(hashMap);
|
||||
if (listNum >= 1000) {
|
||||
this.hisDetailMapper.insertAllHisBillHistory(addList);
|
||||
listNum = 0;
|
||||
addList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
if(listNum>0){
|
||||
this.hisDetailMapper.insertAllHisBillHistory(addList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findHisDetailToTemp(HashMap<Object, Object> map) throws Exception {
|
||||
hisDetailMapper.findHisDetailToTemp(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTempTable() throws Exception {
|
||||
hisDetailMapper.deleteTempTable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisDetailByParam(HashMap<Object, Object> map) throws Exception {
|
||||
return hisDetailMapper.findHisDetailByParam(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisDetailByTimeAndYSDDH(HashMap<Object, Object> map) throws Exception {
|
||||
return hisDetailMapper.findHisDetailByTimeAndYSDDH(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisDetailFirmNumByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return hisDetailMapper.findHisDetailFirmNumByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisCashDetail(HashMap<Object, Object> map) throws Exception {
|
||||
return hisDetailMapper.findHisCashDetail(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisDetailCountData(HashMap<Object, Object> map) throws Exception {
|
||||
return hisDetailMapper.findHisDetailCountData(map);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.HisInterFaceConfigMapper;
|
||||
import com.saye.hospitalgd.service.HisInterFaceConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/10/13 11:11
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class HisInterFaceConfigServiceImpl implements HisInterFaceConfigService {
|
||||
|
||||
@Autowired
|
||||
private HisInterFaceConfigMapper hisInterFaceConfigMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findConfigById(String id) throws Exception {
|
||||
return hisInterFaceConfigMapper.findConfigById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findAllconfig() throws Exception {
|
||||
return hisInterFaceConfigMapper.findAllconfig();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.entity.HisbillsHistory;
|
||||
import com.saye.hospitalgd.mapper.HisbillsHistoryMapper;
|
||||
import com.saye.hospitalgd.mapper.system.DicinfoMapper;
|
||||
import com.saye.hospitalgd.model.Dicinfo;
|
||||
import com.saye.hospitalgd.service.HisbillsHistoryService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2022/12/2
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class HisbillsHistoryServiceImpl implements HisbillsHistoryService {
|
||||
|
||||
@Resource
|
||||
private HisbillsHistoryMapper hisbillsHistoryMapper;
|
||||
|
||||
@Resource
|
||||
private DicinfoMapper dicinfoMapper;
|
||||
|
||||
@Override
|
||||
public void saveHisHistoryData(HashMap<Object, Object> hisbillsOriginal) {
|
||||
|
||||
// 支付方式
|
||||
List<Dicinfo> payTypeList = dicinfoMapper.findDicinfoTreeNodeList("PAY_TYPE");
|
||||
HashMap<String, String> payTypeMap = new HashMap<>();
|
||||
for (int i1 = 0; i1 < payTypeList.size(); i1++) {
|
||||
Dicinfo dicinfo = payTypeList.get(i1);
|
||||
String dicname = dicinfo.getDicname();
|
||||
// 微信 支付宝 现金 特殊处理下
|
||||
if (dicname.contains("聚合")) {
|
||||
payTypeMap.put("聚合", dicinfo.getDicvalue());
|
||||
payTypeMap.put("聚合支付", dicinfo.getDicvalue());
|
||||
} else if (dicname.contains("银行卡")) {
|
||||
payTypeMap.put("银行卡", dicinfo.getDicvalue());
|
||||
payTypeMap.put("银行卡支付", dicinfo.getDicvalue());
|
||||
}
|
||||
payTypeMap.put(dicinfo.getDicname(), dicinfo.getDicvalue());
|
||||
}
|
||||
|
||||
if (hisbillsOriginal.get("zfzt").equals("支付")) {// 更改支付状态为方便对比的数据
|
||||
hisbillsOriginal.put("zfzt", "1");
|
||||
} else {
|
||||
hisbillsOriginal.put("zfzt", "2");
|
||||
}
|
||||
|
||||
String zffs = (String) hisbillsOriginal.get("zffs");
|
||||
|
||||
if (zffs.contains("聚合")) {// 更改支付方式方便数据对比
|
||||
hisbillsOriginal.put("zffs", payTypeMap.get("聚合支付"));
|
||||
} else if (zffs.contains("银行卡")) {
|
||||
hisbillsOriginal.put("zffs", payTypeMap.get("银行卡支付"));
|
||||
} else {
|
||||
hisbillsOriginal.put("zffs", payTypeMap.get("其他"));
|
||||
}
|
||||
hisbillsHistoryMapper.saveHisHistoryData(hisbillsOriginal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisBillsByDate(HashMap<Object, Object> searchMap) {
|
||||
|
||||
return hisbillsHistoryMapper.findHisBillsByDate(searchMap);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisDetailByParam(HashMap<Object, Object> searchNotUniqueObjMap) throws Exception {
|
||||
return hisbillsHistoryMapper.findHisDetailByParam(searchNotUniqueObjMap);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void saveHisbillsOriginalData(List<HisbillsHistory> hisbillsHistories, String trade_date) {
|
||||
HashMap<Object, Object> delMap = new HashMap<>();
|
||||
delMap.put("trade_date", trade_date);
|
||||
|
||||
ArrayList<HisbillsHistory> histories = new ArrayList<>();
|
||||
|
||||
for (HisbillsHistory hisbillsHistory : hisbillsHistories) {
|
||||
|
||||
hisbillsHistory.setTrade_date(trade_date);
|
||||
histories.add(hisbillsHistory);
|
||||
}
|
||||
|
||||
hisbillsHistoryMapper.deleteOriginalDataByDate(delMap);// 先删除当天的旧的。再获取新的数据
|
||||
|
||||
hisbillsHistoryMapper.insertHisBillsOriginalList(histories);// 原封不动的保存原始数据
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveHisbillsHistoryData(List<HisbillsHistory> hisbillsHistories, String trade_date) {
|
||||
HashMap<Object, Object> delMap = new HashMap<>();
|
||||
|
||||
delMap.put("trade_date", trade_date);
|
||||
|
||||
hisbillsHistoryMapper.deleteHistoryDataByDate(delMap);// 先删除当天的旧的。再获取新的数据
|
||||
|
||||
ArrayList<HisbillsHistory> histories = new ArrayList<>();
|
||||
|
||||
for (HisbillsHistory hisbillsHistory : hisbillsHistories) {
|
||||
if (!hisbillsHistory.getAmount().equals("0")) {
|
||||
String tradeTime = hisbillsHistory.getTradeTime();
|
||||
String[] split = tradeTime.split(" ");
|
||||
hisbillsHistory.setTrade_date(split[0]);
|
||||
if (hisbillsHistory.getPayType().equals("0")) {
|
||||
hisbillsHistory.setPayType("1");
|
||||
}
|
||||
if (hisbillsHistory.getPayType().equals("-1")) {
|
||||
hisbillsHistory.setPayType("5");
|
||||
}
|
||||
histories.add(hisbillsHistory);
|
||||
}
|
||||
}
|
||||
hisbillsHistoryMapper.insertHisbillsHistoryList(histories);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.hisbillsOriginalMapper;
|
||||
import com.saye.hospitalgd.service.HisbillsOriginalService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2022/12/2
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class HisbillsOriginalServiceImpl implements HisbillsOriginalService {
|
||||
|
||||
|
||||
@Resource
|
||||
private hisbillsOriginalMapper hisbillsOriginalMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void saveHisOriginalData(HashMap<Object, Object> hisbillsOriginal) {
|
||||
|
||||
String jysj = (String) hisbillsOriginal.get("jysj");
|
||||
String[] s = jysj.split(" ");
|
||||
|
||||
hisbillsOriginal.put("jyrq", s[0]);
|
||||
|
||||
hisbillsOriginalMapper.saveHisOriginalData(hisbillsOriginal);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.commons.date.DateDUtil;
|
||||
import com.saye.hospitalgd.commons.string.StringDUtil;
|
||||
import com.saye.hospitalgd.mapper.OperatorMapper;
|
||||
import com.saye.hospitalgd.service.OperatorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/9/29 14:55
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class OperatorServiceImpl implements OperatorService {
|
||||
|
||||
@Autowired
|
||||
private OperatorMapper operatorMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findAllOperator(HashMap<Object, Object> map) throws Exception {
|
||||
return operatorMapper.findAllOperator(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOperator(HashMap<Object, Object> map) throws Exception {
|
||||
String hisOperCode = StringDUtil.changeNullToEmpty(map.get("hisOperCode"));
|
||||
|
||||
//先查询是否已有
|
||||
List<HashMap<Object,Object>> list = operatorMapper.findAllOperatorByCode(map);
|
||||
//有更新,没有添加
|
||||
map.put("is_active","1");
|
||||
map.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss));
|
||||
|
||||
if (list.size()>0){
|
||||
operatorMapper.updateOperatorByCode(map);
|
||||
}else {
|
||||
operatorMapper.addOperator(map);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifyOperator(HashMap<Object, Object> map) throws Exception {
|
||||
map.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss));
|
||||
operatorMapper.updateOperatorByCode(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOperator(HashMap<Object, Object> map) throws Exception {
|
||||
map.put("is_active","0");
|
||||
map.put("modify_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss));
|
||||
operatorMapper.updateOperatorByCode(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.ReconciliationResultMapper;
|
||||
import com.saye.hospitalgd.service.ReconciliationResultService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/10/9 13:37
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class ReconciliationResultServiceImpl implements ReconciliationResultService {
|
||||
|
||||
@Autowired
|
||||
private ReconciliationResultMapper reconciliationResultMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findReconciliationResultPageList(HashMap<Object, Object> map) throws Exception {
|
||||
return reconciliationResultMapper.findReconciliationResultPageList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertReconciliationResult(HashMap<Object, Object> map) throws Exception {
|
||||
reconciliationResultMapper.insertReconciliationResult(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.RefundOrderMapper;
|
||||
import com.saye.hospitalgd.service.RefundOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2023/10/9
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class RefundOrderServiceImpl implements RefundOrderService {
|
||||
|
||||
@Autowired
|
||||
RefundOrderMapper refundOrderMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findRefundOrder(HashMap<Object, Object> map) {
|
||||
List<HashMap<Object, Object>> tempList = refundOrderMapper.findRefundOrder(map);
|
||||
List<HashMap<Object, Object>> hashMaps = new ArrayList<>();
|
||||
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
for (HashMap<Object, Object> ohm : tempList) {
|
||||
LocalDateTime o = (LocalDateTime) ohm.get("TIME_STAMP");
|
||||
ohm.put("TIME_STAMP", o.format(fmt));
|
||||
hashMaps.add(ohm);
|
||||
}
|
||||
return hashMaps;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.RefundMapper;
|
||||
import com.saye.hospitalgd.service.RefundService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/12/3 13:19
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class RefundServiceImpl implements RefundService {
|
||||
|
||||
@Autowired
|
||||
private RefundMapper refundMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void addRefundInfo(HashMap<Object, Object> map) throws Exception {
|
||||
refundMapper.addRefundInfo(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.ThirdFtpConfigMapper;
|
||||
import com.saye.hospitalgd.service.ThirdFtpConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (ThirdFtpConfig)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2021-09-16 14:37:46
|
||||
*/
|
||||
@Service
|
||||
public class ThirdFtpConfigServiceImpl implements ThirdFtpConfigService {
|
||||
@Resource
|
||||
private ThirdFtpConfigMapper thirdFtpConfigMapper;
|
||||
|
||||
@Override
|
||||
public HashMap<Object, Object> findThirdFtpConfigById(HashMap<Object,Object> map) {
|
||||
return this.thirdFtpConfigMapper.findThirdFtpConfigById(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findThirdFtpConfigList(HashMap<Object,Object> map) {
|
||||
return this.thirdFtpConfigMapper.findThirdFtpConfigList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertThirdFtpConfig(HashMap<Object,Object> map) {
|
||||
this.thirdFtpConfigMapper.insertThirdFtpConfig(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateThirdFtpConfig(HashMap<Object,Object> map) {
|
||||
this.thirdFtpConfigMapper.updateThirdFtpConfig(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteThirdFtpConfigById(HashMap<Object,Object> map) {
|
||||
this.thirdFtpConfigMapper.deleteThirdFtpConfigById(map);
|
||||
}
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findWLIF(HashMap<Object, Object> searchMap) {
|
||||
return thirdFtpConfigMapper.findWLIF(searchMap);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.ThirdSftpConfigMapper;
|
||||
import com.saye.hospitalgd.service.ThirdSftpConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2022/11/7
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class ThirdSftpConfigServiceImpl implements ThirdSftpConfigService {
|
||||
|
||||
@Resource
|
||||
private ThirdSftpConfigMapper thirdSftpConfigMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findThirdSftpConfigList(HashMap<Object, Object> map) {
|
||||
return thirdSftpConfigMapper.findThirdSftpConfigList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findWLIF(HashMap<Object, Object> searchMap) {
|
||||
return thirdSftpConfigMapper.findWLIF(searchMap);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.TransactionDetailMapper;
|
||||
import com.saye.hospitalgd.service.TransactionDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/9/28 11:04
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class TransactionDetailServiceImpl implements TransactionDetailService {
|
||||
|
||||
@Autowired
|
||||
private TransactionDetailMapper transactionDetailMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisAndThirdJoinData(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findHisAndThirdJoinData(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisUnilateral() throws Exception {
|
||||
return transactionDetailMapper.findHisUnilateral();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankUnilateral() throws Exception {
|
||||
return transactionDetailMapper.findBankUnilateral();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findDiff() throws Exception {
|
||||
return transactionDetailMapper.findDiff();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisAndThirdJoinDataNumByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findHisAndThirdJoinDataNumByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertHisAndThirdJoinData(HashMap<Object, Object> map) throws Exception {
|
||||
//先删除原来的记录
|
||||
transactionDetailMapper.deleteHisAndThirdJoinData(map);
|
||||
|
||||
//分别插入能关联的 //单边的 (非现金账 ) 这里有个坑 假如银行端有空的账单过来,这里关联处理会出问题。 如果真有这情况 需要分开 his的‘其他’这类 同现金相似处理
|
||||
transactionDetailMapper.insertJoinDataToHisAndThird(map);
|
||||
transactionDetailMapper.insertHisUnilateral(map);
|
||||
transactionDetailMapper.insertThirdUnilateral(map);
|
||||
|
||||
// //现金账
|
||||
// transactionDetailMapper.insertJoinDataToHisAndCash(map);
|
||||
// transactionDetailMapper.insertHisCashUnilateral(map);
|
||||
// transactionDetailMapper.insertCashUnilateral(map);
|
||||
|
||||
//判断差错账 更新状态
|
||||
transactionDetailMapper.updateHisAndThirdError(map);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insetHisAndCashJoinData(HashMap<Object, Object> map) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisAndThirdJoinDataByParam(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findHisAndThirdJoinDataByParam(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateJoinDate(HashMap<Object, Object> map) throws Exception {
|
||||
transactionDetailMapper.updateJoinDate(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateJoinSetActiveByThird(HashMap<Object, Object> map) throws Exception {
|
||||
//判断是否现金账单
|
||||
// String c_zffs = StringDUtil.changeNullToEmpty(map.get("c_zffs"));
|
||||
// String cash_code = StringDUtil.changeNullToEmpty(map.get("cash_code"));
|
||||
|
||||
// if (cash_code.equals(c_zffs)) {
|
||||
// transactionDetailMapper.updateJoinSetActiveByThirdCash(map);
|
||||
// } else {
|
||||
transactionDetailMapper.updateJoinSetActiveByThird(map);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateJoinSetActiveByHis(HashMap<Object, Object> map) throws Exception {
|
||||
//判断是否现金账单
|
||||
// String payType = StringDUtil.changeNullToEmpty(map.get("payType"));
|
||||
// String cash_code = StringDUtil.changeNullToEmpty(map.get("cash_code"));
|
||||
|
||||
// if (cash_code.equals(payType)){
|
||||
// transactionDetailMapper.updateJoinSetActiveByHisCash(map);
|
||||
// }else {
|
||||
transactionDetailMapper.updateJoinSetActiveByHis(map);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findAllBankDetailNum(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findAllBankDetailNum(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findAllBankDetailSum(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findAllBankDetailSum(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findDBZNum(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findDBZNum(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findJoinDataNumByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findJoinDataNumByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findDBZFLNumByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findDBZFLNumByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankBillNumByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findBankBillNumByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findBankBillMoneyByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findBankBillMoneyByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateJoinSetActiveByZhiPiao(HashMap<Object, Object> map) throws Exception {
|
||||
transactionDetailMapper.updateJoinSetActiveByZhiPiao(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findHisAndThirdJoinDataByParamAndNotUnique(HashMap<Object, Object> map) throws Exception {
|
||||
return transactionDetailMapper.findHisAndThirdJoinDataByParamAndNotUnique(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteHisAndThirdJoinDataByParamAndNotUnique(HashMap<Object, Object> map) throws Exception {
|
||||
transactionDetailMapper.deleteHisAndThirdJoinDataByParamAndNotUnique(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addNotUniqueData(List<HashMap<Object, Object>> list) throws Exception {
|
||||
transactionDetailMapper.addNotUniqueData(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.commons.string.StringDUtil;
|
||||
import com.saye.hospitalgd.mapper.TranscationsMapper;
|
||||
import com.saye.hospitalgd.service.TranscationsService;
|
||||
import com.saye.hospitalgd.service.system.ServiceParamsService;
|
||||
import com.saye.hospitalgd.util.RefundUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dom4j.DocumentException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @author: Mr.zs
|
||||
* @date: 2023/10/8
|
||||
* @description:
|
||||
* @modifiedBy:
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TranscationsServiceImp implements TranscationsService {
|
||||
|
||||
|
||||
@Autowired
|
||||
TranscationsMapper transcationsMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
ServiceParamsService serviceParamsService;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findTradeRecords(HashMap<Object, Object> map) {
|
||||
List<HashMap<Object, Object>> tempList = transcationsMapper.findTradeRecords(map);
|
||||
List<HashMap<Object, Object>> hashMaps = new ArrayList<>();
|
||||
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
for (HashMap<Object, Object> ohm : tempList) {
|
||||
LocalDateTime o = (LocalDateTime) ohm.get("TIME_STAMP");
|
||||
ohm.put("TIME_STAMP", o.format(fmt));
|
||||
hashMaps.add(ohm);
|
||||
}
|
||||
return hashMaps;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findActionableTrading(HashMap<Object, Object> map) {
|
||||
List<HashMap<Object, Object>> tempList = transcationsMapper.findActionableTrading(map);
|
||||
List<HashMap<Object, Object>> hashMaps = new ArrayList<>();
|
||||
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
for (HashMap<Object, Object> ohm : tempList) {
|
||||
LocalDateTime o = (LocalDateTime) ohm.get("TIME_STAMP");
|
||||
ohm.put("TIME_STAMP", o.format(fmt));
|
||||
hashMaps.add(ohm);
|
||||
}
|
||||
return hashMaps;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<Object, Object> findActionableTradingByJylsh(HashMap<Object, Object> map) {
|
||||
log.info("jylsh is :" + map.get("jylsh"));
|
||||
return transcationsMapper.findActionableTradingByJylsh(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, String> refundTrade(List<HashMap<Object, Object>> list) throws DocumentException {
|
||||
HashMap<Object, Object> refundObj = list.get(0);
|
||||
//调用支付接口退费接口
|
||||
List<HashMap<Object, Object>> palm_hospitalList = serviceParamsService.findParamValByParamCode("jfjk_wsdl");
|
||||
String palm_hospital = StringDUtil.changeNullToEmpty(palm_hospitalList.get(0).get("PARAM_VAL"));
|
||||
return new RefundUtil().refundTrade(refundObj, palm_hospital);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.saye.hospitalgd.service.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.UnilateralMapper;
|
||||
import com.saye.hospitalgd.service.UnilateralService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author thuang
|
||||
* @version 1.0
|
||||
* @description: TODO
|
||||
* @date 2021/9/28 14:16
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class UnilateralServiceImpl implements UnilateralService {
|
||||
|
||||
@Autowired
|
||||
private UnilateralMapper unilateralMapper;
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findAllUnilateral(HashMap<Object, Object> map) throws Exception {
|
||||
return unilateralMapper.findAllUnilateral(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertUnilateral(HashMap<Object, Object> map) throws Exception {
|
||||
unilateralMapper.insertUnilateral(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUnilateral(HashMap<Object, Object> map) throws Exception {
|
||||
unilateralMapper.updateUnilateral(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findDBZNum(HashMap<Object, Object> map) throws Exception {
|
||||
return unilateralMapper.findDBZNum(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findDBZFLNumByTime(HashMap<Object, Object> map) throws Exception {
|
||||
return unilateralMapper.findDBZFLNumByTime(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUnilateral(HashMap<Object, Object> map) throws Exception {
|
||||
unilateralMapper.deleteUnilateral(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findUnilateralByParam(HashMap<Object, Object> map) throws Exception {
|
||||
return unilateralMapper.findUnilateralByParam(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUnilateralByNoManager(HashMap<Object, Object> map) throws Exception {
|
||||
unilateralMapper.deleteUnilateralByNoManager(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUnilateralManagerStatus(HashMap<Object, Object> map) throws Exception {
|
||||
unilateralMapper.updateUnilateralManagerStatus(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUnilateralByJoinIdNotNull(HashMap<Object, Object> map) throws Exception {
|
||||
unilateralMapper.deleteUnilateralByJoinIdNotNull(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUnilateralByIdandStatus(HashMap<Object, Object> map) throws Exception {
|
||||
unilateralMapper.deleteUnilateralByIdandStatus(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.saye.hospitalgd.service.quartz;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.saye.hospitalgd.model.BaseQuartzConfigEntity;
|
||||
|
||||
public interface BaseQuartzConfigService {
|
||||
|
||||
public List<BaseQuartzConfigEntity> findAll(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
public BaseQuartzConfigEntity get(String id) throws Exception;
|
||||
|
||||
public void updateQuartzConfig(BaseQuartzConfigEntity quartzConfigEntity)throws Exception;
|
||||
|
||||
public List<HashMap<Object, Object>> findMaxId() throws Exception;
|
||||
|
||||
public void addQuartz(HashMap<Object, Object> addMap) throws Exception;
|
||||
|
||||
public List<HashMap<Object, Object>> findOrderProjectList() throws Exception;
|
||||
|
||||
public void deleteQuartzConfigById(String id) throws Exception;
|
||||
|
||||
public void updateQuartzConfigById(HashMap<Object, Object> updateMap) throws Exception;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.saye.hospitalgd.service.quartz.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.saye.hospitalgd.mapper.quzrtz.BaseQuartzConfigMapper;
|
||||
import com.saye.hospitalgd.model.BaseQuartzConfigEntity;
|
||||
import com.saye.hospitalgd.service.quartz.BaseQuartzConfigService;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class BaseQuartzConfigServiceImpl implements BaseQuartzConfigService{
|
||||
|
||||
@Autowired
|
||||
private BaseQuartzConfigMapper baseQuartzConfigMapper;
|
||||
|
||||
@Override
|
||||
public List<BaseQuartzConfigEntity> findAll(HashMap<Object, Object> map) throws Exception {
|
||||
|
||||
return this.baseQuartzConfigMapper.findAll(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseQuartzConfigEntity get(String id) throws Exception {
|
||||
|
||||
return this.baseQuartzConfigMapper.findEntityById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateQuartzConfig(BaseQuartzConfigEntity quartzConfigEntity) throws Exception {
|
||||
|
||||
this.baseQuartzConfigMapper.updateQuartzConfigByEntity(quartzConfigEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findMaxId() throws Exception {
|
||||
|
||||
return this.baseQuartzConfigMapper.findMaxId();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addQuartz(HashMap<Object, Object> addMap) throws Exception {
|
||||
this.baseQuartzConfigMapper.addQuartz(addMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购任务类型
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findOrderProjectList() throws Exception {
|
||||
|
||||
return this.baseQuartzConfigMapper.findOrderProjectList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除定时任务
|
||||
*/
|
||||
@Override
|
||||
public void deleteQuartzConfigById(String id) throws Exception {
|
||||
this.baseQuartzConfigMapper.deleteQuartzConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改定时任务
|
||||
*/
|
||||
@Override
|
||||
public void updateQuartzConfigById(HashMap<Object, Object> updateMap) throws Exception {
|
||||
this.baseQuartzConfigMapper.updateQuartzConfigById(updateMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.saye.hospitalgd.service.system;
|
||||
|
||||
import com.saye.hospitalgd.commons.entity.DepartEntity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface DepartService {
|
||||
|
||||
//通过父节点查询
|
||||
public List<HashMap<Object, Object>> findDepartTreeNodeList(String parentId);
|
||||
|
||||
//新增部门
|
||||
public int addDepart(HashMap<String,String> map) throws Exception;
|
||||
|
||||
//修改部门
|
||||
public int modifyDepart(HashMap<String,String> map) throws Exception;
|
||||
|
||||
//删除部门以及该部门的子节点
|
||||
|
||||
public int removeDepart(HashMap<String,String> map) throws Exception;
|
||||
|
||||
//查询所有的部门数据
|
||||
public List<DepartEntity> selectDepartTreeList();
|
||||
//根据父级id查询子集
|
||||
public List<HashMap<Object, Object>> findDepartByParentId(HashMap<String, Object> map);
|
||||
|
||||
//查询所有部门list
|
||||
public List<HashMap<Object,Object>> selectAllDeparts();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.saye.hospitalgd.service.system;
|
||||
|
||||
import com.saye.hospitalgd.model.Dicinfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface DicinfoService {
|
||||
//通过父节点查询
|
||||
public List<Dicinfo> findDicinfoTreeNodeList(String parentCode);
|
||||
//通过diccode查询字典
|
||||
public List<Dicinfo> findDicinfoBydiccode(String diccode);
|
||||
|
||||
//新增
|
||||
public int addDicinfo(HashMap<String,String> map) throws Exception;
|
||||
//修改
|
||||
public int modifyDicinfo(HashMap<String,String> map) throws Exception ;
|
||||
//删除
|
||||
public int deleteDicinfo(String diccode) throws Exception ;
|
||||
public List<HashMap<Object, Object>> selectDicinfoListByCode(String parent_code);
|
||||
//通过parentCode和val值查询该父类下值是否重复
|
||||
public List<Dicinfo> findDicinfoTreeByCode(HashMap<String,String> map);
|
||||
public List<HashMap<Object, Object>> selectDicinfoListByCondition(HashMap<String, String> map);
|
||||
//通过parentCode查询该字典下的最大值
|
||||
public HashMap<Object, Object> getMaxDicValue(HashMap<String,String> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.saye.hospitalgd.service.system;
|
||||
|
||||
import com.saye.hospitalgd.model.Logger;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface LoggerService {
|
||||
|
||||
/**
|
||||
* @description 查询系统日志
|
||||
* @author thuang
|
||||
* @param map
|
||||
* @created 2019年11月14日 下午1:19:15
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Logger> findLogger(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.saye.hospitalgd.service.system;
|
||||
|
||||
import com.saye.hospitalgd.model.MenuRole;
|
||||
import com.saye.hospitalgd.model.ResourceInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface MenuService {
|
||||
|
||||
public ResourceInfo getMenuByRole(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
/**
|
||||
* @description 根据角色id获取集合
|
||||
* @author thuang
|
||||
* @created 2019年11月12日 上午11:18:49
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public List<MenuRole> getMenuIdByRoleId(HashMap<Object, Object> map);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.saye.hospitalgd.service.system;
|
||||
|
||||
import com.saye.hospitalgd.model.Role;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface RoleService {
|
||||
|
||||
/**查询角色列表
|
||||
* */
|
||||
public List<Role> findRoleList();
|
||||
/**多条件查询角色列表
|
||||
* */
|
||||
public List<Role> searchRole(HashMap<String,String>map);
|
||||
/**删除角色
|
||||
* */
|
||||
public int deleteRole(String roleId);
|
||||
|
||||
/**
|
||||
* @description 添加权限
|
||||
* @author thuang
|
||||
* @created 2019年11月11日 下午4:16:32
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public String addRole(HashMap<String,String> map);
|
||||
|
||||
//修改用户角色权限
|
||||
public int modifyRoleResource(HashMap<String,String> map);
|
||||
|
||||
/**
|
||||
* 根据条件查询用户是否在管理员角色权限下
|
||||
* @return
|
||||
*/
|
||||
public List<HashMap<Object, Object>> findUserRoleListByParam(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
/**
|
||||
* @description: 根据用户id查询用户权限
|
||||
* @author thuang
|
||||
* @date 2021/5/24 17:08
|
||||
* @version 1.0
|
||||
*/
|
||||
List<HashMap<Object,Object>> findUserRoleListByUserId(HashMap<Object, Object> map) throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.saye.hospitalgd.service.system;
|
||||
|
||||
import com.saye.hospitalgd.model.ServiceParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface ServiceParamsService {
|
||||
//对业务参数列表进行增删查改
|
||||
public List<ServiceParams> selectServiceParams(HashMap<String,String> map);
|
||||
|
||||
//新增
|
||||
public int insertServiceParams(ServiceParams sp) throws Exception;
|
||||
//修改
|
||||
public int updateServiceParams(ServiceParams sp) throws Exception;
|
||||
|
||||
//删除
|
||||
public int deleteServiceParams(String paramId) throws Exception;
|
||||
|
||||
public List<HashMap<Object,Object>> findParamVal()throws Exception;
|
||||
|
||||
//根据code查询配置value
|
||||
public List<HashMap<Object, Object>> findParamValByParamCode(String code);
|
||||
|
||||
public void updateServiceParamsValBycode(HashMap<String,String> map);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.saye.hospitalgd.service.system;
|
||||
|
||||
import com.saye.hospitalgd.model.UserRole;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserRoleService {
|
||||
|
||||
//根据userId查询记录
|
||||
public List<UserRole> selectUserRoleByUserId(String userId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.saye.hospitalgd.service.system;
|
||||
|
||||
import com.saye.hospitalgd.model.Users;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface UsersService {
|
||||
/**
|
||||
* 分页查询用户列表
|
||||
* */
|
||||
public List<Users> searchUsers(HashMap<Object, Object> map);
|
||||
/**新增用户
|
||||
* @throws Exception
|
||||
* */
|
||||
public int insertUser(HashMap<Object, Object> map) throws Exception;
|
||||
|
||||
/**修改用户
|
||||
*
|
||||
* */
|
||||
public int modifyUsers(HashMap<Object, Object> requestMap) throws Exception;
|
||||
|
||||
/**user用户密码重置
|
||||
* */
|
||||
public int reSetPassword(HashMap<Object, Object> requestMap)throws Exception;
|
||||
/**
|
||||
* 修改状态 启用禁用
|
||||
* */
|
||||
public int unableUser(HashMap<Object, Object> requestMap)throws Exception;
|
||||
/**新增用户名验证
|
||||
* */
|
||||
public List<Users> searchByName(String userName);
|
||||
|
||||
/**
|
||||
* @description 修改密码
|
||||
* @author thuang
|
||||
* @created 2019年11月28日 上午8:38:14
|
||||
* @param username
|
||||
* @param password
|
||||
* @param modifyTime
|
||||
*/
|
||||
public void modifyPassword(String username, String password, String modifyTime)throws Exception;
|
||||
|
||||
public void modifyLockTime(String username,String lockTime);
|
||||
|
||||
/**
|
||||
* @description: 导入人员
|
||||
* @author thuang
|
||||
* @date 2021/5/19 14:34
|
||||
* @version 1.0
|
||||
*/
|
||||
void insertExcelUsers(List<HashMap<Object, Object>> list);
|
||||
|
||||
/**
|
||||
* @description: 根据部门id查询用户
|
||||
* @author thuang
|
||||
* @date 2021/7/8 11:38
|
||||
* @version 1.0
|
||||
*/
|
||||
List<HashMap<Object, Object>> findUserByDepartIds(List<String> idList) throws Exception;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.saye.hospitalgd.service.system.impl;
|
||||
|
||||
import com.saye.hospitalgd.commons.entity.DepartEntity;
|
||||
import com.saye.hospitalgd.commons.string.StringDUtil;
|
||||
import com.saye.hospitalgd.mapper.system.DepartMapper;
|
||||
import com.saye.hospitalgd.model.Departs;
|
||||
import com.saye.hospitalgd.service.system.DepartService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class DepartServiceImpl implements DepartService {
|
||||
@Autowired
|
||||
private DepartMapper departMapper;
|
||||
|
||||
/**
|
||||
* @description 查询部门树
|
||||
* @author thuang
|
||||
* @created 2019年11月12日 下午3:53:20
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findDepartTreeNodeList(String parentId) {
|
||||
List<HashMap<Object, Object>> list = departMapper.selectDepartTreeListByParentId(parentId);
|
||||
|
||||
List<HashMap<Object,Object>> resourceInfo=new ArrayList<>();
|
||||
|
||||
HashMap<String,HashMap<Object,Object>> idMap=new HashMap<>();
|
||||
HashMap<String,List<HashMap<Object,Object>>> pidMap=new HashMap<>();
|
||||
|
||||
//循环处理将个事件放入map,根据pid分组放入另外一个map用来准备生成树
|
||||
for (int i=0;i<list.size();i++){
|
||||
HashMap<Object, Object> map = list.get(i);
|
||||
String id = StringDUtil.changeNullToEmpty(map.get("DEPART_ID"));
|
||||
String pid = StringDUtil.changeNullToEmpty(map.get("PARENT_ID"));
|
||||
map.put("name",map.get("DEPART_NAME"));
|
||||
map.put("id",map.get("DEPART_ID"));
|
||||
map.put("title",map.get("DEPART_NAME"));
|
||||
idMap.put(id,map);
|
||||
if (pid.equals(parentId)) {
|
||||
resourceInfo.add(map);
|
||||
continue;
|
||||
}
|
||||
|
||||
List<HashMap<Object, Object>> pidList = pidMap.get(pid);
|
||||
if (pidList == null){
|
||||
pidList=new ArrayList<>();
|
||||
pidMap.put(pid,pidList);
|
||||
}
|
||||
|
||||
pidList.add(map);
|
||||
}
|
||||
//循环生成树
|
||||
for (String key : pidMap.keySet()){
|
||||
List<HashMap<Object, Object>> list1 = pidMap.get(key);
|
||||
HashMap<Object, Object> dataMap = idMap.get(key);
|
||||
if (dataMap !=null){
|
||||
dataMap.put("children",list1);
|
||||
}
|
||||
}
|
||||
return resourceInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int addDepart(HashMap<String, String> map)throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return departMapper.addDepart(map);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int modifyDepart(HashMap<String, String> map) throws Exception{
|
||||
// TODO Auto-generated method stub
|
||||
return departMapper.modifyDepart(map);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int removeDepart(HashMap<String, String> map) throws Exception{
|
||||
// TODO Auto-generated method stub
|
||||
return departMapper.removeDepart(map);
|
||||
}
|
||||
|
||||
|
||||
//查询所有的部门信息
|
||||
@Override
|
||||
public List<DepartEntity> selectDepartTreeList() {
|
||||
// 首先查询说有的部门信息
|
||||
List<Departs> list= departMapper.selectDepartTreeList();
|
||||
return tree(list,"-1");
|
||||
}
|
||||
|
||||
|
||||
//递归查询的方法
|
||||
public List<DepartEntity> tree(List<Departs> list,String parentId){
|
||||
List<DepartEntity> ls=new ArrayList<DepartEntity>();
|
||||
for(Departs d:list){
|
||||
String departsId=d.getDepartId();
|
||||
String pid=d.getParentId();
|
||||
if(parentId.equals(pid)){
|
||||
List<DepartEntity> c_node=tree(list,departsId);
|
||||
DepartEntity de=new DepartEntity();
|
||||
de.setChildren(c_node);
|
||||
de.setId(departsId);
|
||||
de.setTitle(d.getDepartName());
|
||||
de.setSpread(true);
|
||||
ls.add(de);
|
||||
}
|
||||
}
|
||||
return ls;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findDepartByParentId(HashMap<String, Object> map) {
|
||||
|
||||
return this.departMapper.findDepartByParentId(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询所有部门数据
|
||||
* @author thuang
|
||||
* @date 2021/5/19 10:11
|
||||
* @version 1.0
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<Object,Object>> selectAllDeparts() {
|
||||
|
||||
return this.departMapper.selectAllDeparts();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.saye.hospitalgd.service.system.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.system.DicinfoMapper;
|
||||
import com.saye.hospitalgd.model.Dicinfo;
|
||||
import com.saye.hospitalgd.service.system.DicinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class DicinfoServiceImpl implements DicinfoService {
|
||||
@Autowired
|
||||
private DicinfoMapper dicinfoMapper;
|
||||
|
||||
/**
|
||||
* @description 查询字典表
|
||||
* @author thuang
|
||||
* @created 2019年11月12日 下午3:53:20
|
||||
*/
|
||||
@Override
|
||||
public List<Dicinfo> findDicinfoTreeNodeList(String parentCode) {
|
||||
List<Dicinfo> list = dicinfoMapper.findDicinfoTreeNodeList(parentCode);
|
||||
return list;
|
||||
|
||||
}
|
||||
@Override
|
||||
public List<Dicinfo> findDicinfoBydiccode(String diccode) {
|
||||
// TODO Auto-generated method stub
|
||||
return dicinfoMapper.findDicinfoBydiccode(diccode);
|
||||
}
|
||||
@Override
|
||||
@Transactional
|
||||
public int addDicinfo(HashMap<String, String> map)throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return dicinfoMapper.addDicinfo(map);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int modifyDicinfo(HashMap<String, String> map) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return dicinfoMapper.modifyDicinfo(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteDicinfo(String diccode) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return dicinfoMapper.deleteDicinfo(diccode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> selectDicinfoListByCode(String parent_code) {
|
||||
// TODO Auto-generated method stub
|
||||
return dicinfoMapper.selectDicinfoListByCode(parent_code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Dicinfo> findDicinfoTreeByCode(HashMap<String, String> map) {
|
||||
// TODO Auto-generated method stub
|
||||
return dicinfoMapper.findDicinfoTreeByCode(map);
|
||||
}
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> selectDicinfoListByCondition(HashMap<String, String> map) {
|
||||
|
||||
return dicinfoMapper.selectDicinfoListByCondition(map);
|
||||
}
|
||||
@Override
|
||||
public HashMap<Object, Object> getMaxDicValue(HashMap<String, String> map) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return dicinfoMapper.getMaxDicValue(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.saye.hospitalgd.service.system.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.system.LoggerMapper;
|
||||
import com.saye.hospitalgd.model.Logger;
|
||||
import com.saye.hospitalgd.service.system.LoggerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class LoggerServiceImpl implements LoggerService{
|
||||
|
||||
@Autowired
|
||||
private LoggerMapper loggerMapper;
|
||||
|
||||
/**
|
||||
* @description 查询所有日志数据
|
||||
* @author thuang
|
||||
* @created 2019年11月14日 下午1:22:00
|
||||
*/
|
||||
@Override
|
||||
public List<Logger> findLogger(HashMap<Object, Object> map) throws Exception {
|
||||
|
||||
List<Logger> list = loggerMapper.findLoggers(map);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.saye.hospitalgd.service.system.impl;
|
||||
|
||||
import com.saye.hospitalgd.commons.string.StringDUtil;
|
||||
import com.saye.hospitalgd.mapper.system.MenuMapper;
|
||||
import com.saye.hospitalgd.mapper.system.MenuRoleMapper;
|
||||
import com.saye.hospitalgd.model.MenuRole;
|
||||
import com.saye.hospitalgd.model.ResourceInfo;
|
||||
import com.saye.hospitalgd.service.system.MenuService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MenuServiceImpl implements MenuService{
|
||||
|
||||
@Autowired
|
||||
private MenuMapper menuMapper;
|
||||
|
||||
@Autowired
|
||||
private MenuRoleMapper menuRoleMapper;
|
||||
|
||||
public List<HashMap<String, Object>> getAllMenu(List<HashMap<String,Object>> menuList) {
|
||||
|
||||
List<HashMap<String, Object>> list = this.menuMapper.findMenuById("0");
|
||||
for(HashMap<String, Object> menuMap:list) {
|
||||
// List<HashMap<String, Object>> childlist = this.menuMapper.getAllMenu(list,menuMap);
|
||||
// menuMap.put("childMenu", childlist);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceInfo getMenuByRole(HashMap<Object, Object> map) throws Exception{
|
||||
|
||||
ResourceInfo resourceInfo = new ResourceInfo();
|
||||
|
||||
List<HashMap<Object, Object>> list = (List<HashMap<Object, Object>>) this.menuMapper.findMenuByRole(map);
|
||||
//根据level将数据添加到对象中
|
||||
for (HashMap<Object, Object> hashMap : list) {
|
||||
String parentid = StringDUtil.changeNullToEmpty(hashMap.get("PARENTID"));
|
||||
//生成主节点
|
||||
if(resourceInfo.getId() == null){
|
||||
resourceInfo = this.createResourceInfo(hashMap);
|
||||
continue;
|
||||
}
|
||||
else if(resourceInfo.getId().equals(parentid)){
|
||||
//当为1级子节点时,parentid 等于 主节点的ID
|
||||
ResourceInfo nodeInfo = this.createResourceInfo(hashMap);
|
||||
resourceInfo.getChildren().add(nodeInfo);
|
||||
}
|
||||
else
|
||||
this.createReourceChildrenNode(hashMap,resourceInfo.getChildren());
|
||||
}
|
||||
|
||||
|
||||
return resourceInfo;
|
||||
}
|
||||
|
||||
private ResourceInfo createResourceInfo(HashMap<Object, Object> hashMap){
|
||||
ResourceInfo nodeInfo = new ResourceInfo();
|
||||
nodeInfo.setId(StringDUtil.changeNullToEmpty(hashMap.get("ID")));
|
||||
nodeInfo.setSysid(StringDUtil.changeNullToEmpty(hashMap.get("sysid")));
|
||||
nodeInfo.setTitle(StringDUtil.changeNullToEmpty(hashMap.get("TEXT")));
|
||||
nodeInfo.setAttributes(hashMap);
|
||||
return nodeInfo;
|
||||
}
|
||||
|
||||
private void createReourceChildrenNode(HashMap<Object, Object> hashMap,ArrayList<ResourceInfo> resourceInfoList){
|
||||
if(null == resourceInfoList || resourceInfoList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
/*
|
||||
取第一个节点,判断节点的level是否与当前节点的父节点的level相同.
|
||||
如果相同则当前节点肯定为该级别下某个节点的子节点。
|
||||
如果不同则继续判断前节点的所有子节点。
|
||||
*/
|
||||
ResourceInfo resourceInfo = resourceInfoList.get(0);
|
||||
int parentlevel = Integer.valueOf(hashMap.get("RESLEVEL").toString()) - 1;//获取当前节点的父节点level
|
||||
String parentid = StringDUtil.changeNullToEmpty(hashMap.get("PARENTID"));
|
||||
int resourceInfoLevel = Integer.valueOf(resourceInfo.getAttributes().get("RESLEVEL").toString());
|
||||
if(resourceInfoLevel == parentlevel){
|
||||
//判断list中节点的ID是否与当前节点的parentid相同,如果相同则问该节点的子节点
|
||||
for (ResourceInfo parentNode : resourceInfoList)
|
||||
if (parentNode.getId().equals(parentid)) {
|
||||
ResourceInfo nodeInfo = this.createResourceInfo(hashMap);
|
||||
parentNode.getChildren().add(nodeInfo);
|
||||
return;//添加完成后跳出循环
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
for (ResourceInfo parentNode : resourceInfoList)
|
||||
this.createReourceChildrenNode(hashMap, parentNode.getChildren());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 根据角色id获取权限数据
|
||||
* @author thuang
|
||||
* @created 2019年11月12日 上午11:20:47
|
||||
*/
|
||||
@Override
|
||||
public List<MenuRole> getMenuIdByRoleId(HashMap<Object, Object> map) {
|
||||
List<MenuRole> list=menuRoleMapper.getMenuRolesByRoleId(map);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.saye.hospitalgd.service.system.impl;
|
||||
|
||||
import com.saye.hospitalgd.commons.string.StringDUtil;
|
||||
import com.saye.hospitalgd.commons.uuid.UUIDGenerator;
|
||||
import com.saye.hospitalgd.mapper.system.DepartMapper;
|
||||
import com.saye.hospitalgd.mapper.system.MenuRoleMapper;
|
||||
import com.saye.hospitalgd.mapper.system.RoleMapper;
|
||||
import com.saye.hospitalgd.model.Role;
|
||||
import com.saye.hospitalgd.service.system.RoleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class RoleServiceImpl implements RoleService {
|
||||
@Autowired
|
||||
private RoleMapper roleMapper;
|
||||
@Autowired
|
||||
private MenuRoleMapper menuRoleMapper;
|
||||
|
||||
@Autowired
|
||||
private DepartMapper departMapper;
|
||||
|
||||
@Override
|
||||
public List<Role> findRoleList() {
|
||||
// TODO Auto-generated method stub
|
||||
return roleMapper.findRoleList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Role> searchRole(HashMap<String, String> map) {
|
||||
// TODO Auto-generated method stub
|
||||
return roleMapper.searchRole(map);
|
||||
}
|
||||
|
||||
//删除角色,通过角色id删除角色,同时删除角色权限表的信息
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteRole(String roleId) {
|
||||
//通过roleId 删除role_menu表的记录
|
||||
int b=menuRoleMapper.deleteMenuRole(roleId);
|
||||
//删除角色表数据
|
||||
int a=roleMapper.deleteRole(roleId);
|
||||
return a;
|
||||
}
|
||||
|
||||
//修改用户角色的权限
|
||||
@Override
|
||||
@Transactional
|
||||
public int modifyRoleResource(HashMap<String, String> map) {
|
||||
|
||||
this.roleMapper.updateRole(map);
|
||||
|
||||
String roleId=map.get("roleId");
|
||||
if(roleId==null || roleId ==""){
|
||||
return 0;
|
||||
}
|
||||
// 先删除menu_role表中的记录根据roleId
|
||||
int a=menuRoleMapper.deleteMenuRole(roleId);
|
||||
//插入menu_role 表中数据
|
||||
|
||||
String menuId= map.get("menuId");
|
||||
String[] menuIdArr = menuId.split(",");
|
||||
int menuIdLen = menuIdArr.length;
|
||||
int b=0;
|
||||
for (int i = 0; i < menuIdLen; i++) {
|
||||
String med = menuIdArr[i];
|
||||
b+=menuRoleMapper.insertMenuRole(roleId, med);
|
||||
}
|
||||
if(menuIdLen!=b){
|
||||
return 0;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 添加角色
|
||||
* @author thuang
|
||||
* @created 2019年11月11日 下午4:46:12
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public String addRole(HashMap<String, String> map) {
|
||||
//先创建角色
|
||||
if ("".equals(StringDUtil.changeNullToEmpty(map.get("roleName")))) {
|
||||
return "角色名不能为空";
|
||||
}
|
||||
String menuIdStr= StringDUtil.changeNullToEmpty(map.get("menuId"));
|
||||
|
||||
String uuid = UUIDGenerator.getUUID();
|
||||
map.put("roleId", uuid);
|
||||
roleMapper.addRole(map);
|
||||
|
||||
if (!"".equals(menuIdStr)) {
|
||||
String[] menuIdList = menuIdStr.split(",");
|
||||
//再添加权限
|
||||
for (int i = 0; i < menuIdList.length; i++) {
|
||||
String menuId=menuIdList[i];
|
||||
|
||||
menuRoleMapper.insertMenuRole(uuid, menuId);
|
||||
}
|
||||
}
|
||||
|
||||
return "true";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户是否在管理员角色权限下
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findUserRoleListByParam(HashMap<Object, Object> map) throws Exception {
|
||||
|
||||
return this.roleMapper.findUserRoleListByParam(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findUserRoleListByUserId(HashMap<Object, Object> map) throws Exception {
|
||||
List<HashMap<Object, Object>> list = this.roleMapper.findUserRoleListByUserId(map);
|
||||
|
||||
List<HashMap<Object, Object>> departList = new ArrayList<>();
|
||||
|
||||
if (list.size() > 0) {
|
||||
HashSet<String> depart_idHS=new HashSet<>();
|
||||
for (int i=0;i<list.size();i++){
|
||||
HashMap<Object, Object> roleMap = list.get(i);
|
||||
|
||||
String depart_id = StringDUtil.changeNullToEmpty(roleMap.get("DEPART_ID"));
|
||||
|
||||
String[] split = depart_id.split(",");
|
||||
|
||||
for (int j=0;j<split.length;j++){
|
||||
String s = split[j];
|
||||
if (!"".equals(s)){
|
||||
depart_idHS.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
departList = departMapper.findDepartById(depart_idHS);
|
||||
}
|
||||
|
||||
|
||||
return departList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.saye.hospitalgd.service.system.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.system.ServiceParamsMapper;
|
||||
import com.saye.hospitalgd.model.ServiceParams;
|
||||
import com.saye.hospitalgd.service.system.ServiceParamsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ServiceParamsServiceImpl implements ServiceParamsService {
|
||||
@Autowired
|
||||
private ServiceParamsMapper serviceParamsMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<ServiceParams> selectServiceParams(HashMap<String, String> map) {
|
||||
// TODO Auto-generated method stub
|
||||
return serviceParamsMapper.selectServiceParams(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertServiceParams(ServiceParams sp) throws Exception {
|
||||
// 1.先根据参数编码查询,是否有重复编码
|
||||
List<HashMap<Object, Object>> result=serviceParamsMapper.findParamValByParamCode(sp.getParamCode());
|
||||
if(result.size()>0){
|
||||
//大于0代表编码已存在
|
||||
return -1;
|
||||
}
|
||||
return serviceParamsMapper.insertServiceParams(sp);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateServiceParams(ServiceParams sp) throws Exception{
|
||||
return serviceParamsMapper.updateServiceParams(sp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteServiceParams(String paramId) throws Exception{
|
||||
// TODO Auto-generated method stub
|
||||
return serviceParamsMapper.deleteServiceParams(paramId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findParamVal() throws Exception {
|
||||
|
||||
return serviceParamsMapper.findParamVal();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 根据code查询配置的val
|
||||
* @author thuang
|
||||
* @created 2020年1月3日 下午6:41:37
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findParamValByParamCode(String code) {
|
||||
List<HashMap<Object, Object>> result=null;
|
||||
try {
|
||||
result=serviceParamsMapper.findParamValByParamCode(code);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 根据code修改val
|
||||
* @author dqzhang
|
||||
* @created 2020年5月19日 上午10:01:32
|
||||
*/
|
||||
public void updateServiceParamsValBycode(HashMap<String,String> map){
|
||||
|
||||
this.serviceParamsMapper.updateServiceParamsValBycode(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.saye.hospitalgd.service.system.impl;
|
||||
|
||||
import com.saye.hospitalgd.mapper.system.UserRoleMapper;
|
||||
import com.saye.hospitalgd.model.UserRole;
|
||||
import com.saye.hospitalgd.service.system.UserRoleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class UserRoleServiceImpl implements UserRoleService {
|
||||
@Autowired
|
||||
private UserRoleMapper userRoleMapper;
|
||||
@Override
|
||||
public List<UserRole> selectUserRoleByUserId(String userId) {
|
||||
// TODO Auto-generated method stub
|
||||
return userRoleMapper.selectUserRoleByUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.saye.hospitalgd.service.system.impl;
|
||||
|
||||
import com.saye.hospitalgd.commons.date.DateDUtil;
|
||||
import com.saye.hospitalgd.commons.string.StringDUtil;
|
||||
import com.saye.hospitalgd.commons.uuid.UUIDGenerator;
|
||||
import com.saye.hospitalgd.mapper.system.UserRoleMapper;
|
||||
import com.saye.hospitalgd.mapper.system.UsersMapper;
|
||||
import com.saye.hospitalgd.model.Users;
|
||||
import com.saye.hospitalgd.service.system.UsersService;
|
||||
import org.apache.shiro.crypto.hash.Md5Hash;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class UsersServiceImpl implements UsersService{
|
||||
|
||||
@Autowired
|
||||
private UsersMapper usersMapper;
|
||||
@Autowired
|
||||
private UserRoleMapper userRoleMapper;
|
||||
|
||||
@Override
|
||||
public List<Users> searchUsers(HashMap<Object, Object> map) {
|
||||
List<Users> usersList = usersMapper.searchUsers(map);
|
||||
return usersList;
|
||||
}
|
||||
|
||||
/**新增用户逻辑,插入user表该用户的信息
|
||||
* 在插入user_role表该用户角色id
|
||||
*
|
||||
* */
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertUser(HashMap<Object, Object> map)throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
//将密码进行加密
|
||||
String addPassword = StringDUtil.changeNullToEmpty(map.get("addPassword"));
|
||||
|
||||
String addPasswordMd5 = new Md5Hash(addPassword,"hospitalgd",2).toString();
|
||||
map.put("addPassword", addPasswordMd5);
|
||||
|
||||
String addUserName = StringDUtil.changeNullToEmpty(map.get("addUserName"));
|
||||
|
||||
//先验证是否已有用户名
|
||||
List<Users> searchByName = usersMapper.searchByName(addUserName);
|
||||
|
||||
if (searchByName!=null && searchByName.size()>0) {
|
||||
throw new RuntimeException("用户名已存在");
|
||||
}
|
||||
|
||||
String uuid = UUIDGenerator.getUUID();
|
||||
map.put("userId", uuid);
|
||||
map.put("create_time", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd_HH_mm_ss));
|
||||
map.put("create_date", DateDUtil.getCurrentDate(DateDUtil.yyyy_MM_dd));
|
||||
|
||||
//插入用户表
|
||||
int a=usersMapper.insertUser(map);
|
||||
//插入用户角色表userRole
|
||||
String roleId = StringDUtil.changeNullToEmpty(map.get("addRoleId"));
|
||||
String userId= uuid;
|
||||
String[] roleIdArr = roleId.split(",");
|
||||
int roleIdLen = roleIdArr.length;
|
||||
int b=0;
|
||||
for (int i = 0; i < roleIdLen; i++) {
|
||||
String rId = roleIdArr[i];
|
||||
String userRoleId = UUIDGenerator.getUUID();
|
||||
b += userRoleMapper.insertNewUserRole(userId, rId, userRoleId);
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
//修改用户信息
|
||||
@Override
|
||||
@Transactional
|
||||
public int modifyUsers(HashMap<Object, Object> map)throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
//修改用户信息 更新user表信息
|
||||
int a=usersMapper.modifyUsers(map);
|
||||
//删除user_role表中userId的记录
|
||||
String userId=StringDUtil.changeNullToEmpty(map.get("userId"));
|
||||
userRoleMapper.deleteUserRole(userId);
|
||||
//插入用户角色表userRole中记录
|
||||
String roleId = StringDUtil.changeNullToEmpty(map.get("roleId"));
|
||||
String[] roleIdArr = roleId.split(",");
|
||||
int roleIdLen = roleIdArr.length;
|
||||
int b=0;
|
||||
for (int i = 0; i < roleIdLen; i++) {
|
||||
String rId = roleIdArr[i];
|
||||
b+=userRoleMapper.insertUserRole(userId, rId);
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
//user用户密码重置
|
||||
@Override
|
||||
@Transactional
|
||||
public int reSetPassword(HashMap<Object, Object> map)throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return usersMapper.reSetPassword(map);
|
||||
}
|
||||
|
||||
//用户修改禁用状态
|
||||
@Override
|
||||
@Transactional
|
||||
public int unableUser(HashMap<Object, Object> map)throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return usersMapper.unableUser(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Users> searchByName(String userName) {
|
||||
// TODO Auto-generated method stub
|
||||
return usersMapper.searchByName(userName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 修改密码
|
||||
* @author thuang
|
||||
* @created 2019年11月28日 上午8:40:26
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void modifyPassword(String username, String password, String modifyTime) throws Exception {
|
||||
|
||||
this.usersMapper.modifyPassword(username,password,modifyTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifyLockTime(String username, String lockTime){
|
||||
|
||||
this.usersMapper.modifyLockTime(username, lockTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 导入人员
|
||||
* @author thuang
|
||||
* @date 2021/5/19 14:34
|
||||
* @version 1.0
|
||||
*/
|
||||
@Override
|
||||
public void insertExcelUsers(List<HashMap<Object, Object>> list) {
|
||||
|
||||
this.usersMapper.insertExcelUsers(list);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HashMap<Object, Object>> findUserByDepartIds(List<String> idList) throws Exception {
|
||||
|
||||
return this.usersMapper.findUserByDepartIds(idList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user