dff1be60 康伟

kangwei:采购统计模块,修改时间查询条件

1 个父辈 15f94f5b
......@@ -36,10 +36,10 @@ public class PurchaseAnalysisController {
startDate = year+"-01-01";
endDate = year+"-12-31";
String drugStorage = getJdbcTemplate().queryForObject("select round(ifnull(sum(material_num),0),2) from erp_material_in where audit_status = '3' and arrive_time >='"+startDate+"' and arrive_time <= '"+endDate+"'",String.class);
String purchaseMoney = getJdbcTemplate().queryForObject("select round(ifnull(sum(purchase_money),0),2) from erp_purchase_contract where use_flag = 0 and status = 3 and project_time >='"+startDate+"' and project_time <= '"+endDate+"'",String.class);
String distributMoney = getJdbcTemplate().queryForObject("select round(ifnull(sum(distribut_money),0),2) from erp_distribut_contract where purchase_time >='"+startDate+"' and purchase_time <= '"+endDate+"' ",String.class);
String supplierMoneyByJs = getJdbcTemplate().queryForObject("select round(ifnull(sum(t.total_price_tax),0),2) from erp_settlement t where t.settlement_type = '0' and settlement_time >='"+startDate+"' and settlement_time<='"+endDate+"' ",String.class);
String waterDepartMoneyByJs = getJdbcTemplate().queryForObject("select round(ifnull(sum(t.total_price_tax),0),2) from erp_settlement t where t.settlement_type = '1' and settlement_time >='"+startDate+"' and settlement_time<='"+endDate+"' ",String.class);
String purchaseMoney = getJdbcTemplate().queryForObject("select round(ifnull(sum(purchase_money),0),2) from erp_purchase_contract where use_flag = 0 and status = 3 and start_time >='"+startDate+"' and end_time <= '"+endDate+"'",String.class);
String distributMoney = getJdbcTemplate().queryForObject("select round(ifnull(sum(distribut_money),0),2) from erp_distribut_contract where start_time >='"+startDate+"' and end_time <= '"+endDate+"' ",String.class);
String supplierMoneyByJs = getJdbcTemplate().queryForObject("select round(ifnull(sum(t.total_price_tax),0),2) from erp_settlement t where t.settlement_type = '0' and apply_time >='"+startDate+"' and apply_time<='"+endDate+"' ",String.class);
String waterDepartMoneyByJs = getJdbcTemplate().queryForObject("select round(ifnull(sum(t.total_price_tax),0),2) from erp_settlement t where t.settlement_type = '1' and apply_time >='"+startDate+"' and apply_time<='"+endDate+"' ",String.class);
PurchaseAnalysisVO purchaseAnalysisVO = new PurchaseAnalysisVO( drugStorage, purchaseMoney, distributMoney, supplierMoneyByJs, waterDepartMoneyByJs);
result.setSuccess(true);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!