| @@ -825,12 +825,15 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| if (null != record.getFormulaList() && record.getFormulaList().size() > 0 ) { | if (null != record.getFormulaList() && record.getFormulaList().size() > 0 ) { | ||||
| record.setFormulaListStr(JSON.toJSONString(record.getFormulaList())); | record.setFormulaListStr(JSON.toJSONString(record.getFormulaList())); | ||||
| } | } | ||||
| WxShop shop = wxShopService.getById(fessShop.getShopId()); | WxShop shop = wxShopService.getById(fessShop.getShopId()); | ||||
| if (StringUtils.isBlank(shop.getPulicRate())) { | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"店铺未设置公摊系数"); | |||||
| } | |||||
| wxEnergyHelper.testCalcute(record.getFormula(),shop.getPulicRate(),shop.getOperationArea()); | |||||
| String pulicRate = "1"; | |||||
| if (fessShop.getIsPublic() == EnumYesOrNo.YES.getCode()) { | |||||
| if (StringUtils.isBlank(shop.getPulicRate())) { | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"店铺未设置公摊系数"); | |||||
| } | |||||
| pulicRate = shop.getPulicRate(); | |||||
| } | |||||
| wxEnergyHelper.testCalcute(record.getFormula(),pulicRate,shop.getOperationArea()); | |||||
| wxEnergyFeesShopMapper.updateById(record); | wxEnergyFeesShopMapper.updateById(record); | ||||
| } | } | ||||