Commit aada9b27 by lzxry

单价

parent 76c1e08d
......@@ -136,7 +136,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value = "SELECT relation_contract FROM contract where contract_type=2 and status!='del'", nativeQuery = true)
List<Long> findRelationContractBySideAgre();
@Query(value = "SELECT * from contract where (contract_code = ?1 or relation_code = ?1) and create_time <= ?2 and id<> ?3 and contract_type <> '1'", nativeQuery = true)
@Query(value = "SELECT * from contract where contract_code = ?1 UNION SELECT * from contract where relation_code = ?1 and create_time <= ?2 and id<> ?3 and contract_type = '2'", nativeQuery = true)
List<Contract> findByCreateTimeAndCodeNotOwn(String contractCode, String createTime,Long id);
@Query(value = "select * from contract where next_signed_contract_code=?1 limit 1 ",nativeQuery = true)
......
......@@ -205,7 +205,13 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
if(!StringUtil.isEmpty(v.getEmail())){
multimap.put(v.getEmail(),v);
}else{
v.setUnitPrice(0.0);
if(v.getPriceLevel()== Constant.tkioPriceLevelNotLimit){
int contractAllDay = getDayRange(new DateTime(v.getStartDate()), new DateTime(v.getEndDate())) + 1;//合同总天数
v.setUnitPrice(new BigDecimal(v.getMoney()/1.06/contractAllDay).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}else{
v.setUnitPrice(new BigDecimal(v.getMoney() / 1.06 /v.getTrackFlow())
.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}
v.setClickFlow(0.0);
v.setAdjustmentFund(0L);
if(checkTwoTime(new DateTime(v.getEndDate()),end)||checkTwoTime(start,new DateTime(v.getEndDate()))){
......
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