|
@@ -13,6 +13,7 @@ import org.springblade.manager.service.IContractInfoService;
|
|
|
import org.springblade.manager.service.IFormulaDao;
|
|
|
import org.springblade.manager.service.IProjectInfoService;
|
|
|
import org.springblade.manager.vo.*;
|
|
|
+import org.springblade.meter.entity.ChangeTokenForm;
|
|
|
import org.springblade.meter.entity.MeterContractInfo;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
@@ -120,7 +121,7 @@ public class FormulaDaoImpl implements IFormulaDao {
|
|
|
@Override
|
|
|
public Function<Long, List<MeterPeriodInfo>> getInterimMeterPeriodAllFc() {
|
|
|
return contractId->{
|
|
|
- String sql="select a.id, a.period_number periodNumber,a.sort ,b.print_date formPrintDate ,b.pay_money curTotal,b.id reportId 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.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);
|
|
|
};
|
|
|
}
|
|
@@ -172,6 +173,24 @@ public class FormulaDaoImpl implements IFormulaDao {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Function<Long, List<ChangeTokenForm>> getChangeTokenFormFc() {
|
|
|
+ return contractId->{
|
|
|
+ String sql="select id,change_number,business_date,change_money,change_approval_date from s_change_token_form where is_deleted=0 and approve_status = 2 and contract_id ="+contractId;
|
|
|
+ return getEntityList(sql,ChangeTokenForm.class);
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Function<Long, List<ChangeToken>> getChangeTokenFc() {
|
|
|
+ return contractId->{
|
|
|
+ String sql="SELECT sctf.change_number, sctf.business_date, sctf.change_money as total_change_money, sctf.change_approval_date, scti.id, scti.change_token_id, scti.form_number, scti.change_money FROM s_change_token_form sctf " +
|
|
|
+ "INNER JOIN s_change_token_inventory scti ON sctf.id = scti.change_token_id WHERE sctf.is_deleted = 0 AND sctf.approve_status = 2 AND scti.is_deleted = 0 AND sctf.contract_id = "+contractId + " order by scti.change_token_id";
|
|
|
+ return getEntityList(sql,ChangeToken.class);
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
public <T> List<T> getEntityList(String sql, Class<T> entityClass) {
|
|
|
return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(entityClass));
|
|
|
}
|