Commit 909f46b8 by kangxiaoshan

导出格式换为EXCLE

parent 6f13b952
...@@ -155,7 +155,7 @@ public class ContractController { ...@@ -155,7 +155,7 @@ public class ContractController {
rowBody.createCell(6).setCellValue(contract.getSaleName()); rowBody.createCell(6).setCellValue(contract.getSaleName());
rowBody.createCell(7).setCellValue(contract.getStartDate()); rowBody.createCell(7).setCellValue(contract.getStartDate());
rowBody.createCell(8).setCellValue(contract.getEndDate()); rowBody.createCell(8).setCellValue(contract.getEndDate());
rowBody.createCell(9).setCellValue(contract.getPriceLevel()); rowBody.createCell(9).setCellValue(contract.getPriceLevelName());
rowBody.createCell(10).setCellValue(contract.getMoney()); rowBody.createCell(10).setCellValue(contract.getMoney());
rowBody.createCell(11).setCellValue(CONTRACT_STATUS.get(contract.getContractType())); rowBody.createCell(11).setCellValue(CONTRACT_STATUS.get(contract.getContractType()));
rowBody.createCell(12).setCellValue(CONTRACT_STATUS.get(contract.getStatus())); rowBody.createCell(12).setCellValue(CONTRACT_STATUS.get(contract.getStatus()));
......
...@@ -99,22 +99,22 @@ public interface ContractRepository extends JpaRepository<Contract, Long> { ...@@ -99,22 +99,22 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value = "select contract_code,my_body_code,sale,platform from contract where contract_code in ?1", nativeQuery = true) @Query(value = "select contract_code,my_body_code,sale,platform from contract where contract_code in ?1", nativeQuery = true)
List<Object[]> findByContractCode(List<String> codesList); List<Object[]> findByContractCode(List<String> codesList);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and status!='del' ", nativeQuery = true) @Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and status!='del' and share_sign <> 0 ", nativeQuery = true)
List<Contract> findShareContranctByDate3(String startDate, String endDate, String platform); List<Contract> findShareContranctByDate3(String startDate, String endDate, String platform);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code = ?4 and status!='del' ", nativeQuery = true) @Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code = ?4 and status!='del' and share_sign <> 0 ", nativeQuery = true)
List<Contract> findShareContranctByDate2(String startDate, String endDate, String platform, String bodyCode); List<Contract> findShareContranctByDate2(String startDate, String endDate, String platform, String bodyCode);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and (my_body_name like %?4% or customer_body like %?4% or contract_code like %?4%) and status!='del' ", nativeQuery = true) @Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and (my_body_name like %?4% or customer_body like %?4% or contract_code like %?4%) and status!='del' and share_sign <> 0 ", nativeQuery = true)
List<Contract> findShareContranctByDateSerche(String startDate, String endDate, String platform, String serchName); List<Contract> findShareContranctByDateSerche(String startDate, String endDate, String platform, String serchName);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code = ?4 and (my_body_name like %?5% or customer_body like %?5% or contract_code like %?5%) and status!='del' ", nativeQuery = true) @Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code = ?4 and (my_body_name like %?5% or customer_body like %?5% or contract_code like %?5%) and status!='del' and share_sign <> 0 ", nativeQuery = true)
List<Contract> findShareContranctByDate1(String startDate, String endDate, String platform, String bodyCode, String serchName); List<Contract> findShareContranctByDate1(String startDate, String endDate, String platform, String bodyCode, String serchName);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and (my_body_name like %?4% or customer_body like %?4% or contract_code like %?5%) and my_body_code in ?5 and status!='del' ", nativeQuery = true) @Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and (my_body_name like %?4% or customer_body like %?4% or contract_code like %?5%) and my_body_code in ?5 and status!='del' and share_sign <> 0 ", nativeQuery = true)
List<Contract> findShareContranctByDateSercheFinace(String startDate, String endDate, String platform, String serchName, List<String> financeBodies); List<Contract> findShareContranctByDateSercheFinace(String startDate, String endDate, String platform, String serchName, List<String> financeBodies);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code in ?4 and status!='del' ", nativeQuery = true) @Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform=?3 and my_body_code in ?4 and status!='del' and share_sign <> 0 ", nativeQuery = true)
List<Contract> findShareContranctByDateFinace(String startDate, String endDate, String platform, List<String> financeBodies); List<Contract> findShareContranctByDateFinace(String startDate, String endDate, String platform, List<String> financeBodies);
@Query(value = "select contract_code from contract where customer_body =?1 and contract_code <> ?2 and status in ('backfirst','normal','late') limit 3 ", nativeQuery = true) @Query(value = "select contract_code from contract where customer_body =?1 and contract_code <> ?2 and status in ('backfirst','normal','late') limit 3 ", nativeQuery = true)
......
...@@ -529,7 +529,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -529,7 +529,7 @@ public class ContractServiceImpl implements ContractService {
// } // }
this.calculateShareIncome(resource);//判断是否计算调整金 //this.calculateShareIncome(resource);//判断是否计算调整金
resource = contractRepository.save(resource); resource = contractRepository.save(resource);
...@@ -829,7 +829,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -829,7 +829,7 @@ public class ContractServiceImpl implements ContractService {
resource.setStatus(contract.getStatus()); resource.setStatus(contract.getStatus());
this.calculateShareIncome(resource); //this.calculateShareIncome(resource);
resource.setId(contract.getId()); resource.setId(contract.getId());
......
...@@ -95,11 +95,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -95,11 +95,6 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
for (Contract contract : contracts) { for (Contract contract : contracts) {
if (contract.getShareSign() != null && contract.getShareSign().intValue() == 0) {
//不参与分摊计算
continue;
}
// this.caculateShareIncome(contract, start, end); // this.caculateShareIncome(contract, start, end);
this.shareIncome4Contract(contract, start, end); this.shareIncome4Contract(contract, start, end);
contract.setMyBodyName(bodiesNameMap.get(contract.getMyBodyCode())); contract.setMyBodyName(bodiesNameMap.get(contract.getMyBodyCode()));
......
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