|
@@ -112,7 +112,7 @@ public class FormulaDaoImpl implements IFormulaDao {
|
|
|
@Override
|
|
|
public Function<Long, List<StartPayForm>> getStayPayFormFc() {
|
|
|
return contractId->{
|
|
|
- String sql="select a.meter_money meterMoney ,b.id meterPeriodId,b.sort periodSort from s_start_pay_meter_form a join s_meter_period b on a.meter_period_id =b.id where a.is_deleted =0 and a.contract_id="+contractId;
|
|
|
+ String sql="select (SELECT GROUP_CONCAT(file_name SEPARATOR ',') FROM s_attachment_form WHERE master_id =a.id) file_name, a.meter_money meterMoney ,b.id meterPeriodId,b.sort periodSort from s_start_pay_meter_form a join s_meter_period b on a.meter_period_id =b.id where a.is_deleted =0 and a.contract_id="+contractId;
|
|
|
return getEntityList(sql,StartPayForm.class);
|
|
|
};
|
|
|
}
|
|
@@ -121,7 +121,7 @@ public class FormulaDaoImpl implements IFormulaDao {
|
|
|
@Override
|
|
|
public Function<Long, MeterPeriodInfo> getInterimMeterPeriodFc() {
|
|
|
return certificateId->{
|
|
|
- String sql="select a.id, a.period_number periodNumber,a.sort ,b.print_date formPrintDate ,b.pay_money curTotal from s_contract_meter_period a join s_interim_pay_certificate b on a.id=b.contract_period_id where a.is_deleted=0 and b.id="+certificateId;
|
|
|
+ String sql="select a.id, a.period_number periodNumber,a.start_date,b.end_date,a.sort ,b.print_date formPrintDate ,b.pay_money curTotal from s_contract_meter_period a join s_interim_pay_certificate b on a.id=b.contract_period_id where a.is_deleted=0 and b.id="+certificateId;
|
|
|
return this.jdbcTemplate.queryForObject(sql,new BeanPropertyRowMapper<>(MeterPeriodInfo.class));
|
|
|
};
|
|
|
}
|
|
@@ -129,7 +129,7 @@ public class FormulaDaoImpl implements IFormulaDao {
|
|
|
@Override
|
|
|
public Function<Long, List<MeterPeriodInfo>> getInterimMeterPeriodAllFc() {
|
|
|
return contractId->{
|
|
|
- String sql="select a.id,a.pay_number, a.period_number periodNumber,a.sort ,b.print_date formPrintDate ,b.pay_money curTotal,b.id reportId,b.start_date,b.end_date from s_contract_meter_period a join s_interim_pay_certificate b on a.id=b.contract_period_id where a.is_deleted=0 and b.is_deleted=0 and b.contract_id="+contractId+" order by a.sort";
|
|
|
+ String sql="select a.id,a.pay_number,a.start_date,b.end_date, a.period_number periodNumber,a.sort ,b.print_date formPrintDate ,b.pay_money curTotal,b.id reportId,b.start_date,b.end_date from s_contract_meter_period a join s_interim_pay_certificate b on a.id=b.contract_period_id where a.is_deleted=0 and b.is_deleted=0 and b.contract_id="+contractId+" order by a.sort";
|
|
|
return getEntityList(sql,MeterPeriodInfo.class);
|
|
|
};
|
|
|
}
|