|
@@ -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;
|
|
@@ -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;
|
|
|
+ return getEntityList(sql,ChangeToken.class);
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
public <T> List<T> getEntityList(String sql, Class<T> entityClass) {
|
|
|
return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(entityClass));
|
|
|
}
|