Commit 601bacca by lzxry

bugfix

parent c120c07a
......@@ -147,4 +147,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value = "select * from contract where contract_code = ?1 and status != 'del'", nativeQuery = true)
Contract findByCodeAndNotDel(String contractCode);
@Query(value = "select * from contract where relation_code = ?1 and status != 'del'", nativeQuery = true)
List<Contract> findByRelationCode(String contractCode);
}
......@@ -535,10 +535,21 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
//if(contract==null){
List<Contract> contractList = contractRepository.findByCreateTimeAndCodeNotOwn(groupContract.getRelationCode(), DateUtil.format(groupContract.getCreateTime(), DateUtil.C_TIME_PATTON_DEFAULT), groupContract.getId());
for (Contract contract1 : contractList) {
if(StringUtils.isEmpty(map.get(contract1.getContractCode()))){
map.put(contract1.getContractCode(), contract1);
}
}
groupContracts = map.values();//只要不加入传进来的那个list里面就不会影响查询的列表
break;
}else if((groupContracts.size()==1&&!StringUtils.isEmpty(groupContract.getNextSignedDate()))||(!"2".equals(groupContract.getContractType()) && map.get(groupContract.getNextSignedContractCode())==null)){
List<Contract> contractList = contractRepository.findByRelationCode(groupContract.getContractCode());
for (Contract contract1 : contractList) {
if(StringUtils.isEmpty(map.get(contract1.getContractCode()))){
map.put(contract1.getContractCode(), contract1);
}
}
groupContracts = map.values();
break;
}
}
......
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