12d66bdb 康伟

kangwei:运营季报,格式化数值

         药剂入库选择药剂:添加规格:如果统购合同失效,不显示对应的物料信息
1 个父辈 549362dd
...@@ -62,8 +62,6 @@ public class AlarmCustomRecordHistoryController { ...@@ -62,8 +62,6 @@ public class AlarmCustomRecordHistoryController {
62 @Autowired 62 @Autowired
63 private AlarmCustomRecordHistoryService alarmCustomRecordHistoryService; 63 private AlarmCustomRecordHistoryService alarmCustomRecordHistoryService;
64 @Autowired 64 @Autowired
65 private ISysDepartService sysDepartService;
66 @Autowired
67 private RealTimeAlarmJob xtRealTimeAlarmJob; 65 private RealTimeAlarmJob xtRealTimeAlarmJob;
68 /** 66 /**
69 * <pre> 67 * <pre>
......
...@@ -93,11 +93,11 @@ public class AjhWasteSolidTransportController { ...@@ -93,11 +93,11 @@ public class AjhWasteSolidTransportController {
93 }*/ 93 }*/
94 String startDate = req.getParameter("startDate"); 94 String startDate = req.getParameter("startDate");
95 if(StringUtils.isNotEmpty(startDate)){ 95 if(StringUtils.isNotEmpty(startDate)){
96 queryWrapper.ge("create_time",startDate+" 00:00:00"); 96 queryWrapper.ge("transport_time",startDate+" 00:00:00");
97 } 97 }
98 String endDate = req.getParameter("endDate"); 98 String endDate = req.getParameter("endDate");
99 if(StringUtils.isNotEmpty(startDate)){ 99 if(StringUtils.isNotEmpty(startDate)){
100 queryWrapper.le("create_time",endDate+" 23:59:59"); 100 queryWrapper.le("transport_time",endDate+" 23:59:59");
101 } 101 }
102 IPage<AjhWasteSolidTransport> pageList = ajhWasteSolidTransportService.page(page, queryWrapper); 102 IPage<AjhWasteSolidTransport> pageList = ajhWasteSolidTransportService.page(page, queryWrapper);
103 result.setSuccess(true); 103 result.setSuccess(true);
......
...@@ -58,6 +58,7 @@ public class AjhWasteSolidContract { ...@@ -58,6 +58,7 @@ public class AjhWasteSolidContract {
58 /**合同状态:生效、失效*/ 58 /**合同状态:生效、失效*/
59 @Excel(name = "合同状态:生效、失效", width = 15) 59 @Excel(name = "合同状态:生效、失效", width = 15)
60 @ApiModelProperty(value = "合同状态:生效、失效") 60 @ApiModelProperty(value = "合同状态:生效、失效")
61 @Dict(dicCode = "contract_status")
61 private String contractStatus; 62 private String contractStatus;
62 /**联系人*/ 63 /**联系人*/
63 @Excel(name = "联系人", width = 15) 64 @Excel(name = "联系人", width = 15)
......
...@@ -170,8 +170,8 @@ ...@@ -170,8 +170,8 @@
170 select ri.rec_ord_body,count(*) count 170 select ri.rec_ord_body,count(*) count
171 from ajh_rectification_info ri 171 from ajh_rectification_info ri
172 where rec_ord_report_date between #{startDate} and #{endDate} 172 where rec_ord_report_date between #{startDate} and #{endDate}
173 group by ri.rec_ord_body 173 group by ri.rec_ord_body
174 ) t 174 ) t
175 right join sys_struct_dict dic on t.rec_ord_body = dic.id 175 right join sys_struct_dict dic on t.rec_ord_body = dic.id
176 where 1=1 176 where 1=1
177 <if test="departId!=null and departId!=''"> 177 <if test="departId!=null and departId!=''">
......
...@@ -244,32 +244,6 @@ public class SysCommandCentreController { ...@@ -244,32 +244,6 @@ public class SysCommandCentreController {
244 return result; 244 return result;
245 } 245 }
246 246
247 /***
248 * 整理数据: 月统计数据、日统计数据,添加去年月数据、日数据、年数据
249 * @param currenteportItemv
250 * @param lastMonthReportItemv
251 * @param lastYearReportItemv
252 * @return
253 */
254 private List<FRportlCommandCenterVO> arrangeFRportlCommandCenterVO(FReportItemv currenteportItemv, FReportItemv lastMonthReportItemv ,FReportItemv lastYearReportItemv ){
255 List<FRportlCommandCenterVO> commandCenterVOList = new ArrayList<FRportlCommandCenterVO>();
256 FRportlCommandCenterVO monthData = new FRportlCommandCenterVO();//当月数据
257 FRportlCommandCenterVO dayData = new FRportlCommandCenterVO();//日数据
258 //FRportlCommandCenterVO yearData = new FRportlCommandCenterVO();//年数据
259
260 monthData.setValue( DigitalUtils.division(currenteportItemv.getSumValue() ,"10000") );
261 monthData.setValueHb( DigitalUtils.division( lastMonthReportItemv.getSumValue(),"10000"));//上月同期;
262 monthData.setValueTb( DigitalUtils.division( lastYearReportItemv.getSumValue(),"10000") );//去年同期
263
264 dayData.setValue( DigitalUtils.division( currenteportItemv.getAvgValue(),"10000"));
265 dayData.setValueHb( DigitalUtils.division( lastMonthReportItemv.getAvgValue(),"10000"));//上月同期;
266 dayData.setValueTb( DigitalUtils.division( lastYearReportItemv.getAvgValue(),"10000") );//去年同期
267 //dayData.setValue(currenteportItemv.getAvgValue());lastMonthReportItemv.getAvgValue(); lastYearReportItemv.getAvgValue();
268 // yearData.setValue();yearData.setValueHb(); yearData.setValueTb();
269 commandCenterVOList.add( monthData ) ;
270 commandCenterVOList.add( dayData );
271 return commandCenterVOList;
272 }
273 247
274 @AutoLog(value = "指挥中心-费用趋势") 248 @AutoLog(value = "指挥中心-费用趋势")
275 @ApiOperation(value="指挥中心-费用趋势", notes="指挥中心-费用趋势") 249 @ApiOperation(value="指挥中心-费用趋势", notes="指挥中心-费用趋势")
......
...@@ -2,20 +2,13 @@ package com.skua.modules.erp.controller; ...@@ -2,20 +2,13 @@ package com.skua.modules.erp.controller;
2 2
3 import java.util.Arrays; 3 import java.util.Arrays;
4 import java.util.List; 4 import java.util.List;
5 import java.util.Map; 5
6 import java.io.IOException;
7 import java.io.UnsupportedEncodingException;
8 import java.net.URLDecoder;
9 import javax.servlet.http.HttpServletRequest; 6 import javax.servlet.http.HttpServletRequest;
10 import javax.servlet.http.HttpServletResponse;
11 import com.skua.core.api.vo.Result; 7 import com.skua.core.api.vo.Result;
12 import com.skua.core.aspect.annotation.AutoLog; 8 import com.skua.core.aspect.annotation.AutoLog;
13 import com.skua.core.context.BaseContextHandler; 9 import com.skua.core.context.BaseContextHandler;
14 import com.skua.core.query.QueryGenerator; 10 import com.skua.core.query.QueryGenerator;
15 import com.skua.core.service.ISequenceService;
16 import com.skua.core.util.ConvertUtils;
17 import com.skua.modules.erp.entity.DistributContract; 11 import com.skua.modules.erp.entity.DistributContract;
18 import com.skua.modules.erp.entity.DistributMaterial;
19 import com.skua.modules.erp.entity.ERPPurchaseContract; 12 import com.skua.modules.erp.entity.ERPPurchaseContract;
20 import com.skua.modules.erp.entity.PurchaseMaterial; 13 import com.skua.modules.erp.entity.PurchaseMaterial;
21 import com.skua.modules.erp.service.IDistributContractService; 14 import com.skua.modules.erp.service.IDistributContractService;
...@@ -26,23 +19,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -26,23 +19,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
26 import com.skua.modules.erp.service.IDistributMaterialService; 19 import com.skua.modules.erp.service.IDistributMaterialService;
27 import com.skua.modules.erp.service.IPurchaseMaterialService; 20 import com.skua.modules.erp.service.IPurchaseMaterialService;
28 import com.skua.modules.erp.vo.DistributContractVO; 21 import com.skua.modules.erp.vo.DistributContractVO;
29 import com.skua.modules.erp.vo.PurchaseContractVO; 22 import com.skua.modules.erp.vo.MaterialSearchVO;
30 import com.skua.modules.guest.util.DateUtil; 23 import com.skua.modules.guest.util.DateUtil;
31 import lombok.extern.slf4j.Slf4j; 24 import lombok.extern.slf4j.Slf4j;
32
33 import org.apache.commons.lang3.StringUtils; 25 import org.apache.commons.lang3.StringUtils;
34 import org.jeecgframework.poi.excel.ExcelImportUtil;
35 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
36 import org.jeecgframework.poi.excel.entity.ExportParams;
37 import org.jeecgframework.poi.excel.entity.ImportParams;
38 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
39
40 import org.springframework.beans.factory.annotation.Autowired; 26 import org.springframework.beans.factory.annotation.Autowired;
41 import org.springframework.web.bind.annotation.*; 27 import org.springframework.web.bind.annotation.*;
42 import org.springframework.web.multipart.MultipartFile;
43 import org.springframework.web.multipart.MultipartHttpServletRequest;
44 import org.springframework.web.servlet.ModelAndView;
45 import com.alibaba.fastjson.JSON;
46 import io.swagger.annotations.Api; 28 import io.swagger.annotations.Api;
47 import io.swagger.annotations.ApiOperation; 29 import io.swagger.annotations.ApiOperation;
48 30
...@@ -242,13 +224,13 @@ public class DistributContractController { ...@@ -242,13 +224,13 @@ public class DistributContractController {
242 @ApiOperation(value="erp分销合同-采购物料列表", notes="erp分销合同-采购物料列表") 224 @ApiOperation(value="erp分销合同-采购物料列表", notes="erp分销合同-采购物料列表")
243 @GetMapping(value = "/purchaseMaterialList") 225 @GetMapping(value = "/purchaseMaterialList")
244 public Result<IPage<PurchaseMaterial>> queryPageByPurchaseMaterialList( 226 public Result<IPage<PurchaseMaterial>> queryPageByPurchaseMaterialList(
245 @RequestParam(name="goodCode") String goodCode, 227 MaterialSearchVO materialSearchVO,
246 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 228 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
247 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, 229 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
248 HttpServletRequest req) { 230 HttpServletRequest req) {
249 Result<IPage<PurchaseMaterial>> result = new Result<IPage<PurchaseMaterial>>(); 231 Result<IPage<PurchaseMaterial>> result = new Result<IPage<PurchaseMaterial>>();
250 Page<PurchaseMaterial> page = new Page<>(pageNo, pageSize); 232 Page<PurchaseMaterial> page = new Page<>(pageNo, pageSize);
251 IPage<PurchaseMaterial> pageList = purchaseMaterialService.queryByPage(page,goodCode,BaseContextHandler.getRealDepartId()); 233 IPage<PurchaseMaterial> pageList = purchaseMaterialService.queryByPage(page,materialSearchVO.getGoodCode(),BaseContextHandler.getRealDepartId());
252 result.setSuccess(true); 234 result.setSuccess(true);
253 result.setResult(pageList); 235 result.setResult(pageList);
254 return result; 236 return result;
...@@ -258,9 +240,9 @@ public class DistributContractController { ...@@ -258,9 +240,9 @@ public class DistributContractController {
258 @AutoLog(value = "erp分销合同-根据货号查询采购合同物料清单") 240 @AutoLog(value = "erp分销合同-根据货号查询采购合同物料清单")
259 @ApiOperation(value="erp分销合同-根据货号查询采购合同物料清单", notes="erp分销合同-根据货号查询采购合同物料清单") 241 @ApiOperation(value="erp分销合同-根据货号查询采购合同物料清单", notes="erp分销合同-根据货号查询采购合同物料清单")
260 @GetMapping(value = "/queryMaterialByGoodCode") 242 @GetMapping(value = "/queryMaterialByGoodCode")
261 public Result<PurchaseMaterial> queryMaterialByGoodCode(@RequestParam(name="goodCode") String goodCode,@RequestParam(name="departId") String departId) { 243 public Result<PurchaseMaterial> queryMaterialByGoodCode(MaterialSearchVO materialSearchVO) {
262 Result<PurchaseMaterial> result = new Result<PurchaseMaterial>(); 244 Result<PurchaseMaterial> result = new Result<PurchaseMaterial>();
263 List<PurchaseMaterial> purchaseMaterialList = purchaseMaterialService.queryMaterialByGoodCode(goodCode,departId); 245 List<PurchaseMaterial> purchaseMaterialList = purchaseMaterialService.queryMaterialByGoodCode(materialSearchVO.getGoodCode(),materialSearchVO.getDepartId());
264 246
265 if(purchaseMaterialList != null && !purchaseMaterialList.isEmpty()){ 247 if(purchaseMaterialList != null && !purchaseMaterialList.isEmpty()){
266 result.setSuccess(true); 248 result.setSuccess(true);
......
...@@ -55,17 +55,16 @@ ...@@ -55,17 +55,16 @@
55 </select> 55 </select>
56 <!-- 药剂入库查询结果:物料清单--> 56 <!-- 药剂入库查询结果:物料清单-->
57 <select id="queryPurchaseMaterialListByIn" resultType="com.skua.modules.erp.vo.PurchaseMaterialVO"> 57 <select id="queryPurchaseMaterialListByIn" resultType="com.skua.modules.erp.vo.PurchaseMaterialVO">
58 select pc.id 'purchase_contract_id', pc.contract_code 'purchase_contract_code' , st.item_text as 'sparepart_type_name', 58 select dc.contract_code 'distribut_contract_code', st.item_text as 'sparepart_type_name', aaa.* from
59 (select sum(mi.material_num) from erp_material_in mi where mi.audit_status = 3 and mi.good_code = aaa.good_code) 'storeNum',aaa.* 59 (select pc.start_time ,pc.end_time , dm.distribut_price ,dm.distribut_total_price,dm.material_num ,pc.id 'purchase_contract_id', pc.contract_code 'purchase_contract_code' ,dm.contract_id 'distribut_contract_id', pm.*
60 from ( 60 from erp_distribut_material dm , erp_purchase_material pm ,erp_purchase_contract pc
61 select dc.contract_code 'distribut_contract_code', dc.id 'distribut_contract_id', dm.distribut_price ,dm.distribut_total_price,dm.material_num ,pm.* 61 where dm.good_code = pm.good_code and pm.contract_id = pc.id and pc.use_flag = '0' and dm.del_flag = '0' and pm.del_flag = '0' and pc.start_time &lt;= now() and pc.end_time &gt;= now()
62 from erp_distribut_contract dc , erp_distribut_material dm , erp_purchase_material pm 62 and dm.contract_id = #{param.distributContractId }
63 where dc.id = dm.contract_id and dc.id = #{param.distributContractId } and dm.good_code = pm.good_code and pm.del_flag = '0' and dc.use_flag = '0' and dm.del_flag = '0' 63 <if test="param.sparepartCode != null and param.sparepartCode !=''">and pm.sparepart_code =#{param.sparepartCode}</if>
64 <if test="param.sparepartCode != null and param.sparepartCode !=''">and pm.sparepart_code =#{param.sparepartCode}</if> 64 <if test="param.sparepartType != null and param.sparepartType !=''">and pm.sparepart_type in (${param.sparepartType}) </if>
65 <if test="param.sparepartType != null and param.sparepartType !=''">and pm.sparepart_type in (${param.sparepartType}) </if> 65 <if test="param.sparepartName != null and param.sparepartName !=''">and pm.sparepart_name like '%${param.sparepartName}%'</if>
66 <if test="param.sparepartName != null and param.sparepartName !=''">and pm.sparepart_name like '%${param.sparepartName}%'</if> 66 ) aaa
67 )aaa 67 left join erp_distribut_contract dc on dc.id = aaa.distribut_contract_id
68 left join erp_purchase_contract pc on pc.id = aaa.contract_id
69 left join equipment_sparepart_type st on st.id = aaa.sparepart_type 68 left join equipment_sparepart_type st on st.id = aaa.sparepart_type
70 </select> 69 </select>
71 <!-- 根据id或code校验合同编号是否唯一--> 70 <!-- 根据id或code校验合同编号是否唯一-->
......
...@@ -12,7 +12,10 @@ import lombok.experimental.Accessors; ...@@ -12,7 +12,10 @@ import lombok.experimental.Accessors;
12 @Accessors(chain = true) 12 @Accessors(chain = true)
13 @ApiModel(value="Material物料查询对象", description="Material物料查询对象") 13 @ApiModel(value="Material物料查询对象", description="Material物料查询对象")
14 public class MaterialSearchVO { 14 public class MaterialSearchVO {
15 15 @ApiModelProperty(value = "厂站编号")
16 private String departId;
17 @ApiModelProperty(value = "货号")
18 private String goodCode;
16 @ApiModelProperty(value = "采购合同编号") 19 @ApiModelProperty(value = "采购合同编号")
17 private String purchaseContractId; 20 private String purchaseContractId;
18 21
...@@ -31,8 +34,6 @@ public class MaterialSearchVO { ...@@ -31,8 +34,6 @@ public class MaterialSearchVO {
31 @ApiModelProperty(value = "物料类型") 34 @ApiModelProperty(value = "物料类型")
32 private String sparepartType; 35 private String sparepartType;
33 36
34 @ApiModelProperty(value = "所属厂站")
35 private String departId;
36 37
37 @ApiModelProperty(value = "是否药剂") 38 @ApiModelProperty(value = "是否药剂")
38 private boolean medicament = false; 39 private boolean medicament = false;
......
1 package com.skua.modules.erp.vo; 1 package com.skua.modules.erp.vo;
2 2
3 import cn.hutool.core.util.RandomUtil;
4 import com.skua.common.util.ChineseInital;
5 import io.swagger.annotations.ApiModel; 3 import io.swagger.annotations.ApiModel;
6 import io.swagger.annotations.ApiModelProperty; 4 import io.swagger.annotations.ApiModelProperty;
7 import lombok.Data; 5 import lombok.Data;
......
...@@ -60,7 +60,7 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -60,7 +60,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
60 String departId = null; 60 String departId = null;
61 // ysfsl:月收费水量 ; yyf:月药费 ; ysjsl:月实际水量 61 // ysfsl:月收费水量 ; yyf:月药费 ; ysjsl:月实际水量
62 String dataViewName4411 = ReportViewUtil.buildViewLike(ReportConstant.view4411,"ysfsl,ysjsl,yyf", departId, seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime()); 62 String dataViewName4411 = ReportViewUtil.buildViewLike(ReportConstant.view4411,"ysfsl,ysjsl,yyf", departId, seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime());
63 sql = "select sum( aaa.ysfsl ) 'ysfsl' , sum( aaa.ysjsl ) 'ysjsl' , sum(tc.target_water ) 'target_water', sum(tc.target_drug ) 'target_drug' ,round((sum( aaa.ysfsl ) *100 / sum(tc.target_water )),2) as 'completeRatio' from "+dataViewName4411+" aaa"; 63 sql = "select round(sum( aaa.ysfsl ),2) 'ysfsl' , round(sum( aaa.ysjsl ),2) 'ysjsl' , round(sum(tc.target_water ),2) 'target_water', round(sum(tc.target_drug ),2) 'target_drug' ,round((sum( aaa.ysfsl ) *100 / sum(tc.target_water )),2) as 'completeRatio' from "+dataViewName4411+" aaa";
64 sql += " left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year = '"+year+"')"; 64 sql += " left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year = '"+year+"')";
65 List<Map<String, Object>> mapList = getJdbcTemplate().queryForList(sql); 65 List<Map<String, Object>> mapList = getJdbcTemplate().queryForList(sql);
66 productDataVO.setDayNum( DateUtils.differenceDay(seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime()) );//相差天数 66 productDataVO.setDayNum( DateUtils.differenceDay(seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime()) );//相差天数
...@@ -91,7 +91,7 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -91,7 +91,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
91 // 去年水数据:月收费水量、月实际水量 91 // 去年水数据:月收费水量、月实际水量
92 // ysfsl:月收费水量 ; yyf:月药费 ; ysjsl:月实际水量 92 // ysfsl:月收费水量 ; yyf:月药费 ; ysjsl:月实际水量
93 dataViewName4411 = ReportViewUtil.buildViewLike(ReportConstant.view4411,"ysfsl,ysjsl", departId, lastSeasonTimeVO.getStartTime(),lastSeasonTimeVO.getEndTime()); 93 dataViewName4411 = ReportViewUtil.buildViewLike(ReportConstant.view4411,"ysfsl,ysjsl", departId, lastSeasonTimeVO.getStartTime(),lastSeasonTimeVO.getEndTime());
94 sql = "select sum( aaa.ysfsl ) 'ysfsl' , sum( aaa.ysjsl ) 'ysjsl' from "+dataViewName4411+" aaa"; 94 sql = "select round(sum( aaa.ysfsl ),2) 'ysfsl' , round(sum( aaa.ysjsl ),2) 'ysjsl' from "+dataViewName4411+" aaa";
95 95
96 if(mapList != null ){ 96 if(mapList != null ){
97 for(Map<String,Object> map : mapList){ 97 for(Map<String,Object> map : mapList){
...@@ -113,7 +113,7 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -113,7 +113,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
113 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysjsl,tqysjsl,ysjsldyqntqyy", departId, seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime()); 113 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysjsl,tqysjsl,ysjsldyqntqyy", departId, seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime());
114 // sql = "select sum( aaa.ysfsl ) 'ysfsl' , sum( aaa.ysjsl ) 'ysjsl' , sum(tc.target_water ) 'target_water' , sum(tc.target_power) 'target_power' ,round((sum( aaa.ysfsl ) *100 / sum(tc.target_water )),2) as 'completeRatio' from "+dataViewName4411+" aaa"; 114 // sql = "select sum( aaa.ysfsl ) 'ysfsl' , sum( aaa.ysjsl ) 'ysjsl' , sum(tc.target_water ) 'target_water' , sum(tc.target_power) 'target_power' ,round((sum( aaa.ysfsl ) *100 / sum(tc.target_water )),2) as 'completeRatio' from "+dataViewName4411+" aaa";
115 sql = "select round( (aaa.tqysjsl - aaa.ysjsl ) / aaa.tqysjsl ,2 ) 'ratio' , aaa.tqysjsl , aaa.ysjsl , aaa.ysjsldyqntqyy 'causeAnalysis' , d.depart_name from "+dataViewName4411 +" aaa"; 115 sql = "select round( (aaa.tqysjsl - aaa.ysjsl ) / aaa.tqysjsl ,2 ) 'ratio' , aaa.tqysjsl , aaa.ysjsl , aaa.ysjsldyqntqyy 'causeAnalysis' , d.depart_name from "+dataViewName4411 +" aaa";
116 sql += " left join sys_depart d on d.id = aaa.depart_id where aaa.tqysjsl > aaa.ysjsl"; 116 sql += " left join sys_depart d on d.id = aaa.depart_id where aaa.tqysjsl > aaa.ysjsl ";
117 List<FReportWaterMonthDataVO> waterMonthDataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<FReportWaterMonthDataVO>(FReportWaterMonthDataVO.class)); 117 List<FReportWaterMonthDataVO> waterMonthDataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<FReportWaterMonthDataVO>(FReportWaterMonthDataVO.class));
118 productDataVO.setWaterDeptartList(waterMonthDataList); 118 productDataVO.setWaterDeptartList(waterMonthDataList);
119 119
......
1 package com.skua.modules.report.vo; 1 package com.skua.modules.report.vo;
2 2
3 import com.skua.core.util.ConvertUtils; 3 import com.skua.core.util.ConvertUtils;
4 import com.skua.tool.util.JSUtils;
4 import io.swagger.annotations.ApiModel; 5 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty; 6 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data; 7 import lombok.Data;
8 import org.apache.commons.lang3.StringUtils;
7 9
8 import java.util.ArrayList; 10 import java.util.ArrayList;
9 import java.util.List; 11 import java.util.List;
...@@ -30,7 +32,7 @@ public class ProductDataVO { ...@@ -30,7 +32,7 @@ public class ProductDataVO {
30 @ApiModelProperty(value = "收费水量") 32 @ApiModelProperty(value = "收费水量")
31 private String chargeWaterVolume;//收费水量9854.012552万吨 33 private String chargeWaterVolume;//收费水量9854.012552万吨
32 @ApiModelProperty(value = "收费水量-日均值") 34 @ApiModelProperty(value = "收费水量-日均值")
33 private Double avgDayWaterVolume;//平均108.29万吨/天 35 private String avgDayWaterVolume;//平均108.29万吨/天
34 @ApiModelProperty(value = "收费水量-同比增长") 36 @ApiModelProperty(value = "收费水量-同比增长")
35 private Double chargeWaterRatio; 37 private Double chargeWaterRatio;
36 @ApiModelProperty(value = "收费水量-完成率") 38 @ApiModelProperty(value = "收费水量-完成率")
...@@ -43,7 +45,7 @@ public class ProductDataVO { ...@@ -43,7 +45,7 @@ public class ProductDataVO {
43 @ApiModelProperty(value = "实际处理水量") 45 @ApiModelProperty(value = "实际处理水量")
44 private String ysjslWaterVolume; 46 private String ysjslWaterVolume;
45 @ApiModelProperty(value = "实际处理水量-日均值") 47 @ApiModelProperty(value = "实际处理水量-日均值")
46 private Double avgYsjslWaterVolume;//平均99.76万吨/天 48 private String avgYsjslWaterVolume;//平均99.76万吨/天
47 @ApiModelProperty(value = "实际处理水量--同比增长") 49 @ApiModelProperty(value = "实际处理水量--同比增长")
48 private Double ysjslWaterRatio; 50 private Double ysjslWaterRatio;
49 51
...@@ -81,13 +83,14 @@ public class ProductDataVO { ...@@ -81,13 +83,14 @@ public class ProductDataVO {
81 private String dangerDeptNames; 83 private String dangerDeptNames;
82 84
83 //收费水量-日均值 85 //收费水量-日均值
84 public Double getAvgDayWaterVolume() { 86 public String getAvgDayWaterVolume() {
85 avgDayWaterVolume = ConvertUtils.getDouble(chargeWaterVolume,0) / dayNum ; 87 avgDayWaterVolume = JSUtils.divide(chargeWaterVolume , dayNum ) ;
86 return avgDayWaterVolume; 88 return avgDayWaterVolume;
87 } 89 }
88 //实际处理水量-日均值 90 //实际处理水量-日均值
89 public Double getAvgYsjslWaterVolume() { 91 public String getAvgYsjslWaterVolume() {
90 avgYsjslWaterVolume = ConvertUtils.getDouble(ysjslWaterVolume,0) / dayNum; 92 // avgYsjslWaterVolume = ConvertUtils.getDouble(ysjslWaterVolume,0) / dayNum;
93 avgYsjslWaterVolume = JSUtils.divide(ysjslWaterVolume , dayNum ) ;
91 return avgYsjslWaterVolume; 94 return avgYsjslWaterVolume;
92 } 95 }
93 96
...@@ -108,7 +111,10 @@ public class ProductDataVO { ...@@ -108,7 +111,10 @@ public class ProductDataVO {
108 if( deptartList != null && !deptartList.isEmpty() ){ 111 if( deptartList != null && !deptartList.isEmpty() ){
109 for(FReportWaterMonthDataVO dataVO : deptartList){ 112 for(FReportWaterMonthDataVO dataVO : deptartList){
110 if(deptName.length() > 0 ) deptName+="、"; 113 if(deptName.length() > 0 ) deptName+="、";
111 deptName += dataVO.getDeptartName(); 114 if(StringUtils.isNotEmpty(dataVO.getDeptartName())){
115 deptName += dataVO.getDeptartName();
116 }
117
112 } 118 }
113 } 119 }
114 return deptName; 120 return deptName;
...@@ -118,7 +124,9 @@ public class ProductDataVO { ...@@ -118,7 +124,9 @@ public class ProductDataVO {
118 if( deptartList != null && !deptartList.isEmpty() ){ 124 if( deptartList != null && !deptartList.isEmpty() ){
119 for(FReportPowerMonthDataVO dataVO : deptartList){ 125 for(FReportPowerMonthDataVO dataVO : deptartList){
120 if(deptName.length() > 0 ) deptName+="、"; 126 if(deptName.length() > 0 ) deptName+="、";
121 deptName += dataVO.getDeptartName(); 127 if(StringUtils.isNotEmpty(dataVO.getDeptartName())){
128 deptName += dataVO.getDeptartName();
129 }
122 } 130 }
123 } 131 }
124 return deptName; 132 return deptName;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!