Commit df6466ba authored by wujipeng's avatar wujipeng
Browse files

优化

parent 34bea269
...@@ -49,8 +49,18 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem ...@@ -49,8 +49,18 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
//查看案件所有的excelData //查看案件所有的excelData
List<ExcelDataVO> excelDataEntityList = excelDataService.queryByCaseId(caseDTO); List<ExcelDataVO> excelDataEntityList = excelDataService.queryByCaseId(caseDTO);
//过滤掉payeeName和payUserName一样的数据
List<ExcelDataVO> excelDataEntityList1 = Lists.newArrayList();
for (ExcelDataVO excelDataVO : excelDataEntityList) {
if (StringUtils.isNotEmpty(excelDataVO.getPayUserName())
&& StringUtils.isNotEmpty(excelDataVO.getPayeeName())
&& excelDataVO.getPayUserName().equals(excelDataVO.getPayeeName())) {
}else {
excelDataEntityList1.add(excelDataVO);
}
}
excelDataEntityList.forEach(excelDataEntity -> { excelDataEntityList1.forEach(excelDataEntity -> {
if (StringUtils.isNull(excelDataEntity.getPayUserName())) { if (StringUtils.isNull(excelDataEntity.getPayUserName())) {
excelDataEntity.setPayUserName("无对应人员的数据"); excelDataEntity.setPayUserName("无对应人员的数据");
} }
...@@ -59,7 +69,7 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem ...@@ -59,7 +69,7 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
// 调用分组方法 // 调用分组方法
userList.forEach(userName -> groupedMap.put(userName, Lists.newArrayList())); userList.forEach(userName -> groupedMap.put(userName, Lists.newArrayList()));
groupByPayUserName(groupedMap, excelDataEntityList); groupByPayUserName(groupedMap, excelDataEntityList1);
//初始化集合 //初始化集合
List<CaseVO> caseVOList = Lists.newArrayList(); List<CaseVO> caseVOList = Lists.newArrayList();
//遍历groupedMap //遍历groupedMap
......
...@@ -203,9 +203,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme ...@@ -203,9 +203,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserEntity> impleme
userDTO.setIdCard(idCardInfo.get("idCard")); userDTO.setIdCard(idCardInfo.get("idCard"));
userDTO.setUserName(userDTO.getUserName() + idCardInfo.get("idCard")); userDTO.setUserName(userDTO.getUserName() + idCardInfo.get("idCard"));
userDTO.setIdType("身份证"); userDTO.setIdType("身份证");
excelDataEntity.setPayUserName(userDTO.getUserName() + idCardInfo.get("idCard")); excelDataEntity.setPayUserName(userDTO.getUserName());
excelDataEntity.setPayeeName(userDTO.getUserName());
} else { } else {
excelDataEntity.setPayUserName(userDTO.getUserName()); excelDataEntity.setPayUserName(userDTO.getUserName());
excelDataEntity.setPayeeName(userDTO.getUserName());
} }
excelDataEntity.setCaseId(userDTO.getCaseId()); excelDataEntity.setCaseId(userDTO.getCaseId());
//添加节点数据 //添加节点数据
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
ed.user_flag, ed.user_flag,
fu.file_name, fu.file_name,
fu.path filePath, fu.path filePath,
ed.file_id ed.file_id,
ed.payee_name
from from
excel_data ed excel_data ed
left join left join
...@@ -47,8 +48,11 @@ ...@@ -47,8 +48,11 @@
user_flag = 1 user_flag = 1
and and
case_id = #{id} case_id = #{id}
<if test="startTime != null and endTime != null"> <if test="startTime != null">
and time BETWEEN #{startTime} and #{endTime} and time >= #{startTime}
</if>
<if test="endTime != null">
and time &lt;= #{endTime}
</if> </if>
group by pay_user_name,payee_name group by pay_user_name,payee_name
</select> </select>
...@@ -196,18 +200,27 @@ ...@@ -196,18 +200,27 @@
ed.user_flag = 1 ed.user_flag = 1
and and
ed.case_id = #{id} ed.case_id = #{id}
<if test="startTime != null and endTime != ''"> <if test="startTime != null">
and ed.time BETWEEN #{startTime} and #{endTime} and ed.time >= #{startTime}
</if> </if>
<if test="minAmount != null and maxAmount != ''"> <if test="endTime != null">
and ed.amount BETWEEN #{minAmount} and #{maxAmount} and ed.time &lt;= #{endTime}
</if> </if>
<if test="nodeName != null and nodeName != ''"> <if test="minAmount != null and minAmount != ''">
and (ed.pay_user_name like concat('%',#{nodeName},'%') or payee_bank_card like concat('%',#{nodeName},'%') or u.id_type = #{nodeName}) and ed.amount >= #{minAmount}
</if>
<if test="maxAmount != null and maxAmount != ''">
and ed.amount &lt;= #{maxAmount}
</if> </if>
<if test="label != null and label != ''"> <if test="label != null and label != ''">
and u.label like concat('%',#{label},'%') and u.label like concat('%',#{label},'%')
</if> </if>
<if test="nodeName != null and nodeName != ''">
and (ed.pay_user_name like concat('%',#{nodeName},'%')
or ed.payee_name like concat('%',#{nodeName},'%')
or payee_bank_card like concat('%',#{nodeName},'%')
or u.id_type = #{nodeName})
</if>
group by ed.id group by ed.id
</select> </select>
<select id="queryAccountTemporary" resultType="com.platform.model.vo.AssociationVO"> <select id="queryAccountTemporary" resultType="com.platform.model.vo.AssociationVO">
......
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