Commit f18f31ef authored by wujipeng's avatar wujipeng
Browse files

excel解析增加人员所属案件id

parent 1ded015f
...@@ -217,8 +217,15 @@ public class AnalysisServiceImpl implements AnalysisService { ...@@ -217,8 +217,15 @@ public class AnalysisServiceImpl implements AnalysisService {
} }
if (!excelData.isEmpty()) { if (!excelData.isEmpty()) {
List<String> paymentBankNames = excelData.stream().map(ExcelDataEntity::getPaymentBankName).distinct().collect(Collectors.toList()); List<String> paymentBankNames = excelData.stream().map(ExcelDataEntity::getPaymentBankName).distinct().collect(Collectors.toList());
userAccountService.saveUserBatch(paymentBankNames.stream().map(paymentBankName -> UserAccountEntity List<UserAccountEntity> userAccountList = Lists.newArrayList();
.builder().userName(userName).account(paymentBankName).caseId(caseId).build()).collect(Collectors.toList())); for (String paymentBankName : paymentBankNames) {
userAccountList.add(UserAccountEntity.builder()
.userName(userName)
.account(paymentBankName)
.caseId(caseId)
.build());
}
userAccountService.saveUserBatch(userAccountList);
} }
} }
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<mapper namespace="com.platform.mapper.UserAccountMapper"> <mapper namespace="com.platform.mapper.UserAccountMapper">
<insert id="saveUserBatch"> <insert id="saveUserBatch">
insert IGNORE into user_account (user_name, account) values insert IGNORE into user_account (user_name, account, case_id) values
<foreach item="item" collection="userAccountList" separator=","> <foreach item="item" collection="userAccountList" separator=",">
(#{item.userName}, #{item.account}) (#{item.userName}, #{item.account}, #{item.caseId})
</foreach> </foreach>
</insert> </insert>
</mapper> </mapper>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment