| @@ -45,6 +45,19 @@ public class WxMallBuildingController extends BaseController { | |||||
| } | } | ||||
| return wxMallBuildingService.getBuildingFloorList(wxMallBuilding,this.getUser()); | return wxMallBuildingService.getBuildingFloorList(wxMallBuilding,this.getUser()); | ||||
| } | } | ||||
| @ApiOperation("获取楼层楼座数据") | |||||
| @GetMapping("getbuildinglist") | |||||
| public ResultData getbuildinglist(WxMallBuilding wxMallBuilding) { | |||||
| wxMallBuilding.updateTenantInfo(getTenantInfo()); | |||||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||||
| if (null != dataRule) { | |||||
| wxMallBuilding.setFloorForRule(dataRule.getFloorIds()); | |||||
| wxMallBuilding.setBusinessForRule(dataRule.getBussinessIds()); | |||||
| wxMallBuilding.setShopTypeForRule(dataRule.getShopTypes()); | |||||
| } | |||||
| return wxMallBuildingService.getBuildingList(wxMallBuilding,this.getUser()); | |||||
| } | |||||
| @ApiOperation("保存楼层楼座地图") | @ApiOperation("保存楼层楼座地图") | ||||
| @PostMapping("saveFloorImg") | @PostMapping("saveFloorImg") | ||||
| @@ -232,6 +232,7 @@ public class WxCouponController extends BaseController { | |||||
| CouponCacheUtils.removeOnlyCouponCache(redisTemplate, wxCoupon.getId()); | CouponCacheUtils.removeOnlyCouponCache(redisTemplate, wxCoupon.getId()); | ||||
| CouponCacheUtils.removeOldDetailCache(redisTemplate); | CouponCacheUtils.removeOldDetailCache(redisTemplate); | ||||
| CouponCacheUtils.removeOldDetailHtmlCache(redisTemplate); | CouponCacheUtils.removeOldDetailHtmlCache(redisTemplate); | ||||
| CouponCacheUtils.removeOldCouponOrderHtmlCache(redisTemplate); | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -6,20 +6,30 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxEnergyFees; | import com.iformall.domain.po.WxEnergyFees; | ||||
| import com.iformall.domain.po.WxEnergyFeesShop; | |||||
| import com.iformall.domain.po.WxEnergyFeesTime; | import com.iformall.domain.po.WxEnergyFeesTime; | ||||
| import com.iformall.domain.po.WxEnergyMeter; | import com.iformall.domain.po.WxEnergyMeter; | ||||
| import com.iformall.domain.po.WxEnergyMeterChild; | |||||
| import com.iformall.domain.po.WxEnergyMeterReading; | import com.iformall.domain.po.WxEnergyMeterReading; | ||||
| import com.iformall.domain.po.WxEnergyMeterShopFloor; | |||||
| import com.iformall.domain.po.WxEnergyReadingCalcute; | import com.iformall.domain.po.WxEnergyReadingCalcute; | ||||
| import com.iformall.domain.po.WxMallFloor; | |||||
| import com.iformall.domain.po.WxShop; | |||||
| import com.iformall.domain.po.WxUserDataRule; | import com.iformall.domain.po.WxUserDataRule; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.enums.EnumBillAllType; | import com.iformall.enums.EnumBillAllType; | ||||
| import com.iformall.enums.EnumEnergyMeterPhysicsType; | |||||
| import com.iformall.enums.EnumEnergyMeterShopFloorType; | |||||
| import com.iformall.enums.EnumEnergyMeterType; | import com.iformall.enums.EnumEnergyMeterType; | ||||
| import com.iformall.enums.EnumEnergyPublicCalcuteRule; | |||||
| import com.iformall.enums.EnumFeesStandardsCalcuteUnit; | import com.iformall.enums.EnumFeesStandardsCalcuteUnit; | ||||
| import com.iformall.enums.EnumFeesStandardsTimeUnit; | import com.iformall.enums.EnumFeesStandardsTimeUnit; | ||||
| import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.service.WxEnergyService; | import com.iformall.service.WxEnergyService; | ||||
| import com.iformall.service.WxMallFloorService; | |||||
| import com.iformall.service.WxShopService; | |||||
| import com.iformall.utils.DateUtils; | |||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| @@ -39,6 +49,7 @@ import org.springframework.web.multipart.MultipartFile; | |||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Calendar; | |||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -52,6 +63,12 @@ public class WxEnergyController extends BaseController { | |||||
| @Autowired | @Autowired | ||||
| private WxEnergyService wxEnergyService; | private WxEnergyService wxEnergyService; | ||||
| @Autowired | |||||
| private WxMallFloorService wxMallFloorService; | |||||
| @Autowired | |||||
| private WxShopService wxShopService; | |||||
| @ApiOperation("表类型") | @ApiOperation("表类型") | ||||
| @GetMapping("meterTypeList") | @GetMapping("meterTypeList") | ||||
| public ResultData meterTypeList() { | public ResultData meterTypeList() { | ||||
| @@ -62,16 +79,30 @@ public class WxEnergyController extends BaseController { | |||||
| return new ResultData(retMap); | return new ResultData(retMap); | ||||
| } | } | ||||
| @ApiOperation("公摊计费规则") | |||||
| @GetMapping("publicCalcuteRules") | |||||
| public ResultData publicCalcuteRules() { | |||||
| @ApiOperation("表分组") | |||||
| @GetMapping("meterPhysicsTypeTypeList") | |||||
| public ResultData meterPhysicsTypeTypeList() { | |||||
| Map<Integer,String> retMap = new HashMap<Integer,String>(); | Map<Integer,String> retMap = new HashMap<Integer,String>(); | ||||
| for (EnumEnergyPublicCalcuteRule mem : EnumEnergyPublicCalcuteRule.values()) { | |||||
| retMap.put(mem.getCode(), mem.getMessage()); | |||||
| for (EnumEnergyMeterPhysicsType mem : EnumEnergyMeterPhysicsType.values()) { | |||||
| if (mem != EnumEnergyMeterPhysicsType.SUMMARY) { | |||||
| retMap.put(mem.getCode(), mem.getMessage()); | |||||
| } | |||||
| } | |||||
| return new ResultData(retMap); | |||||
| } | |||||
| @ApiOperation("计算费用的表分组") | |||||
| @GetMapping("meterFeesPhysicsTypeTypeList") | |||||
| public ResultData meterFeesPhysicsTypeTypeList() { | |||||
| Map<Integer,String> retMap = new HashMap<Integer,String>(); | |||||
| for (EnumEnergyMeterPhysicsType mem : EnumEnergyMeterPhysicsType.values()) { | |||||
| if (mem != EnumEnergyMeterPhysicsType.PUBLIC) { | |||||
| retMap.put(mem.getCode(), mem.getMessage()); | |||||
| } | |||||
| } | } | ||||
| return new ResultData(retMap); | return new ResultData(retMap); | ||||
| } | } | ||||
| @ApiOperation("能源表列表") | @ApiOperation("能源表列表") | ||||
| @GetMapping("meterList") | @GetMapping("meterList") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -79,19 +110,179 @@ public class WxEnergyController extends BaseController { | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | ||||
| }) | }) | ||||
| public ResultData meterList(@ModelAttribute WxEnergyMeter record, Integer pageNum, Integer pageSize) { | public ResultData meterList(@ModelAttribute WxEnergyMeter record, Integer pageNum, Integer pageSize) { | ||||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||||
| if (null != dataRule) { | |||||
| record.setFloorForRule(dataRule.getFloorIds()); | |||||
| record.setBusinessForRule(dataRule.getBussinessIds()); | |||||
| record.setShopTypeForRule(dataRule.getShopTypes()); | |||||
| } | |||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | ||||
| PageInfo<WxEnergyMeter> page = wxEnergyService.meterListAsPage(record, pageNum, pageSize); | PageInfo<WxEnergyMeter> page = wxEnergyService.meterListAsPage(record, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @ApiOperation("能源表新增修改") | |||||
| @ApiOperation("根据楼座查询楼层和能源表") | |||||
| @GetMapping("floorAndMeterList") | |||||
| public ResultData floorAndMeterList(@ModelAttribute WxEnergyMeter record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| List<WxMallFloor> retList = new ArrayList<WxMallFloor>(); | |||||
| //根据楼座查询楼层 | |||||
| WxMallFloor mfq = new WxMallFloor(); | |||||
| mfq.updateTenantInfo(record); | |||||
| mfq.setBuildingId(record.getBuilding()); | |||||
| PageInfo<WxMallFloor> floorPage = wxMallFloorService.listAsPage(mfq, 1,1000); | |||||
| if (null != floorPage && null != floorPage.getList() && floorPage.getList().size() > 0 ) { | |||||
| retList.addAll(floorPage.getList()); | |||||
| } | |||||
| //根据楼错查询关联的公共表 | |||||
| WxEnergyMeterShopFloor msf = new WxEnergyMeterShopFloor(); | |||||
| msf.updateTenantInfo(record); | |||||
| msf.setType(EnumEnergyMeterShopFloorType.BUILDING.getCode()); | |||||
| msf.setAliseId(record.getBuilding()); | |||||
| List<Long> meterids = wxEnergyService.getMeterIdList(msf); | |||||
| if (null != meterids && meterids.size() > 0 ) { | |||||
| WxEnergyMeter mq = new WxEnergyMeter(); | |||||
| mq.updateTenantInfo(record); | |||||
| mq.setIds(meterids); | |||||
| List<Integer> ptylist = new ArrayList<Integer>(); | |||||
| if (null != record.getIsRealMeter() && EnumYesOrNo.YES.getCode() == record.getIsRealMeter()) { | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.PUBLIC.getCode()); | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.USER.getCode()); | |||||
| }else { | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.SUMMARY.getCode()); | |||||
| } | |||||
| mq.setPhysicsTypeList(ptylist); | |||||
| PageInfo<WxEnergyMeter> page = wxEnergyService.meterListAsPage(mq,1,1000); | |||||
| if (null != page && null != page.getList()) { | |||||
| for (int i = 0 ; i < page.getList().size() ; i ++) { | |||||
| WxEnergyMeter m = page.getList().get(i); | |||||
| WxMallFloor f = new WxMallFloor(); | |||||
| f.setId(m.getId()); | |||||
| f.setBuildingId(record.getBuilding()); | |||||
| f.setFloorName(m.getName()); | |||||
| f.setTreeType(m.getTreeType()); | |||||
| retList.add(f); | |||||
| } | |||||
| } | |||||
| } | |||||
| return new ResultData(retList); | |||||
| } | |||||
| @ApiOperation("根据楼层查询能源表和店铺") | |||||
| @GetMapping("floorMeterList") | |||||
| public ResultData shopAndMeterList(@ModelAttribute WxEnergyMeter record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| List<WxShop> retList = new ArrayList<WxShop>(); | |||||
| if (null != record.getHasShop() && record.getHasShop() == EnumYesOrNo.YES.getCode()) { | |||||
| //根据楼座查询楼层 | |||||
| WxShop mfq = new WxShop(); | |||||
| mfq.updateTenantInfo(record); | |||||
| mfq.setFloor(record.getFloor()); | |||||
| PageInfo<WxShop> floorPage = wxShopService.listAsPage(mfq, 1,1000); | |||||
| if (null != floorPage && null != floorPage.getList() && floorPage.getList().size() > 0 ) { | |||||
| retList.addAll(floorPage.getList()); | |||||
| } | |||||
| } | |||||
| //根据楼错查询关联的公共表 | |||||
| WxEnergyMeterShopFloor msf = new WxEnergyMeterShopFloor(); | |||||
| msf.updateTenantInfo(record); | |||||
| msf.setType(EnumEnergyMeterShopFloorType.FLOOR.getCode()); | |||||
| msf.setAliseId(record.getFloor()); | |||||
| List<Long> meterids = wxEnergyService.getMeterIdList(msf); | |||||
| if (null != meterids && meterids.size() > 0 ) { | |||||
| WxEnergyMeter mq = new WxEnergyMeter(); | |||||
| mq.updateTenantInfo(record); | |||||
| mq.setIds(meterids); | |||||
| List<Integer> ptylist = new ArrayList<Integer>(); | |||||
| if (null != record.getIsRealMeter() && EnumYesOrNo.YES.getCode() == record.getIsRealMeter()) { | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.PUBLIC.getCode()); | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.USER.getCode()); | |||||
| }else { | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.SUMMARY.getCode()); | |||||
| } | |||||
| mq.setPhysicsTypeList(ptylist); | |||||
| PageInfo<WxEnergyMeter> page = wxEnergyService.meterListAsPage(mq,1,1000); | |||||
| if (null == page || null == page.getList() ) { | |||||
| return new ResultData(); | |||||
| } | |||||
| List<WxEnergyMeter> list = page.getList(); | |||||
| for (int i = 0 ; i < list.size() ; i ++) { | |||||
| WxEnergyMeter meter = list.get(i); | |||||
| WxShop s = new WxShop(); | |||||
| s.setId(meter.getId()); | |||||
| s.setShopNumber(meter.getName()); | |||||
| s.setTreeParentId(record.getFloor()); | |||||
| s.setTreeParentType("floor"); | |||||
| retList.add(s); | |||||
| } | |||||
| return new ResultData(retList); | |||||
| } | |||||
| return new ResultData(retList); | |||||
| } | |||||
| @ApiOperation("根据店铺查询能源表") | |||||
| @GetMapping("shopMeterList") | |||||
| public ResultData shopMeterList(@ModelAttribute WxEnergyMeter record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| List<WxShop> retList = new ArrayList<WxShop>(); | |||||
| //根据楼错查询关联的公共表 | |||||
| WxEnergyMeterShopFloor msf = new WxEnergyMeterShopFloor(); | |||||
| msf.updateTenantInfo(record); | |||||
| msf.setType(EnumEnergyMeterShopFloorType.SHOP.getCode()); | |||||
| msf.setAliseId(record.getShopId()); | |||||
| List<Long> meterids = wxEnergyService.getMeterIdList(msf); | |||||
| if (null != meterids && meterids.size() > 0 ) { | |||||
| WxEnergyMeter mq = new WxEnergyMeter(); | |||||
| mq.updateTenantInfo(record); | |||||
| mq.setIds(meterids); | |||||
| List<Integer> ptylist = new ArrayList<Integer>(); | |||||
| if (null != record.getIsRealMeter() && EnumYesOrNo.YES.getCode() == record.getIsRealMeter()) { | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.PUBLIC.getCode()); | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.USER.getCode()); | |||||
| }else { | |||||
| ptylist.add(EnumEnergyMeterPhysicsType.SUMMARY.getCode()); | |||||
| } | |||||
| mq.setPhysicsTypeList(ptylist); | |||||
| PageInfo<WxEnergyMeter> page = wxEnergyService.meterListAsPage(mq,1,1000); | |||||
| if (null == page || null == page.getList() ) { | |||||
| return new ResultData(); | |||||
| } | |||||
| List<WxEnergyMeter> list = page.getList(); | |||||
| for (int i = 0 ; i < list.size() ; i ++) { | |||||
| WxEnergyMeter meter = list.get(i); | |||||
| WxShop s = new WxShop(); | |||||
| s.setId(meter.getId()); | |||||
| s.setShopNumber(meter.getName()); | |||||
| s.setTreeType(meter.getTreeType()); | |||||
| s.setTreeParentId(record.getShopId()); | |||||
| s.setTreeParentType("shop"); | |||||
| retList.add(s); | |||||
| } | |||||
| return new ResultData(retList); | |||||
| } | |||||
| return new ResultData(retList); | |||||
| } | |||||
| @ApiOperation("根据子表") | |||||
| @GetMapping("childMeterList") | |||||
| public ResultData childMeterList(@ModelAttribute WxEnergyMeterChild record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| List<Long> meterids = wxEnergyService.getChildMeterIdList(record); | |||||
| if (null != meterids && meterids.size() > 0 ) { | |||||
| WxEnergyMeter mq = new WxEnergyMeter(); | |||||
| mq.updateTenantInfo(record); | |||||
| mq.setIds(meterids); | |||||
| PageInfo<WxEnergyMeter> page = wxEnergyService.meterListAsPage(mq,1,1000); | |||||
| if (null == page || null == page.getList() ) { | |||||
| return new ResultData(); | |||||
| } | |||||
| List<WxEnergyMeter> list = page.getList(); | |||||
| for (int i = 0 ; i < list.size() ; i ++) { | |||||
| WxEnergyMeter meter = list.get(i); | |||||
| meter.setTreeParentId(record.getParentMeterId()); | |||||
| meter.setTreeParentType("meter"); | |||||
| } | |||||
| return new ResultData(list); | |||||
| } | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("用户能源表新增修改") | |||||
| @PostMapping("saveMeter") | @PostMapping("saveMeter") | ||||
| public ResultData saveMeter(@RequestBody WxEnergyMeter record) { | public ResultData saveMeter(@RequestBody WxEnergyMeter record) { | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| @@ -99,49 +290,128 @@ public class WxEnergyController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @PostMapping("meterUpdateIsDel") | |||||
| public ResultData meterUpdateIsDel(@RequestBody WxEnergyMeter record) { | |||||
| @ApiOperation("用户能源表新增修改") | |||||
| @PostMapping("aliasMeter") | |||||
| public ResultData aliasMeter(@RequestBody WxEnergyMeterShopFloor record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| wxEnergyService.updateMeterIsDel(record); | |||||
| wxEnergyService.createMeterAlias(record); | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("能源表关联店铺") | |||||
| @PostMapping("setMeterShop") | |||||
| public ResultData setMeterShop(@RequestBody WxEnergyMeter record) { | |||||
| @ApiOperation("用户能源表新增修改") | |||||
| @PostMapping("aliasChildMeter") | |||||
| public ResultData aliasChildMeter(@RequestBody WxEnergyMeterChild record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| if (null == record.getId() || null == record.getShopId()) { | |||||
| return new ResultData(Result.ERROR,"参数错误"); | |||||
| } | |||||
| WxEnergyMeter meter = wxEnergyService.getMeterById(record, record.getId()); | |||||
| if (null == meter) { | |||||
| return new ResultData(Result.ERROR,"能源表未查询到"); | |||||
| WxEnergyMeter meter = wxEnergyService.getMeterById(record, record.getParentMeterId()); | |||||
| if (null == meter || meter.getPhysicsType() != EnumEnergyMeterPhysicsType.SUMMARY.getCode()) { | |||||
| return new ResultData(Result.ERROR,"该节点不能绑定子表"); | |||||
| } | } | ||||
| if (meter.getIsPublic().intValue() == EnumYesOrNo.YES.getCode().intValue()) { | |||||
| return new ResultData(Result.ERROR,"总表不能关联店铺"); | |||||
| } | |||||
| wxEnergyService.setMeterShop(record); | |||||
| wxEnergyService.createChildMeterAlias(record); | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("能源表关联楼层") | |||||
| @PostMapping("setMeterFloor") | |||||
| public ResultData setMeterFloor(@RequestBody WxEnergyMeter record) { | |||||
| @ApiOperation("用户能源表新增修改") | |||||
| @PostMapping("deleteAliasMeter") | |||||
| public ResultData deleteAliasMeter(@RequestBody WxEnergyMeterShopFloor record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| if (null == record.getId() || null == record.getFloorId()) { | |||||
| return new ResultData(Result.ERROR,"参数错误"); | |||||
| if (null == record.getId()) { | |||||
| return new ResultData(Result.ERROR,"请选择一个"); | |||||
| } | } | ||||
| WxEnergyMeter meter = wxEnergyService.getMeterById(record, record.getId()); | |||||
| if (null == meter) { | |||||
| return new ResultData(Result.ERROR,"能源表未查询到"); | |||||
| wxEnergyService.deleteMeterAlias(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("用户能源表新增修改") | |||||
| @PostMapping("deleteChildMeter") | |||||
| public ResultData deleteChildMeter(@RequestBody WxEnergyMeterChild record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| if (null == record.getId()) { | |||||
| return new ResultData(Result.ERROR,"请选择一个关联"); | |||||
| } | } | ||||
| if (meter.getIsPublic().intValue() == EnumYesOrNo.NO.getCode().intValue()) { | |||||
| return new ResultData(Result.ERROR,"用户表不能关联楼层"); | |||||
| wxEnergyService.deleteChildMeterAlias(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| @PostMapping("meterUpdateIsDel") | |||||
| public ResultData meterUpdateIsDel(@RequestBody WxEnergyMeter record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| wxEnergyService.updateMeterIsDel(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("计算标准列表") | |||||
| @GetMapping("feesShopList") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||||
| }) | |||||
| public ResultData shopFeesList(@ModelAttribute WxEnergyFeesShop record, Integer pageNum, Integer pageSize) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| if (StringUtils.isNotBlank(record.getFeesIdsStr())) { | |||||
| String[] fss = record.getFeesIdsStr().split(","); | |||||
| if (null != fss && fss.length > 0 ) { | |||||
| List<Long> feesIdList = new ArrayList<Long>(); | |||||
| for (int i = 0 ; i < fss.length ; i ++) { | |||||
| feesIdList.add(Long.parseLong(fss[i])); | |||||
| } | |||||
| record.setFeesIds(feesIdList); | |||||
| } | |||||
| } | } | ||||
| wxEnergyService.setMeterFloor(record); | |||||
| PageInfo<WxEnergyFeesShop> list = wxEnergyService.feesShopListAsPage(record,pageNum,pageSize); | |||||
| return new ResultData(list); | |||||
| } | |||||
| @ApiOperation("计算公式组件") | |||||
| @GetMapping("feesShopComponentList") | |||||
| public ResultData shopFeesList(@ModelAttribute WxEnergyFeesShop record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| return new ResultData(wxEnergyService.getFeesCalcuteComponentList(record)); | |||||
| } | |||||
| @ApiOperation("计费标准新增修改") | |||||
| @PostMapping("createFeesShop") | |||||
| public ResultData createFeesShop(@RequestBody WxEnergyFeesShop record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| wxEnergyService.createFeesShop(record); | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("删除计费标准关联") | |||||
| @PostMapping("deleteFeesShop") | |||||
| public ResultData deleteFeesShop(@RequestBody WxEnergyFeesShop record) { | |||||
| wxEnergyService.deleteFeesShop(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("店铺计费标准详情") | |||||
| @GetMapping("feesShopDetail") | |||||
| public ResultData feesShopDetail(@ModelAttribute WxEnergyFeesShop record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| return new ResultData(wxEnergyService.getShopFeesCalcute(record.getId(),record.getTenantId())); | |||||
| } | |||||
| @ApiOperation("店铺修改计费标准") | |||||
| @PostMapping("updateFeesShop") | |||||
| public ResultData updateFeesShop(@RequestBody WxEnergyFeesShop record) { | |||||
| wxEnergyService.saveOrUpdateShopFeesCalcute(record); | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("费用区间所属年月") | |||||
| @GetMapping("periodList") | |||||
| public ResultData periodList() { | |||||
| Calendar calendar = Calendar.getInstance(); | |||||
| int year = calendar.get(Calendar.YEAR); | |||||
| String[] months = new String[] {"01","02","03","04","05","06","07","08","09","10","11","12"}; | |||||
| String[] peroids = new String[months.length+1]; | |||||
| peroids[0] = (year-1)+"12"; | |||||
| for (int i = 0 ; i < months.length; i++) { | |||||
| peroids[i+1]=year+months[i]; | |||||
| } | |||||
| return new ResultData(peroids); | |||||
| } | |||||
| @ApiOperation("费用区间列表") | @ApiOperation("费用区间列表") | ||||
| @GetMapping("timeList") | @GetMapping("timeList") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -155,6 +425,12 @@ public class WxEnergyController extends BaseController { | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @ApiOperation("费用区间自动时间") | |||||
| @GetMapping("periodAutoTimes") | |||||
| public ResultData periodAutoTimes(@ModelAttribute WxEnergyFeesTime record) { | |||||
| return new ResultData(); | |||||
| } | |||||
| @ApiOperation("费用区间列表") | @ApiOperation("费用区间列表") | ||||
| @PostMapping("saveTime") | @PostMapping("saveTime") | ||||
| public ResultData saveTime(@RequestBody WxEnergyFeesTime record) { | public ResultData saveTime(@RequestBody WxEnergyFeesTime record) { | ||||
| @@ -163,13 +439,20 @@ public class WxEnergyController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @PostMapping("timeUpdateIsDel") | |||||
| @PostMapping("timeDel") | |||||
| public ResultData timeUpdateIsDel(@RequestBody WxEnergyFeesTime record) { | public ResultData timeUpdateIsDel(@RequestBody WxEnergyFeesTime record) { | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| wxEnergyService.setTimeIsDel(record); | |||||
| wxEnergyService.timeDel(record); | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("区间店铺列表") | |||||
| @GetMapping("timeShopList") | |||||
| public ResultData timeShopList(@ModelAttribute WxEnergyFeesTime record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| return new ResultData(wxEnergyService.getTimeShopNumber(record)); | |||||
| } | |||||
| @ApiOperation("能源科目列表") | @ApiOperation("能源科目列表") | ||||
| @GetMapping("feesList") | @GetMapping("feesList") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -192,9 +475,6 @@ public class WxEnergyController extends BaseController { | |||||
| if (null == record.getType()) { | if (null == record.getType()) { | ||||
| return new ResultData(Result.ERROR,"请选择能源表类型"); | return new ResultData(Result.ERROR,"请选择能源表类型"); | ||||
| } | } | ||||
| if (null == record.getPublicCalcute()) { | |||||
| return new ResultData(Result.ERROR,"请选择分摊计费规则"); | |||||
| } | |||||
| if (null == record.getFixedPrice()) { | if (null == record.getFixedPrice()) { | ||||
| return new ResultData(Result.ERROR,"请选择是否是一次性费用"); | return new ResultData(Result.ERROR,"请选择是否是一次性费用"); | ||||
| } | } | ||||
| @@ -262,10 +542,50 @@ public class WxEnergyController extends BaseController { | |||||
| record.setShopIds(sids); | record.setShopIds(sids); | ||||
| } | } | ||||
| } | } | ||||
| boolean hasPrice = false; | |||||
| if (null != record.getTimeId()) { | |||||
| WxEnergyFeesTime ftq = new WxEnergyFeesTime(); | |||||
| ftq.updateTenantInfo(record); | |||||
| ftq.setId(record.getTimeId()); | |||||
| WxEnergyFeesTime time = wxEnergyService.getFeesTimeById(ftq); | |||||
| record.setMeterType(time.getType()); | |||||
| record.setStartTime(time.getStartTime()); | |||||
| record.setEndTime(time.getEndTime()); | |||||
| } | |||||
| PageInfo<WxEnergyMeterReading> page = wxEnergyService.readingListAsPage(record, pageNum, pageSize); | PageInfo<WxEnergyMeterReading> page = wxEnergyService.readingListAsPage(record, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @ApiOperation("科目抄表记录导出") | |||||
| @GetMapping("readingExport") | |||||
| public void readingExport(@ModelAttribute WxEnergyMeterReading record, HttpServletRequest request, HttpServletResponse response) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| if (null != record.getTimeId()) { | |||||
| WxEnergyFeesTime ftq = new WxEnergyFeesTime(); | |||||
| ftq.updateTenantInfo(record); | |||||
| ftq.setId(record.getTimeId()); | |||||
| WxEnergyFeesTime time = wxEnergyService.getFeesTimeById(ftq); | |||||
| record.setMeterType(time.getType()); | |||||
| record.setStartTime(time.getStartTime()); | |||||
| record.setEndTime(time.getEndTime()); | |||||
| } | |||||
| wxEnergyService.exportReading(record, request, response); | |||||
| } | |||||
| @ApiOperation("科目抄表计算记录导入") | |||||
| @PostMapping(value = "/importReading", consumes = "multipart/*") | |||||
| public void importReading(@RequestParam("file") MultipartFile mFile,HttpServletRequest request, HttpServletResponse response) { | |||||
| try { | |||||
| //得到当前用户ID | |||||
| MallUserInfo user = getUser(); | |||||
| //request.getParameter("timeId"); | |||||
| wxEnergyService.importReadingCalcute(mFile, user, request, response); | |||||
| } catch (Exception e) { | |||||
| logger.error("importReading error.",e); | |||||
| throw new MallinkException(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| } | |||||
| @ApiOperation("修改抄表数据") | @ApiOperation("修改抄表数据") | ||||
| @PostMapping("saveReading") | @PostMapping("saveReading") | ||||
| public ResultData saveReading(@RequestBody WxEnergyMeterReading record) { | public ResultData saveReading(@RequestBody WxEnergyMeterReading record) { | ||||
| @@ -298,10 +618,27 @@ public class WxEnergyController extends BaseController { | |||||
| public ResultData readingCalcuteList(@ModelAttribute WxEnergyReadingCalcute record, Integer pageNum, Integer pageSize) { | public ResultData readingCalcuteList(@ModelAttribute WxEnergyReadingCalcute record, Integer pageNum, Integer pageSize) { | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | ||||
| if(StringUtils.isNotBlank(record.getFeesIdsStr())) { | |||||
| String[] shids = record.getFeesIdsStr().split(","); | |||||
| if (null != shids ) { | |||||
| List<Long> sids = new ArrayList<Long>(); | |||||
| for (int i = 0 ; i < shids.length ; i ++) { | |||||
| sids.add(Long.parseLong(shids[i])); | |||||
| } | |||||
| record.setFeesIds(sids); | |||||
| } | |||||
| } | |||||
| PageInfo<WxEnergyReadingCalcute> page = wxEnergyService.readingCalcuteListAsPage(record, pageNum, pageSize); | PageInfo<WxEnergyReadingCalcute> page = wxEnergyService.readingCalcuteListAsPage(record, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @ApiOperation("科目抄表计算店铺列表") | |||||
| @GetMapping("readingCalcuteShopList") | |||||
| public ResultData readingCalcuteShopList(@ModelAttribute WxEnergyReadingCalcute record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| return new ResultData(wxEnergyService.getReadingCalcuteShopNumber(record)); | |||||
| } | |||||
| @ApiOperation("科目抄表计算记录导出") | @ApiOperation("科目抄表计算记录导出") | ||||
| @GetMapping("readingCalcuteExport") | @GetMapping("readingCalcuteExport") | ||||
| public void readingCalcuteExport(@ModelAttribute WxEnergyReadingCalcute record, HttpServletRequest request, HttpServletResponse response) { | public void readingCalcuteExport(@ModelAttribute WxEnergyReadingCalcute record, HttpServletRequest request, HttpServletResponse response) { | ||||
| @@ -314,8 +651,8 @@ public class WxEnergyController extends BaseController { | |||||
| } | } | ||||
| @ApiOperation("科目抄表计算记录导入-修改单价") | @ApiOperation("科目抄表计算记录导入-修改单价") | ||||
| @PostMapping(value = "/importReading", consumes = "multipart/*") | |||||
| public void importReading(@RequestParam("file") MultipartFile mFile,HttpServletRequest request, HttpServletResponse response) { | |||||
| @PostMapping(value = "/importReadingCalcute", consumes = "multipart/*") | |||||
| public void importReadingCalcute(@RequestParam("file") MultipartFile mFile,HttpServletRequest request, HttpServletResponse response) { | |||||
| try { | try { | ||||
| //得到当前用户ID | //得到当前用户ID | ||||
| MallUserInfo user = getUser(); | MallUserInfo user = getUser(); | ||||
| @@ -334,9 +671,6 @@ public class WxEnergyController extends BaseController { | |||||
| if (null == wrc) { | if (null == wrc) { | ||||
| return new ResultData(Result.ERROR,"id错误"); | return new ResultData(Result.ERROR,"id错误"); | ||||
| } | } | ||||
| if (null == wrc.getImportSuccess() || wrc.getImportSuccess().intValue() != EnumYesOrNo.YES.getCode().intValue()) { | |||||
| return new ResultData(Result.ERROR,"导入未完全成功,不能计算!"); | |||||
| } | |||||
| Integer number = wxEnergyService.calcuteReading(wrc, getUser()); | Integer number = wxEnergyService.calcuteReading(wrc, getUser()); | ||||
| return new ResultData(number); | return new ResultData(number); | ||||
| } | } | ||||
| @@ -351,7 +351,6 @@ public class WxMallAdminController extends BaseController { | |||||
| @GetMapping("timeList") | @GetMapping("timeList") | ||||
| public ResultData timeList(@ModelAttribute WxEnergyFeesTime record) { | public ResultData timeList(@ModelAttribute WxEnergyFeesTime record) { | ||||
| setQueryDataRule(record); | setQueryDataRule(record); | ||||
| record.setIsDel(EnumYesOrNo.NO.getCode()); | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | ||||
| PageInfo<WxEnergyFeesTime> page = wxEnergyService.timeListAsPage(record, 1, 1000); | PageInfo<WxEnergyFeesTime> page = wxEnergyService.timeListAsPage(record, 1, 1000); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| @@ -0,0 +1,15 @@ | |||||
| package com.iformall.domain.dto; | |||||
| import java.util.List; | |||||
| import com.iformall.enums.EnumEnergyMeterShopFloorType; | |||||
| import lombok.Data; | |||||
| /** | |||||
| */ | |||||
| @Data | |||||
| public class FloorBuildingIdDTO { | |||||
| private EnumEnergyMeterShopFloorType type; | |||||
| private List<Long> ids; | |||||
| } | |||||
| @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumBillAllType; | import com.iformall.enums.EnumBillAllType; | ||||
| import com.iformall.enums.EnumContractReceivePeriodUnit; | import com.iformall.enums.EnumContractReceivePeriodUnit; | ||||
| import com.iformall.enums.EnumEnergyPublicCalcuteRule; | |||||
| import com.iformall.enums.EnumEnergyMeterType; | |||||
| import com.iformall.enums.EnumFeesStandardsCalcuteUnit; | import com.iformall.enums.EnumFeesStandardsCalcuteUnit; | ||||
| import com.iformall.enums.EnumFeesStandardsTimeUnit; | import com.iformall.enums.EnumFeesStandardsTimeUnit; | ||||
| import com.iformall.enums.EnumRentDayPriceCalcute; | import com.iformall.enums.EnumRentDayPriceCalcute; | ||||
| @@ -58,19 +58,19 @@ public class WxEnergyFees extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "税率", name = "taxRate") | @io.swagger.annotations.ApiModelProperty(value = "税率", name = "taxRate") | ||||
| private String taxRate; | private String taxRate; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "公摊计算规则EnumEnergyPublicCalcuteRule", name = "publicCalcute") | |||||
| private Integer publicCalcute; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "表类型EnumEnergyMeterType", name = "type") | |||||
| private Integer type; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String publicCalcuteName; | |||||
| public String getPublicCalcuteName() { | |||||
| if (null != publicCalcute) { | |||||
| return EnumEnergyPublicCalcuteRule.getEnum(publicCalcute).getMessage(); | |||||
| private String typeName; | |||||
| public String getTypeName() { | |||||
| if (null != type) { | |||||
| return EnumEnergyMeterType.getEnum(type).getMessage(); | |||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value = "表类型EnumEnergyMeterType", name = "type") | |||||
| private Integer type; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否公摊", name = "isPublic") | |||||
| private Integer isPublic; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "所属账单类型EnumBillAllType", name = "billType") | @io.swagger.annotations.ApiModelProperty(value = "所属账单类型EnumBillAllType", name = "billType") | ||||
| private Integer billType; | private Integer billType; | ||||
| @@ -0,0 +1,73 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumEnergyMeterPhysicsType; | |||||
| import com.iformall.enums.EnumEnergyMeterType; | |||||
| import com.iformall.enums.EnumRentShopType; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| @TableName(value = "wx_energy_fees_shop") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxEnergyFeesShop extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | |||||
| private Long feesId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否公摊", name = "isPublic") | |||||
| private Integer isPublic; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "单价", name = "price") | |||||
| private String price; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺编号", name = "shopId") | |||||
| private Long shopId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "公摊计算公司", name = "formula") | |||||
| private String formula; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "公摊计算公司", name = "formulaContent") | |||||
| private String formulaContent; | |||||
| @TableField(exist = false) | |||||
| private String treeType="feesShop"; | |||||
| @TableField(exist = false) | |||||
| private Long treeParentId; | |||||
| public Long getTreeParentId() { | |||||
| treeParentId = shopId; | |||||
| return treeParentId; | |||||
| } | |||||
| @TableField(exist = false) | |||||
| private String treeParentType="shop"; | |||||
| @TableField(exist = false) | |||||
| private List<Long> shopIds; | |||||
| @TableField(exist = false) | |||||
| private List<Long> calcuteIds; | |||||
| @TableField(exist = false) | |||||
| private String feesName; | |||||
| @TableField(exist = false) | |||||
| private String feesIdsStr; | |||||
| private List<Long> feesIds; | |||||
| } | |||||
| @@ -1,11 +1,15 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumEnergyMeterType; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | |||||
| /** | /** | ||||
| */ | */ | ||||
| @@ -20,20 +24,28 @@ public class WxEnergyFeesTime extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | @io.swagger.annotations.ApiModelProperty(value="id",name="id") | ||||
| private Long id; | private Long id; | ||||
| @io.swagger.annotations.ApiModelProperty(value="name",name="name") | |||||
| private String name; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | ||||
| private Date createTime; | private Date createTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | ||||
| private Date updateTime; | private Date updateTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "isDel", name = "isDel") | |||||
| private Integer isDel; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "表类型EnumEnergyMeterType", name = "type") | @io.swagger.annotations.ApiModelProperty(value = "表类型EnumEnergyMeterType", name = "type") | ||||
| private Integer type; | private Integer type; | ||||
| @TableField(exist = false) | |||||
| private String typeName; | |||||
| public String getTypeName() { | |||||
| if (null != type) { | |||||
| return EnumEnergyMeterType.getEnum(type).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value = "所属年月", name = "period") | |||||
| private String period; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺数量", name = "shopSize") | |||||
| private Integer shopSize; | |||||
| @io.swagger.annotations.ApiModelProperty(value="startTime",name="startTime") | @io.swagger.annotations.ApiModelProperty(value="startTime",name="startTime") | ||||
| private Date startTime; | private Date startTime; | ||||
| @@ -41,4 +53,7 @@ public class WxEnergyFeesTime extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="endTime",name="endTime") | @io.swagger.annotations.ApiModelProperty(value="endTime",name="endTime") | ||||
| private Date endTime; | private Date endTime; | ||||
| @TableField(exist = false) | |||||
| List<Long> shopIds; | |||||
| } | } | ||||
| @@ -0,0 +1,55 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumEnergyMeterType; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| @TableName(value = "wx_energy_fees_time_shop") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxEnergyFeesTimeShop extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "所属年月", name = "period") | |||||
| private String period; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "表类型EnumEnergyMeterType", name = "type") | |||||
| private Integer type; | |||||
| @TableField(exist = false) | |||||
| private String typeName; | |||||
| public String getTypeName() { | |||||
| if (null != type) { | |||||
| return EnumEnergyMeterType.getEnum(type).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value = "时间区间编号", name = "timeId") | |||||
| private Long timeId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="店铺编号",name="shopId") | |||||
| private Long shopId; | |||||
| @TableField(exist = false) | |||||
| private List<Long> shopIds; | |||||
| } | |||||
| @@ -3,7 +3,9 @@ package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumEnergyMeterPhysicsType; | |||||
| import com.iformall.enums.EnumEnergyMeterType; | import com.iformall.enums.EnumEnergyMeterType; | ||||
| import com.iformall.enums.EnumRentShopType; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| @@ -47,32 +49,57 @@ public class WxEnergyMeter extends TenantEntity { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value="倍率",name="rate") | @io.swagger.annotations.ApiModelProperty(value="倍率",name="rate") | ||||
| private String rate; | private String rate; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否总表", name = "isPublic") | |||||
| private Integer isPublic; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "表分组EnumEnergyMeterPhysicsType", name = "physicsType") | |||||
| private Integer physicsType; | |||||
| @TableField(exist = false) | |||||
| private String physicsTypeName; | |||||
| public String getPhysicsTypeName() { | |||||
| if (null != physicsType) { | |||||
| EnumEnergyMeterPhysicsType py = EnumEnergyMeterPhysicsType.getEnum(physicsType); | |||||
| if (null != py) { | |||||
| return py.getMessage(); | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺类型EnumRentShopType", name = "shopType") | @io.swagger.annotations.ApiModelProperty(value = "店铺类型EnumRentShopType", name = "shopType") | ||||
| private Integer shopType; | private Integer shopType; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "楼栋ID", name = "buildingId") | |||||
| private Long buildingId; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String buildingName; | |||||
| private String shopTypeName; | |||||
| public String getShopTypeName() { | |||||
| if (null != shopType) { | |||||
| return EnumRentShopType.getEnum(shopType).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value = "楼层ID", name = "floorId") | |||||
| private Long floorId; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String floorName; | |||||
| private String treeType="meter"; | |||||
| @TableField(exist = false) | |||||
| private Long treeParentId; | |||||
| @TableField(exist = false) | |||||
| private String treeParentType; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺", name = "shopId") | |||||
| @TableField(exist = false) | |||||
| private Long aliasId; | |||||
| @TableField(exist = false) | |||||
| private Integer aliasType; | |||||
| @TableField(exist = false) | |||||
| private Long building; | |||||
| @TableField(exist = false) | |||||
| private Long floor; | |||||
| @TableField(exist = false) | |||||
| private Long shopId; | private Long shopId; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String shopNumber; | |||||
| private List<Integer> physicsTypeList; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> shopIds; | |||||
| private Integer isRealMeter; | |||||
| @TableField(exist = false) | |||||
| private Integer isValid; | |||||
| @TableField(exist = false) | |||||
| private Integer hasShop; | |||||
| } | } | ||||
| @@ -0,0 +1,47 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumEnergyMeterShopFloorType; | |||||
| import com.iformall.enums.EnumEnergyMeterType; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.ArrayList; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| @TableName(value = "wx_energy_meter_child") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxEnergyMeterChild extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="表编号",name="parentMeterId") | |||||
| private Long parentMeterId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "关联的编号", name = "childMeterId") | |||||
| private Long childMeterId; | |||||
| @TableField(exist = false) | |||||
| private List<Long> childMeterIdList; | |||||
| } | |||||
| @@ -80,12 +80,6 @@ public class WxEnergyMeterReading extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="备注",name="remark") | @io.swagger.annotations.ApiModelProperty(value="备注",name="remark") | ||||
| private String remark; | private String remark; | ||||
| @io.swagger.annotations.ApiModelProperty(value="区间ID",name="timeId") | |||||
| private Long timeId; | |||||
| @TableField(exist = false) | |||||
| private String timeName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="表ID",name="meterId") | @io.swagger.annotations.ApiModelProperty(value="表ID",name="meterId") | ||||
| private Long meterId; | private Long meterId; | ||||
| @@ -103,33 +97,20 @@ public class WxEnergyMeterReading extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="表倍率",name="meterRate") | @io.swagger.annotations.ApiModelProperty(value="表倍率",name="meterRate") | ||||
| private String meterRate; | private String meterRate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="是否总表",name="isPublic") | |||||
| private Integer isPublic; | |||||
| @io.swagger.annotations.ApiModelProperty(value="表名",name="meterName") | @io.swagger.annotations.ApiModelProperty(value="表名",name="meterName") | ||||
| private String meterName; | private String meterName; | ||||
| @io.swagger.annotations.ApiModelProperty(value="店铺ID",name="shopId") | |||||
| private Long shopId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="店铺号",name="shopNumber") | |||||
| private String shopNumber; | |||||
| @io.swagger.annotations.ApiModelProperty(value="是否删除",name="isDel") | |||||
| private Integer isDel; | |||||
| @io.swagger.annotations.ApiModelProperty(value="楼座ID",name="buildingId") | |||||
| private Long buildingId; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="所属楼栋,有可能会是多个",name="buildingName") | |||||
| private String buildingName; | private String buildingName; | ||||
| @io.swagger.annotations.ApiModelProperty(value="楼层ID",name="floorId") | |||||
| private Long floorId; | |||||
| @TableField(exist = false) | |||||
| @io.swagger.annotations.ApiModelProperty(value="所属楼层,有可能会是多个",name="floorName") | |||||
| private String floorName; | private String floorName; | ||||
| @io.swagger.annotations.ApiModelProperty(value="单价",name="price") | |||||
| private String price; | |||||
| @io.swagger.annotations.ApiModelProperty(value="是否删除",name="isDel") | |||||
| private Integer isDel; | |||||
| @io.swagger.annotations.ApiModelProperty(value="所属店铺,有可能会是多个",name="shopName") | |||||
| private String shopName; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<WxEnergyMeterReading> meterReadingList; | private List<WxEnergyMeterReading> meterReadingList; | ||||
| @@ -138,105 +119,91 @@ public class WxEnergyMeterReading extends TenantEntity { | |||||
| private List<Long> shopIds; | private List<Long> shopIds; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String shopIdsStr; | private String shopIdsStr; | ||||
| @TableField(exist = false) | |||||
| private Long timeId; | |||||
| public static Map<String,String> generateExcelTitle() { | public static Map<String,String> generateExcelTitle() { | ||||
| Map<String,String> excelTitle = new LinkedHashMap<String,String>(); | Map<String,String> excelTitle = new LinkedHashMap<String,String>(); | ||||
| excelTitle.put("calcuteId", "编码"); | |||||
| excelTitle.put("id", "抄表数据编码"); | excelTitle.put("id", "抄表数据编码"); | ||||
| excelTitle.put("timeId", "时间区间"); | |||||
| excelTitle.put("startTime", "开始日期"); | excelTitle.put("startTime", "开始日期"); | ||||
| excelTitle.put("endTime", "截止日期"); | excelTitle.put("endTime", "截止日期"); | ||||
| excelTitle.put("feesId", "科目"); | |||||
| excelTitle.put("buildingId", "楼座"); | excelTitle.put("buildingId", "楼座"); | ||||
| excelTitle.put("floorId", "楼层"); | excelTitle.put("floorId", "楼层"); | ||||
| excelTitle.put("shopId", "店铺号"); | excelTitle.put("shopId", "店铺号"); | ||||
| excelTitle.put("meterId", "表号"); | excelTitle.put("meterId", "表号"); | ||||
| excelTitle.put("isPublic", "表类型"); | |||||
| excelTitle.put("meterType", "表类型"); | |||||
| excelTitle.put("preNumber", "上次抄表数"); | excelTitle.put("preNumber", "上次抄表数"); | ||||
| excelTitle.put("preTime", "上次抄表时间"); | excelTitle.put("preTime", "上次抄表时间"); | ||||
| excelTitle.put("curNumber", "本次抄表数"); | excelTitle.put("curNumber", "本次抄表数"); | ||||
| excelTitle.put("price", "单价(*)"); | |||||
| return excelTitle; | return excelTitle; | ||||
| } | } | ||||
| public Map<String,Object> generateExcelData(Map<Long, String> buildingMap,Map<Long, String> floorMap,WxEnergyFeesTime time,WxEnergyFees fees,WxEnergyReadingCalcute calcute) { | |||||
| public Map<String,Object> generateExcelData() { | |||||
| Map<String,Object> excelObject = new HashMap<String,Object>(); | Map<String,Object> excelObject = new HashMap<String,Object>(); | ||||
| excelObject.put("calcuteId", calcute.getId()); | |||||
| excelObject.put("id", this.getId()); | excelObject.put("id", this.getId()); | ||||
| excelObject.put("timeId", time.getName()); | |||||
| excelObject.put("startTime", DateUtils.formatDateTime(this.getStartTime())); | excelObject.put("startTime", DateUtils.formatDateTime(this.getStartTime())); | ||||
| excelObject.put("endTime", DateUtils.formatDateTime(this.getEndTime())); | excelObject.put("endTime", DateUtils.formatDateTime(this.getEndTime())); | ||||
| excelObject.put("feesId", fees.getName()); | |||||
| String buildingName = buildingMap.get(this.getBuildingId()); | |||||
| excelObject.put("buildingId", buildingName); | |||||
| String floorName = floorMap.get(this.getFloorId()); | |||||
| excelObject.put("floorId", floorName); | |||||
| excelObject.put("shopId", this.getShopNumber()); | |||||
| excelObject.put("buildingId", this.getBuildingName()); | |||||
| excelObject.put("floorId", this.getFloorName()); | |||||
| excelObject.put("shopId", this.getShopName()); | |||||
| excelObject.put("meterId", this.getMeterName()); | excelObject.put("meterId", this.getMeterName()); | ||||
| if (null != this.isPublic && this.isPublic.intValue() == EnumYesOrNo.YES.getCode().intValue()) { | |||||
| excelObject.put("isPublic", "总表"); | |||||
| }else { | |||||
| excelObject.put("isPublic", "用户表"); | |||||
| } | |||||
| excelObject.put("meterType", this.getMeterTypeName()); | |||||
| excelObject.put("preNumber", this.getPreNumber()); | excelObject.put("preNumber", this.getPreNumber()); | ||||
| excelObject.put("preTime", DateUtils.formatDateTime(this.getPreTime())); | excelObject.put("preTime", DateUtils.formatDateTime(this.getPreTime())); | ||||
| excelObject.put("curNumber", this.getCurNumber()); | excelObject.put("curNumber", this.getCurNumber()); | ||||
| if (calcute.getIsImported().intValue() == EnumYesOrNo.YES.getCode().intValue()) { | |||||
| excelObject.put("price", this.getPrice()); | |||||
| }else { | |||||
| excelObject.put("price", fees.getPrice()); | |||||
| } | |||||
| return excelObject; | return excelObject; | ||||
| } | } | ||||
| private WxAllBill generateBill(WxEnergyReadingCalcute calcute,WxMerchant merchant,MallUserInfo user,String needPay,String detail,String remark) { | private WxAllBill generateBill(WxEnergyReadingCalcute calcute,WxMerchant merchant,MallUserInfo user,String needPay,String detail,String remark) { | ||||
| WxAllBill daily = new WxAllBill(); | WxAllBill daily = new WxAllBill(); | ||||
| final IdWorker idWorker = IdWorker.get(); | |||||
| daily.setId(idWorker.nextId()); | |||||
| daily.updateTenantInfo(this); | |||||
| daily.setMerchantId(merchant.getId()); | |||||
| daily.setRentShopType(merchant.getType()); | |||||
| daily.setCreatetime(new Date()); | |||||
| daily.setCreateBy(user.getId()); | |||||
| daily.setCreateByName(user.getName()); | |||||
| daily.setUpdateBy(user.getId()); | |||||
| daily.setUpdateByName(user.getName()); | |||||
| daily.setUpdatetime(new Date()); | |||||
| daily.setReceivePay(needPay); | |||||
| daily.setNeedPay(needPay); | |||||
| daily.setPay("0"); | |||||
| daily.setStarttime(this.startTime); | |||||
| daily.setEndtime(this.endTime); | |||||
| daily.setOwe(needPay); | |||||
| daily.setShopId(this.shopId); | |||||
| daily.setShopNumber(this.shopNumber); | |||||
| daily.setBillType(EnumBillAllType.DAILY.getCode()); | |||||
| daily.setEnergyFeesId(calcute.getFeesId()); | |||||
| daily.setPriceDetail(detail); | |||||
| daily.setServiceChargePay("0"); | |||||
| daily.setBillRemark(remark); | |||||
| daily.setIsPreview(EnumYesOrNo.NO.getCode()); | |||||
| daily.setEnergyReadingCalcuteId(calcute.getId()); | |||||
| daily.setEnergyReadingId(id); | |||||
| // final IdWorker idWorker = IdWorker.get(); | |||||
| // daily.setId(idWorker.nextId()); | |||||
| // daily.updateTenantInfo(this); | |||||
| // daily.setMerchantId(merchant.getId()); | |||||
| // daily.setRentShopType(merchant.getType()); | |||||
| // daily.setCreatetime(new Date()); | |||||
| // daily.setCreateBy(user.getId()); | |||||
| // daily.setCreateByName(user.getName()); | |||||
| // daily.setUpdateBy(user.getId()); | |||||
| // daily.setUpdateByName(user.getName()); | |||||
| // daily.setUpdatetime(new Date()); | |||||
| // daily.setReceivePay(needPay); | |||||
| // daily.setNeedPay(needPay); | |||||
| // daily.setPay("0"); | |||||
| // daily.setStarttime(this.startTime); | |||||
| // daily.setEndtime(this.endTime); | |||||
| // daily.setOwe(needPay); | |||||
| // daily.setShopId(this.shopId); | |||||
| // daily.setShopNumber(this.shopNumber); | |||||
| // daily.setBillType(EnumBillAllType.DAILY.getCode()); | |||||
| // daily.setEnergyFeesId(calcute.getFeesId()); | |||||
| // daily.setPriceDetail(detail); | |||||
| // daily.setServiceChargePay("0"); | |||||
| // daily.setBillRemark(remark); | |||||
| // daily.setIsPreview(EnumYesOrNo.NO.getCode()); | |||||
| // daily.setEnergyReadingCalcuteId(calcute.getId()); | |||||
| // daily.setEnergyReadingId(id); | |||||
| return daily; | return daily; | ||||
| } | } | ||||
| public WxAllBill generateUserBill(WxEnergyReadingCalcute calcute,WxMerchant merchant,MallUserInfo user,WxEnergyMeter meter) { | public WxAllBill generateUserBill(WxEnergyReadingCalcute calcute,WxMerchant merchant,MallUserInfo user,WxEnergyMeter meter) { | ||||
| BigDecimal dx = new BigDecimal(this.curNumber).subtract(new BigDecimal(this.preNumber)); | |||||
| BigDecimal needPay = new BigDecimal(this.price).multiply(dx).divide(new BigDecimal(meter.getRate())).setScale(2,RoundingMode.HALF_UP); | |||||
| if (needPay.compareTo(new BigDecimal(0)) <= 0 ) { | |||||
| return null; | |||||
| } | |||||
| String detail = "单价:"+this.price+",上次读数:"+this.preNumber+",本次读数:"+this.curNumber+",读数差:"+dx.toPlainString()+",表倍率:"+meter.getRate()+",费用:"+needPay.toPlainString(); | |||||
| return generateBill(calcute,merchant, user, needPay.toPlainString(), detail, "抄表计算自动生成"); | |||||
| // BigDecimal dx = new BigDecimal(this.curNumber).subtract(new BigDecimal(this.preNumber)); | |||||
| // BigDecimal needPay = new BigDecimal(this.price).multiply(dx).divide(new BigDecimal(meter.getRate())).setScale(2,RoundingMode.HALF_UP); | |||||
| // if (needPay.compareTo(new BigDecimal(0)) <= 0 ) { | |||||
| // return null; | |||||
| // } | |||||
| // String detail = "单价:"+this.price+",上次读数:"+this.preNumber+",本次读数:"+this.curNumber+",读数差:"+dx.toPlainString()+",表倍率:"+meter.getRate()+",费用:"+needPay.toPlainString(); | |||||
| // return generateBill(calcute,merchant, user, needPay.toPlainString(), detail, "抄表计算自动生成"); | |||||
| return null; | |||||
| } | } | ||||
| public WxAllBill generatePublicBill(WxEnergyReadingCalcute calcute,WxMerchant merchant,MallUserInfo user,String needPay) { | public WxAllBill generatePublicBill(WxEnergyReadingCalcute calcute,WxMerchant merchant,MallUserInfo user,String needPay) { | ||||
| if (new BigDecimal(needPay).compareTo(new BigDecimal(0)) <= 0 ) { | |||||
| return null; | |||||
| } | |||||
| String detail = "单价:"+this.price+",费用:"+needPay; | |||||
| return generateBill(calcute,merchant, user, needPay, detail, "抄表计算自动生成公摊"); | |||||
| // if (new BigDecimal(needPay).compareTo(new BigDecimal(0)) <= 0 ) { | |||||
| // return null; | |||||
| // } | |||||
| // String detail = "单价:"+this.price+",费用:"+needPay; | |||||
| // return generateBill(calcute,merchant, user, needPay, detail, "抄表计算自动生成公摊"); | |||||
| return null; | |||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,68 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumEnergyMeterShopFloorType; | |||||
| import com.iformall.enums.EnumEnergyMeterType; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.ArrayList; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| @TableName(value = "wx_energy_meter_shop_floor") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxEnergyMeterShopFloor extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "表类型EnumEnergyMeterShopFloorType", name = "type") | |||||
| private Integer type; | |||||
| @TableField(exist = false) | |||||
| private String typeName; | |||||
| public String getTypeName() { | |||||
| if (null != type) { | |||||
| return EnumEnergyMeterShopFloorType.getEnum(type).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="表编号",name="meterId") | |||||
| private Long meterId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "关联的编号", name = "aliseId") | |||||
| private Long aliseId; | |||||
| @TableField(exist = false) | |||||
| private List<Long> shopIds; | |||||
| @TableField(exist = false) | |||||
| private List<Long> floorIds; | |||||
| @TableField(exist = false) | |||||
| private List<Long> buildingIds; | |||||
| @TableField(exist = false) | |||||
| private Integer physicsType; | |||||
| @TableField(exist = false) | |||||
| private List<Integer> typeList; | |||||
| @TableField(exist = false) | |||||
| private Long parentId; | |||||
| @TableField(exist = false) | |||||
| private String parentType; | |||||
| } | |||||
| @@ -12,6 +12,7 @@ import lombok.ToString; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.LinkedHashMap; | import java.util.LinkedHashMap; | ||||
| import java.util.List; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| /** | /** | ||||
| @@ -48,30 +49,15 @@ public class WxEnergyReadingCalcute extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="备注",name="remark") | @io.swagger.annotations.ApiModelProperty(value="备注",name="remark") | ||||
| private String remark; | private String remark; | ||||
| @io.swagger.annotations.ApiModelProperty(value="区间ID",name="timeId") | |||||
| private Long timeId; | |||||
| @TableField(exist = false) | |||||
| private String timeName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="所属年月",name="period") | |||||
| private String period; | |||||
| @io.swagger.annotations.ApiModelProperty(value="科目ID",name="feesId") | @io.swagger.annotations.ApiModelProperty(value="科目ID",name="feesId") | ||||
| private Long feesId; | private Long feesId; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String feesName; | private String feesName; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "isImported", name = "isImported") | |||||
| private Integer isImported; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "importSuccess", name = "importSuccess") | |||||
| private Integer importSuccess; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String importSuccessName; | |||||
| public String getImportSuccessName() { | |||||
| if (null != importSuccess && importSuccess.intValue() == EnumYesOrNo.YES.getCode().intValue()) { | |||||
| return "成功"; | |||||
| }else { | |||||
| return "未完成导入"; | |||||
| } | |||||
| } | |||||
| private String feesPhysicsTypeName; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "isCalcuted", name = "isCalcuted") | @io.swagger.annotations.ApiModelProperty(value = "isCalcuted", name = "isCalcuted") | ||||
| private Integer isCalcuted; | private Integer isCalcuted; | ||||
| @@ -91,4 +77,17 @@ public class WxEnergyReadingCalcute extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除", name = "isDel") | @io.swagger.annotations.ApiModelProperty(value = "是否删除", name = "isDel") | ||||
| private Integer isDel; | private Integer isDel; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺数", name = "shopSize") | |||||
| private Integer shopSize; | |||||
| @io.swagger.annotations.ApiModelProperty(value="所属年月",name="period") | |||||
| private String shop; | |||||
| @TableField(exist = false) | |||||
| private List<Long> shopIds; | |||||
| @TableField(exist = false) | |||||
| private List<Long> feesIds; | |||||
| @TableField(exist = false) | |||||
| private String feesIdsStr; | |||||
| } | } | ||||
| @@ -0,0 +1,61 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.utils.DateUtils; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.util.Date; | |||||
| import java.util.HashMap; | |||||
| import java.util.LinkedHashMap; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| /** | |||||
| */ | |||||
| @TableName(value = "wx_energy_reading_calcute_result") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxEnergyReadingCalcuteResult extends TenantEntity { | |||||
| private static final long serialVersionUID = 7009117540201976664L; | |||||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||||
| private Date updateTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="计算ID",name="calcuteId") | |||||
| private Long calcuteId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="店铺ID",name="shopId") | |||||
| private Long shopId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="科目ID",name="feesId") | |||||
| private Long feesId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="费用标准ID",name="feesCalcuteId") | |||||
| private Long feesCalcuteId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="表ID",name="meterId") | |||||
| private Long meterId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="抄表数据ID",name="readingId") | |||||
| private Long readingId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="金额",name="money") | |||||
| private String money; | |||||
| @TableField(exist = false) | |||||
| private List<Long> shopIds; | |||||
| } | |||||
| @@ -33,6 +33,12 @@ public class WxMallBuilding extends TenantEntity { | |||||
| private Date createDate; | private Date createDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | ||||
| private Date updateDate; | private Date updateDate; | ||||
| @TableField(exist = false) | |||||
| private String treeType="building"; | |||||
| @TableField(exist = false) | |||||
| private Long treeParentId = 0L; | |||||
| @TableField(exist = false) | |||||
| private String treeParentType=""; | |||||
| public void setBuildingName(String buildingName){ | public void setBuildingName(String buildingName){ | ||||
| this.buildingName = buildingName; | this.buildingName = buildingName; | ||||
| @@ -9,6 +9,7 @@ import lombok.EqualsAndHashCode; | |||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
| import java.util.ArrayList; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -39,6 +40,17 @@ public class WxMallFloor extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="地图",name="floorMap") | @io.swagger.annotations.ApiModelProperty(value="地图",name="floorMap") | ||||
| private String floorMap; | private String floorMap; | ||||
| @TableField(exist = false) | |||||
| private String treeType="floor"; | |||||
| @TableField(exist = false) | |||||
| private Long treeParentId; | |||||
| public Long getTreeParentId() { | |||||
| treeParentId = this.getBuildingId(); | |||||
| return treeParentId; | |||||
| } | |||||
| @TableField(exist = false) | |||||
| private String treeParentType="building"; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @io.swagger.annotations.ApiModelProperty(value="",name="") | @io.swagger.annotations.ApiModelProperty(value="",name="") | ||||
| @@ -53,4 +65,6 @@ public class WxMallFloor extends TenantEntity { | |||||
| return floorMaps; | return floorMaps; | ||||
| } | } | ||||
| @TableField(exist = false) | |||||
| private List<Long> buildingIdList; | |||||
| } | } | ||||
| @@ -149,6 +149,14 @@ public class WxShop extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租金单位", name = "rentUnit") | @io.swagger.annotations.ApiModelProperty(value = "租金单位", name = "rentUnit") | ||||
| private Integer rentUnit; | private Integer rentUnit; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "树里面的类型", name = "treeType") | |||||
| @TableField(exist = false) | |||||
| private String treeType = "shop"; | |||||
| @TableField(exist = false) | |||||
| private Long treeParentId; | |||||
| @TableField(exist = false) | |||||
| private String treeParentType="floor"; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer rent_unit; | private Integer rent_unit; | ||||
| @@ -18,7 +18,8 @@ public enum EnumCacheKey { | |||||
| COUPON_CHANNEL_STOCK(7, "couponChannelStock:couponChannelStock_"), | COUPON_CHANNEL_STOCK(7, "couponChannelStock:couponChannelStock_"), | ||||
| DOUYIN_LIVE_PAGE_LIST(8,"douyinLiveList"), | DOUYIN_LIVE_PAGE_LIST(8,"douyinLiveList"), | ||||
| OLD_DETAIL(9,"cc:"), | OLD_DETAIL(9,"cc:"), | ||||
| OLD_DETAIL_HTML(10,"ch:") | |||||
| OLD_DETAIL_HTML(10,"ch:"), | |||||
| OLD_COUPORDER_HTML(11,"cd:") | |||||
| ; | ; | ||||
| private static Map<Integer,EnumCacheKey> map = new HashMap<Integer,EnumCacheKey>(); | private static Map<Integer,EnumCacheKey> map = new HashMap<Integer,EnumCacheKey>(); | ||||
| static { | static { | ||||
| @@ -1,17 +1,18 @@ | |||||
| package com.iformall.enums; | package com.iformall.enums; | ||||
| /** | /** | ||||
| */ | */ | ||||
| public enum EnumEnergyPublicCalcuteRule { | |||||
| public enum EnumEnergyMeterPhysicsType { | |||||
| ALL(1,"按全部楼栋面积公摊"), | |||||
| BUILDING(2,"按所在楼栋面积公摊"), | |||||
| FLOOR(3, "按所在楼层面积公摊"), | |||||
| USER(1,"用户表"), | |||||
| PUBLIC(2,"公共表"), | |||||
| SUMMARY(3, "分摊总表"), | |||||
| ; | ; | ||||
| public static EnumEnergyPublicCalcuteRule getEnum(Integer code) { | |||||
| for (EnumEnergyPublicCalcuteRule value : values()) { | |||||
| public static EnumEnergyMeterPhysicsType getEnum(Integer code) { | |||||
| for (EnumEnergyMeterPhysicsType value : values()) { | |||||
| if (value.getCode().equals(code)) { | if (value.getCode().equals(code)) { | ||||
| return value; | return value; | ||||
| } | } | ||||
| @@ -22,7 +23,7 @@ public enum EnumEnergyPublicCalcuteRule { | |||||
| private Integer code; | private Integer code; | ||||
| private String message; | private String message; | ||||
| EnumEnergyPublicCalcuteRule(Integer code, String message) { | |||||
| EnumEnergyMeterPhysicsType(Integer code, String message) { | |||||
| this.code = code; | this.code = code; | ||||
| this.message = message; | this.message = message; | ||||
| } | } | ||||
| @@ -34,4 +35,5 @@ public enum EnumEnergyPublicCalcuteRule { | |||||
| public String getMessage() { | public String getMessage() { | ||||
| return message; | return message; | ||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,39 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| */ | |||||
| public enum EnumEnergyMeterShopFloorType { | |||||
| SHOP(1,"店铺"), | |||||
| FLOOR(2,"楼层"), | |||||
| BUILDING(3, "楼座"), | |||||
| ; | |||||
| public static EnumEnergyMeterShopFloorType getEnum(Integer code) { | |||||
| for (EnumEnergyMeterShopFloorType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumEnergyMeterShopFloorType(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxEnergyFeesShop; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxEnergyFeesShopMapper extends CommonMapper<WxEnergyFeesShop, Long> { | |||||
| List<WxEnergyFeesShop> findList(WxEnergyFeesShop wxBillRent); | |||||
| List<Long> findFeesIdList(WxEnergyFeesShop wxBillRent); | |||||
| WxEnergyFeesShop selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| } | |||||
| @@ -0,0 +1,25 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxEnergyFeesTimeShop; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxEnergyFeesTimeShopMapper extends CommonMapper<WxEnergyFeesTimeShop, Long> { | |||||
| List<WxEnergyFeesTimeShop> findList(WxEnergyFeesTimeShop wxBillRent); | |||||
| Integer findCount(WxEnergyFeesTimeShop wxBillRent); | |||||
| WxEnergyFeesTimeShop selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| void deleteByTimeId(@Param("timeId")Long timeId,@Param("tenantId")String tenantId); | |||||
| List<Long> findShopIdList(WxEnergyFeesTimeShop wxBillRent); | |||||
| List<Long> findTimeIdList(WxEnergyFeesTimeShop wxBillRent); | |||||
| } | |||||
| @@ -0,0 +1,21 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxEnergyMeterChild; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxEnergyMeterChildMapper extends CommonMapper<WxEnergyMeterChild, Long> { | |||||
| List<WxEnergyMeterChild> findList(WxEnergyMeterChild wxBillRent); | |||||
| WxEnergyMeterChild selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| List<Long> findChildMeterIdList(WxEnergyMeterChild wxBillRent); | |||||
| void deleteByCondition(WxEnergyMeterChild wxBillRent); | |||||
| } | |||||
| @@ -15,11 +15,5 @@ public interface WxEnergyMeterReadingMapper extends CommonMapper<WxEnergyMeterRe | |||||
| WxEnergyMeterReading selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | WxEnergyMeterReading selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | ||||
| String findAllSumMoney(WxEnergyMeterReading wxBillRent); | |||||
| List<Map> findBuildingSumMoney(WxEnergyMeterReading wxBillRent); | |||||
| List<Map> findFloorSumMoney(WxEnergyMeterReading wxBillRent); | |||||
| void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | ||||
| } | } | ||||
| @@ -0,0 +1,23 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxEnergyMeterShopFloor; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxEnergyMeterShopFloorMapper extends CommonMapper<WxEnergyMeterShopFloor, Long> { | |||||
| List<WxEnergyMeterShopFloor> findList(WxEnergyMeterShopFloor wxBillRent); | |||||
| WxEnergyMeterShopFloor selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| List<Long> findAliasIdList(WxEnergyMeterShopFloor wxBillRent); | |||||
| List<Long> findMeterIdList(WxEnergyMeterShopFloor wxBillRent); | |||||
| void deleteByConditon(WxEnergyMeterShopFloor wxBillRent); | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxEnergyReadingCalcuteResult; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxEnergyReadingCalcuteResultMapper extends CommonMapper<WxEnergyReadingCalcuteResult, Long> { | |||||
| List<WxEnergyReadingCalcuteResult> findList(WxEnergyReadingCalcuteResult wxBillRent); | |||||
| List<Long> findShopIdList(WxEnergyReadingCalcuteResult wxBillRent); | |||||
| WxEnergyReadingCalcuteResult selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||||
| } | |||||
| @@ -9,6 +9,7 @@ public interface WxMallBuildingMapper extends CommonMapper<WxMallBuilding, Strin | |||||
| List<WxMallBuilding> findList(WxMallBuilding wxMallBuilding); | List<WxMallBuilding> findList(WxMallBuilding wxMallBuilding); | ||||
| List<Long> findIdList(WxMallBuilding wxMallBuilding); | |||||
| void deleteByTenantId(String tenantId); | void deleteByTenantId(String tenantId); | ||||
| @@ -9,6 +9,8 @@ import java.util.Map; | |||||
| public interface WxMallFloorMapper extends CommonMapper<WxMallFloor, String> { | public interface WxMallFloorMapper extends CommonMapper<WxMallFloor, String> { | ||||
| List<WxMallFloor> findList(WxMallFloor wxMallFloor); | List<WxMallFloor> findList(WxMallFloor wxMallFloor); | ||||
| List<Long> getFloorIds(WxMallFloor wxMallFloor); | |||||
| int deleteByBuildingId(Long buildingId); | int deleteByBuildingId(Long buildingId); | ||||
| @@ -56,4 +56,6 @@ public interface WxShopMapper extends CommonMapper<WxShop, String> { | |||||
| * @return {@link List}<{@link CountShopByStatusDTO}> | * @return {@link List}<{@link CountShopByStatusDTO}> | ||||
| */ | */ | ||||
| List<CountShopByStatusDTO> countShopByStatus(@Param("tenantIds") List<String> tenantIds); | List<CountShopByStatusDTO> countShopByStatus(@Param("tenantIds") List<String> tenantIds); | ||||
| List<String> findShopNumberList(WxShop wxShop); | |||||
| } | } | ||||
| @@ -13,10 +13,14 @@ import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxEnergyFees; | import com.iformall.domain.po.WxEnergyFees; | ||||
| import com.iformall.domain.po.WxEnergyFeesSetoff; | import com.iformall.domain.po.WxEnergyFeesSetoff; | ||||
| import com.iformall.domain.po.WxEnergyFeesShop; | |||||
| import com.iformall.domain.po.WxEnergyFeesTime; | import com.iformall.domain.po.WxEnergyFeesTime; | ||||
| import com.iformall.domain.po.WxEnergyMeter; | import com.iformall.domain.po.WxEnergyMeter; | ||||
| import com.iformall.domain.po.WxEnergyMeterChild; | |||||
| import com.iformall.domain.po.WxEnergyMeterReading; | import com.iformall.domain.po.WxEnergyMeterReading; | ||||
| import com.iformall.domain.po.WxEnergyMeterShopFloor; | |||||
| import com.iformall.domain.po.WxEnergyReadingCalcute; | import com.iformall.domain.po.WxEnergyReadingCalcute; | ||||
| import com.iformall.domain.po.WxEnergyReadingCalcuteResult; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| /** | /** | ||||
| */ | */ | ||||
| @@ -26,28 +30,40 @@ public interface WxEnergyService { | |||||
| PageInfo<WxEnergyMeter> meterListAsPage(WxEnergyMeter record, Integer pageIndex, Integer pageSize); | PageInfo<WxEnergyMeter> meterListAsPage(WxEnergyMeter record, Integer pageIndex, Integer pageSize); | ||||
| WxEnergyMeter getMeterById(TenantEntity tenantEntity,Long id); | WxEnergyMeter getMeterById(TenantEntity tenantEntity,Long id); | ||||
| void saveOrUpdateMeter(WxEnergyMeter record); | void saveOrUpdateMeter(WxEnergyMeter record); | ||||
| void createMeterAlias(WxEnergyMeterShopFloor record); | |||||
| void createChildMeterAlias(WxEnergyMeterChild record); | |||||
| void deleteMeterAlias(WxEnergyMeterShopFloor record); | |||||
| void deleteChildMeterAlias(WxEnergyMeterChild record); | |||||
| void updateMeterIsDel(WxEnergyMeter record); | void updateMeterIsDel(WxEnergyMeter record); | ||||
| Map<Long,WxEnergyMeter> getMeterMap(WxEnergyMeter record); | Map<Long,WxEnergyMeter> getMeterMap(WxEnergyMeter record); | ||||
| void setMeterShop(WxEnergyMeter record); | |||||
| void setMeterFloor(WxEnergyMeter record); | |||||
| List<Long> getMeterIdList(WxEnergyMeterShopFloor record); | |||||
| List<Long> getChildMeterIdList(WxEnergyMeterChild record); | |||||
| //费用区间 | //费用区间 | ||||
| PageInfo<WxEnergyFeesTime> timeListAsPage(WxEnergyFeesTime record, Integer pageIndex, Integer pageSize); | PageInfo<WxEnergyFeesTime> timeListAsPage(WxEnergyFeesTime record, Integer pageIndex, Integer pageSize); | ||||
| void saveOrUpdateTime(WxEnergyFeesTime record); | void saveOrUpdateTime(WxEnergyFeesTime record); | ||||
| WxEnergyFeesTime getFeesTimeById(WxEnergyFeesTime record); | WxEnergyFeesTime getFeesTimeById(WxEnergyFeesTime record); | ||||
| Map<Long,WxEnergyFeesTime> getTimeMap(WxEnergyFeesTime record); | Map<Long,WxEnergyFeesTime> getTimeMap(WxEnergyFeesTime record); | ||||
| void setTimeIsDel(WxEnergyFeesTime record); | |||||
| void timeDel(WxEnergyFeesTime record); | |||||
| List<String> getTimeShopNumber(WxEnergyFeesTime record); | |||||
| //费用科目 | //费用科目 | ||||
| PageInfo<WxEnergyFees> feesListAsPage(WxEnergyFees record, Integer pageIndex, Integer pageSize,boolean isSetOff); | PageInfo<WxEnergyFees> feesListAsPage(WxEnergyFees record, Integer pageIndex, Integer pageSize,boolean isSetOff); | ||||
| void saveOrUpdateFees(WxEnergyFees record); | void saveOrUpdateFees(WxEnergyFees record); | ||||
| WxEnergyFees getFeesById(WxEnergyFees record); | |||||
| WxEnergyFees getFeesById(Long id,String tenantId); | |||||
| void setFeesIsDel(WxEnergyFees record); | void setFeesIsDel(WxEnergyFees record); | ||||
| Map<Long,WxEnergyFees> getFeesMap(WxEnergyFees record); | Map<Long,WxEnergyFees> getFeesMap(WxEnergyFees record); | ||||
| void initEnergyFees(TenantEntity tenantEntity); | void initEnergyFees(TenantEntity tenantEntity); | ||||
| List<Long> getAdvanceSetoffFeesids(WxEnergyFeesSetoff setoff); | List<Long> getAdvanceSetoffFeesids(WxEnergyFeesSetoff setoff); | ||||
| List<Long> getFeesIdList(WxEnergyFees record); | List<Long> getFeesIdList(WxEnergyFees record); | ||||
| //计算标砖 | |||||
| List<Map> getFeesCalcuteComponentList(WxEnergyFeesShop record); | |||||
| void createFeesShop(WxEnergyFeesShop record); | |||||
| void deleteFeesShop(WxEnergyFeesShop record); | |||||
| WxEnergyFeesShop getShopFeesCalcute(Long id,String tenantId); | |||||
| void saveOrUpdateShopFeesCalcute(WxEnergyFeesShop record); | |||||
| PageInfo<WxEnergyFeesShop> feesShopListAsPage(WxEnergyFeesShop record, Integer pageIndex, Integer pageSize); | |||||
| //抄表数据 | //抄表数据 | ||||
| PageInfo<WxEnergyMeterReading> readingListAsPage(WxEnergyMeterReading record, Integer pageIndex, Integer pageSize); | PageInfo<WxEnergyMeterReading> readingListAsPage(WxEnergyMeterReading record, Integer pageIndex, Integer pageSize); | ||||
| @@ -56,6 +72,8 @@ public interface WxEnergyService { | |||||
| void commitReading(WxEnergyMeterReading record,MallUserInfo userInfo); | void commitReading(WxEnergyMeterReading record,MallUserInfo userInfo); | ||||
| WxEnergyMeterReading getReadingById(WxEnergyMeterReading record); | WxEnergyMeterReading getReadingById(WxEnergyMeterReading record); | ||||
| void setReadingIsDel(WxEnergyMeterReading record); | void setReadingIsDel(WxEnergyMeterReading record); | ||||
| void exportReading(WxEnergyMeterReading record,HttpServletRequest request, HttpServletResponse response); | |||||
| void importReading(MultipartFile mFile, MallUserInfo user, HttpServletRequest request, HttpServletResponse response); | |||||
| //抄表科目计算数据 | //抄表科目计算数据 | ||||
| PageInfo<WxEnergyReadingCalcute> readingCalcuteListAsPage(WxEnergyReadingCalcute record, Integer pageIndex, Integer pageSize); | PageInfo<WxEnergyReadingCalcute> readingCalcuteListAsPage(WxEnergyReadingCalcute record, Integer pageIndex, Integer pageSize); | ||||
| @@ -65,4 +83,6 @@ public interface WxEnergyService { | |||||
| void importReadingCalcute(MultipartFile mFile, MallUserInfo user, HttpServletRequest request, HttpServletResponse response); | void importReadingCalcute(MultipartFile mFile, MallUserInfo user, HttpServletRequest request, HttpServletResponse response); | ||||
| Integer calcuteReading(WxEnergyReadingCalcute record, MallUserInfo user); | Integer calcuteReading(WxEnergyReadingCalcute record, MallUserInfo user); | ||||
| void setReadingCalcuteIsDel(WxEnergyReadingCalcute record); | void setReadingCalcuteIsDel(WxEnergyReadingCalcute record); | ||||
| List<String> getReadingCalcuteShopNumber(WxEnergyReadingCalcute record); | |||||
| } | } | ||||
| @@ -8,6 +8,7 @@ import com.iformall.domain.po.WxMallBuilding; | |||||
| import com.iformall.domain.po.WxMallFloor; | import com.iformall.domain.po.WxMallFloor; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import java.util.List; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| public interface WxMallBuildingService { | public interface WxMallBuildingService { | ||||
| @@ -56,6 +57,8 @@ public interface WxMallBuildingService { | |||||
| ResultData getBuildingList(TenantEntity tenantEntity); | ResultData getBuildingList(TenantEntity tenantEntity); | ||||
| ResultData getBuildingFloorList(WxMallBuilding wxMallBuilding,MallUserInfo mallUser); | ResultData getBuildingFloorList(WxMallBuilding wxMallBuilding,MallUserInfo mallUser); | ||||
| ResultData getBuildingList(WxMallBuilding wxMallBuilding,MallUserInfo mallUser); | |||||
| /** | /** | ||||
| * 新增楼层楼座 | * 新增楼层楼座 | ||||
| @@ -76,4 +79,6 @@ public interface WxMallBuildingService { | |||||
| void saveFloorImg(WxMallFloor floor); | void saveFloorImg(WxMallFloor floor); | ||||
| Map<Long, String> getBuildingMap(TenantEntity tenantInfo); | Map<Long, String> getBuildingMap(TenantEntity tenantInfo); | ||||
| List<Long> getBuildingIdList(WxMallBuilding wxMallBuilding); | |||||
| } | } | ||||
| @@ -5,6 +5,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxMallFloor; | import com.iformall.domain.po.WxMallFloor; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import java.util.List; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| public interface WxMallFloorService { | public interface WxMallFloorService { | ||||
| @@ -43,6 +44,8 @@ public interface WxMallFloorService { | |||||
| ResultData getFloorList(TenantEntity tenantEntity, Long buildingId); | ResultData getFloorList(TenantEntity tenantEntity, Long buildingId); | ||||
| List<Long> getFloorIdList(WxMallFloor record); | |||||
| void deleteByBuildingId(Long buildingId); | void deleteByBuildingId(Long buildingId); | ||||
| @@ -116,5 +116,7 @@ public interface WxShopService { | |||||
| List<Long> getFloorBuildShopIds(TenantEntity tenantEntity,String floorRule,Long building,Long floor,Integer shopDel) ; | List<Long> getFloorBuildShopIds(TenantEntity tenantEntity,String floorRule,Long building,Long floor,Integer shopDel) ; | ||||
| List<Long> getMerchantIds(WxShop wxShop); | List<Long> getMerchantIds(WxShop wxShop); | ||||
| List<String> getShopNumberList(WxShop wxShop); | |||||
| } | } | ||||
| @@ -0,0 +1,79 @@ | |||||
| package com.iformall.service.helper; | |||||
| import java.math.BigDecimal; | |||||
| import java.math.RoundingMode; | |||||
| import java.text.SimpleDateFormat; | |||||
| import java.util.ArrayList; | |||||
| import java.util.Calendar; | |||||
| import java.util.Date; | |||||
| import java.util.HashMap; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import org.apache.commons.collections4.CollectionUtils; | |||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.joda.time.DateTime; | |||||
| import org.joda.time.Months; | |||||
| import org.joda.time.format.DateTimeFormat; | |||||
| import org.joda.time.format.DateTimeFormatter; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import com.alibaba.fastjson.JSONArray; | |||||
| import com.alibaba.fastjson.JSONObject; | |||||
| import com.iformall.domain.dto.NeedPayDTO; | |||||
| import com.iformall.domain.po.WxEnergyFees; | |||||
| import com.iformall.domain.po.WxEnergyMeter; | |||||
| import com.iformall.domain.po.WxPropertyContract; | |||||
| import com.iformall.domain.po.WxRentContract; | |||||
| import com.iformall.domain.vo.WxBillFeesStandardsListVo; | |||||
| import com.iformall.enums.EnumContractReceivePeriodUnit; | |||||
| import com.iformall.enums.EnumFeesStandardsCalcuteUnit; | |||||
| import com.iformall.enums.EnumPriceUnit; | |||||
| import com.iformall.enums.EnumRentContractAdjustPeriod; | |||||
| import com.iformall.enums.EnumRentContractAdjustRatioWay; | |||||
| import com.iformall.enums.EnumRentContractRentInputWay; | |||||
| import com.iformall.enums.EnumRentContractType; | |||||
| import com.iformall.enums.EnumRentDayPriceCalcute; | |||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.service.impl.WxRentContractServiceImpl; | |||||
| import com.iformall.utils.Constant; | |||||
| import com.iformall.utils.DateUtils; | |||||
| public class WxEnergyHelper { | |||||
| public static List<Map> generateCalcuteComponent() { | |||||
| //公共表,公摊总表,当前楼栋面积,当前楼层面积,总面积,店铺公摊系数 | |||||
| List<Map> retList = new ArrayList<Map>(); | |||||
| Map currentBuildingArea = new HashMap(); | |||||
| currentBuildingArea.put("name", "店铺所属楼栋总计租面积"); | |||||
| currentBuildingArea.put("value", "{#currentBuildingArea#}"); | |||||
| retList.add(currentBuildingArea); | |||||
| Map currentFloorArea = new HashMap(); | |||||
| currentFloorArea.put("name", "店铺所属楼层总计租面积"); | |||||
| currentFloorArea.put("value", "{#currentFloorArea#}"); | |||||
| retList.add(currentFloorArea); | |||||
| Map totalArea = new HashMap(); | |||||
| totalArea.put("name", "商场总计租面积"); | |||||
| totalArea.put("value", "{#totalArea#}"); | |||||
| retList.add(totalArea); | |||||
| Map calcuteRax = new HashMap(); | |||||
| calcuteRax.put("name", "公摊系数"); | |||||
| calcuteRax.put("value", "{#calcuteRax#}"); | |||||
| retList.add(calcuteRax); | |||||
| return retList; | |||||
| } | |||||
| public static Map generateMeterComponent(WxEnergyMeter meter) { | |||||
| Map m = new HashMap(); | |||||
| m.put("name", meter.getName()); | |||||
| m.put("value", "{#meter_"+meter.getId()+"#}"); | |||||
| return m; | |||||
| } | |||||
| } | |||||
| @@ -969,10 +969,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| @Override | @Override | ||||
| public void createTempFees(WxAllBill record,MallUserInfo user) { | public void createTempFees(WxAllBill record,MallUserInfo user) { | ||||
| WxEnergyFees fq = new WxEnergyFees(); | |||||
| fq.updateTenantInfo(record); | |||||
| fq.setId(record.getEnergyFeesId()); | |||||
| WxEnergyFees fees = wxEnergyService.getFeesById(fq) ; | |||||
| WxEnergyFees fees = wxEnergyService.getFeesById(record.getEnergyFeesId(),record.getTenantId()) ; | |||||
| record.setBillType(fees.getBillType()); | record.setBillType(fees.getBillType()); | ||||
| WxMerchant merchant = wxMerchantService.selectById(record.getMerchantId()); | WxMerchant merchant = wxMerchantService.selectById(record.getMerchantId()); | ||||
| if (fees.getBillType().intValue() == EnumBillAllType.ADVANCE.getCode().intValue()) { | if (fees.getBillType().intValue() == EnumBillAllType.ADVANCE.getCode().intValue()) { | ||||
| @@ -183,6 +183,33 @@ public class WxMallBuildingServiceImpl implements WxMallBuildingService { | |||||
| return new ResultData(wxMallBuildings); | return new ResultData(wxMallBuildings); | ||||
| } | } | ||||
| @Override | |||||
| public ResultData getBuildingList(WxMallBuilding wxMallBuilding,MallUserInfo mallUser) { | |||||
| List<WxMallBuilding> wxMallBuildings = new ArrayList<WxMallBuilding>(); | |||||
| if (null != mallUser && null != wxMallBuilding.getFloorForRule()) { | |||||
| WxMallFloor wf = new WxMallFloor(); | |||||
| wf.updateTenantInfo(mallUser); | |||||
| wf.setFloorForRule(wxMallBuilding.getFloorForRule()); | |||||
| List<Long> bids = wxMallFloorMapper.getBuildindIds(wf); | |||||
| if (null == bids || bids.size() <= 0 ) { | |||||
| wxMallBuilding.setId(-1L); | |||||
| }else { | |||||
| wxMallBuilding.setIds(bids); | |||||
| } | |||||
| } | |||||
| List<WxMallBuilding> buildings = wxMallBuildingMapper.findList(wxMallBuilding); | |||||
| wxMallBuildings = buildings.stream().map(b -> { | |||||
| WxMallBuilding tempb = new WxMallBuilding(); | |||||
| tempb.setId(b.getId()); | |||||
| tempb.setTenantId(b.getTenantId()); | |||||
| tempb.setParentTenantId(b.getParentTenantId()); | |||||
| tempb.setName(b.getName()); | |||||
| tempb.setBuildingName(b.getBuildingName()); | |||||
| return tempb; | |||||
| }).collect(Collectors.toList()); | |||||
| return new ResultData(wxMallBuildings); | |||||
| } | |||||
| @Override | @Override | ||||
| public void addBuildingAndFloors(WxMallBuildingFloorDto record) { | public void addBuildingAndFloors(WxMallBuildingFloorDto record) { | ||||
| @@ -257,5 +284,9 @@ public class WxMallBuildingServiceImpl implements WxMallBuildingService { | |||||
| return maps; | return maps; | ||||
| } | } | ||||
| @Override | |||||
| public List<Long> getBuildingIdList(WxMallBuilding wxMallBuilding) { | |||||
| return wxMallBuildingMapper.findIdList(wxMallBuilding); | |||||
| } | |||||
| } | } | ||||
| @@ -69,6 +69,11 @@ public class WxMallFloorServiceImpl implements WxMallFloorService { | |||||
| List<WxMallFloor> list = wxMallFloorMapper.findList(wxMallFloor); | List<WxMallFloor> list = wxMallFloorMapper.findList(wxMallFloor); | ||||
| return new ResultData(list); | return new ResultData(list); | ||||
| } | } | ||||
| @Override | |||||
| public List<Long> getFloorIdList(WxMallFloor record) { | |||||
| return wxMallFloorMapper.getFloorIds(record); | |||||
| } | |||||
| @Override | @Override | ||||
| public void deleteByBuildingId(Long buildingId) { | public void deleteByBuildingId(Long buildingId) { | ||||
| @@ -97,7 +97,7 @@ public class WxOfflineActivityGrantAwardServiceImpl implements WxOfflineActivity | |||||
| handlerRecordQuery(wxOfflineActivityRecord); | handlerRecordQuery(wxOfflineActivityRecord); | ||||
| WxOfflineActivityRecord limitOne = wxOfflineActivityRecordMapper.selectLimitOne(wxOfflineActivityRecord); | WxOfflineActivityRecord limitOne = wxOfflineActivityRecordMapper.selectLimitOne(wxOfflineActivityRecord); | ||||
| Map<String, Object> result = new HashMap<>(); | Map<String, Object> result = new HashMap<>(); | ||||
| Integer audting = 0, audi_success = 0, audt_fail = 0; | |||||
| Integer audting = 0, audi_success = 0, audt_fail = 0,invalid = 0; | |||||
| BigDecimal sum_success = BigDecimal.ZERO, sum_fail = BigDecimal.ZERO; | BigDecimal sum_success = BigDecimal.ZERO, sum_fail = BigDecimal.ZERO; | ||||
| if (limitOne == null) { | if (limitOne == null) { | ||||
| result.put("cus_name","查无此人"); | result.put("cus_name","查无此人"); | ||||
| @@ -116,6 +116,8 @@ public class WxOfflineActivityGrantAwardServiceImpl implements WxOfflineActivity | |||||
| sum_success = statistics.getSumMoney(); | sum_success = statistics.getSumMoney(); | ||||
| } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | ||||
| audt_fail = statistics.getCount(); | audt_fail = statistics.getCount(); | ||||
| } else if (EnumOfflineActivityRecordStatus.INVALID.getCode().equals(statistics.getAuditStatus())) { | |||||
| invalid = statistics.getCount(); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -124,7 +126,8 @@ public class WxOfflineActivityGrantAwardServiceImpl implements WxOfflineActivity | |||||
| result.put("audi_success",audi_success); | result.put("audi_success",audi_success); | ||||
| result.put("sum_success",sum_success); | result.put("sum_success",sum_success); | ||||
| result.put("audt_fail",audt_fail); | result.put("audt_fail",audt_fail); | ||||
| result.put("sum_count",audting+audi_success+audt_fail); | |||||
| result.put("invalid",invalid); | |||||
| result.put("sum_count",audting+audi_success+audt_fail+invalid); | |||||
| return result; | return result; | ||||
| } | } | ||||
| @@ -4,11 +4,13 @@ import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; | |||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.common.Result; | |||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.OfflineActivityRecordStatistics; | import com.iformall.domain.vo.OfflineActivityRecordStatistics; | ||||
| import com.iformall.enums.EnumOfflineActivityRecordStatus; | import com.iformall.enums.EnumOfflineActivityRecordStatus; | ||||
| import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.mapper.WxMerchantMapper; | import com.iformall.mapper.WxMerchantMapper; | ||||
| import com.iformall.mapper.WxOfflineActivityGrantAwardMapper; | import com.iformall.mapper.WxOfflineActivityGrantAwardMapper; | ||||
| import com.iformall.mapper.WxOfflineActivityRecordGrantMapper; | import com.iformall.mapper.WxOfflineActivityRecordGrantMapper; | ||||
| @@ -166,6 +168,10 @@ public class WxOfflineActivityRecordServiceImpl implements WxOfflineActivityReco | |||||
| wxOfflineActivityRecordMapper.insert(wxOfflineActivityRecord); | wxOfflineActivityRecordMapper.insert(wxOfflineActivityRecord); | ||||
| } | } | ||||
| else{ | else{ | ||||
| WxOfflineActivityRecord record = wxOfflineActivityRecordMapper.selectById(wxOfflineActivityRecord.getId()); | |||||
| if(!EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(record.getAuditStatus())){ | |||||
| throw new MallinkException(Result.ERROR,"订单状态不允许修改"); | |||||
| } | |||||
| wxOfflineActivityRecord.setAuditRemark(""); | wxOfflineActivityRecord.setAuditRemark(""); | ||||
| wxOfflineActivityRecord.setAuditStatus(EnumOfflineActivityRecordStatus.AUDTING.getCode()); | wxOfflineActivityRecord.setAuditStatus(EnumOfflineActivityRecordStatus.AUDTING.getCode()); | ||||
| wxOfflineActivityRecord.setUpdateDate(now); | wxOfflineActivityRecord.setUpdateDate(now); | ||||
| @@ -192,7 +198,7 @@ public class WxOfflineActivityRecordServiceImpl implements WxOfflineActivityReco | |||||
| public Map<String, Integer> getStatistics(WxOfflineActivityRecord wxOfflineActivityRecord) { | public Map<String, Integer> getStatistics(WxOfflineActivityRecord wxOfflineActivityRecord) { | ||||
| List<OfflineActivityRecordStatistics> auditStatusStatistics = wxOfflineActivityRecordMapper.auditStatusStatistics(wxOfflineActivityRecord); | List<OfflineActivityRecordStatistics> auditStatusStatistics = wxOfflineActivityRecordMapper.auditStatusStatistics(wxOfflineActivityRecord); | ||||
| Map<String, Integer> result = new HashMap<>(); | Map<String, Integer> result = new HashMap<>(); | ||||
| Integer audting = 0, audi_success = 0, audt_fail = 0; | |||||
| Integer audting = 0, audi_success = 0, audt_fail = 0, invalid = 0; | |||||
| for(OfflineActivityRecordStatistics statistics : auditStatusStatistics){ | for(OfflineActivityRecordStatistics statistics : auditStatusStatistics){ | ||||
| if(EnumOfflineActivityRecordStatus.AUDTING.getCode().equals(statistics.getAuditStatus())){ | if(EnumOfflineActivityRecordStatus.AUDTING.getCode().equals(statistics.getAuditStatus())){ | ||||
| audting = statistics.getCount(); | audting = statistics.getCount(); | ||||
| @@ -200,12 +206,15 @@ public class WxOfflineActivityRecordServiceImpl implements WxOfflineActivityReco | |||||
| audi_success = statistics.getCount(); | audi_success = statistics.getCount(); | ||||
| } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | ||||
| audt_fail = statistics.getCount(); | audt_fail = statistics.getCount(); | ||||
| } else if (EnumOfflineActivityRecordStatus.INVALID.getCode().equals(statistics.getAuditStatus())) { | |||||
| invalid = statistics.getCount(); | |||||
| } | } | ||||
| } | } | ||||
| result.put("audting",audting); | result.put("audting",audting); | ||||
| result.put("audi_success",audi_success); | result.put("audi_success",audi_success); | ||||
| result.put("audt_fail",audt_fail); | result.put("audt_fail",audt_fail); | ||||
| result.put("sum_count",audting+audi_success+audt_fail); | |||||
| result.put("invalid",invalid); | |||||
| result.put("sum_count",audting+audi_success+audt_fail+invalid); | |||||
| return result; | return result; | ||||
| } | } | ||||
| @@ -89,7 +89,7 @@ public class WxOfflineActivityServiceImpl implements WxOfflineActivityService{ | |||||
| wxOfflineActivityRecord.setNotMerchantIdList(merchantIds); | wxOfflineActivityRecord.setNotMerchantIdList(merchantIds); | ||||
| } | } | ||||
| List<OfflineActivityRecordStatistics> auditStatusStatistics = wxOfflineActivityRecordMapper.auditStatusStatistics(wxOfflineActivityRecord); | List<OfflineActivityRecordStatistics> auditStatusStatistics = wxOfflineActivityRecordMapper.auditStatusStatistics(wxOfflineActivityRecord); | ||||
| Integer audting = 0, audi_success = 0, audt_fail = 0; | |||||
| Integer audting = 0, audi_success = 0, audt_fail = 0, invalid = 0; | |||||
| for(OfflineActivityRecordStatistics statistics : auditStatusStatistics){ | for(OfflineActivityRecordStatistics statistics : auditStatusStatistics){ | ||||
| if(EnumOfflineActivityRecordStatus.AUDTING.getCode().equals(statistics.getAuditStatus())){ | if(EnumOfflineActivityRecordStatus.AUDTING.getCode().equals(statistics.getAuditStatus())){ | ||||
| audting = statistics.getCount(); | audting = statistics.getCount(); | ||||
| @@ -97,9 +97,11 @@ public class WxOfflineActivityServiceImpl implements WxOfflineActivityService{ | |||||
| audi_success = statistics.getCount(); | audi_success = statistics.getCount(); | ||||
| } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | } else if (EnumOfflineActivityRecordStatus.AUDT_FAIL.getCode().equals(statistics.getAuditStatus())) { | ||||
| audt_fail = statistics.getCount(); | audt_fail = statistics.getCount(); | ||||
| }else if (EnumOfflineActivityRecordStatus.INVALID.getCode().equals(statistics.getAuditStatus())) { | |||||
| invalid = statistics.getCount(); | |||||
| } | } | ||||
| } | } | ||||
| activity.setRecordCount(audting+audi_success+audt_fail); | |||||
| activity.setRecordCount(audting+audi_success+audt_fail+invalid); | |||||
| activity.setWaitRecordCount(audting); | activity.setWaitRecordCount(audting); | ||||
| activity.setSuccessRecordCount(audi_success); | activity.setSuccessRecordCount(audi_success); | ||||
| @@ -798,4 +798,9 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| merchantShopQ.setShopIdList(shopIds); | merchantShopQ.setShopIdList(shopIds); | ||||
| return wxMerchantShopMapper.findMerchantIdList(merchantShopQ); | return wxMerchantShopMapper.findMerchantIdList(merchantShopQ); | ||||
| } | } | ||||
| @Override | |||||
| public List<String> getShopNumberList(WxShop wxShop) { | |||||
| return wxShopMapper.findShopNumberList(wxShop); | |||||
| } | |||||
| } | } | ||||
| @@ -182,4 +182,9 @@ public class CouponCacheUtils { | |||||
| return RedisCacheUtils.getCacheObject(template, key,WxCouponCVo.class); | return RedisCacheUtils.getCacheObject(template, key,WxCouponCVo.class); | ||||
| } | } | ||||
| public static void removeOldCouponOrderHtmlCache(RedisTemplate<String, Object> template) { | |||||
| String key = EnumCacheKey.OLD_COUPORDER_HTML.getMessage(); | |||||
| RedisCacheUtils.removeCachePrefix(template, key); | |||||
| } | |||||
| } | } | ||||
| @@ -226,7 +226,7 @@ | |||||
| sum(CAST(ifnull(pay,'0') AS DECIMAL(20,2))) paid, | sum(CAST(ifnull(pay,'0') AS DECIMAL(20,2))) paid, | ||||
| min(starttime) min_date, | min(starttime) min_date, | ||||
| max(endtime) max_date, | max(endtime) max_date, | ||||
| sum(CAST(ifnull(set_off,'0)' AS DECIMAL(20,2))) set_off , | |||||
| sum(CAST(ifnull(set_off,'0') AS DECIMAL(20,2))) set_off , | |||||
| sum(CAST(ifnull(return_pay,'0') AS DECIMAL(20,2))) return_pay | sum(CAST(ifnull(return_pay,'0') AS DECIMAL(20,2))) return_pay | ||||
| from wx_all_bill | from wx_all_bill | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| @@ -10,7 +10,6 @@ | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="name" jdbcType="VARCHAR" property="name"/> | <result column="name" jdbcType="VARCHAR" property="name"/> | ||||
| <result column="price" jdbcType="VARCHAR" property="price"/> | <result column="price" jdbcType="VARCHAR" property="price"/> | ||||
| <result column="public_calcute" jdbcType="INTEGER" property="publicCalcute"/> | |||||
| <result column="type" jdbcType="INTEGER" property="type"/> | <result column="type" jdbcType="INTEGER" property="type"/> | ||||
| <result column="bill_type" jdbcType="INTEGER" property="billType"/> | <result column="bill_type" jdbcType="INTEGER" property="billType"/> | ||||
| <result column="is_system" jdbcType="INTEGER" property="isSystem"/> | <result column="is_system" jdbcType="INTEGER" property="isSystem"/> | ||||
| @@ -19,11 +18,12 @@ | |||||
| <result column="time_unit" jdbcType="INTEGER" property="timeUnit"/> | <result column="time_unit" jdbcType="INTEGER" property="timeUnit"/> | ||||
| <result column="tax_rate" jdbcType="VARCHAR" property="taxRate"/> | <result column="tax_rate" jdbcType="VARCHAR" property="taxRate"/> | ||||
| <result column="is_despoit" jdbcType="INTEGER" property="isDespoit"/> | <result column="is_despoit" jdbcType="INTEGER" property="isDespoit"/> | ||||
| <result column="is_public" jdbcType="INTEGER" property="isPublic"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`price`,`public_calcute`,`type`,`bill_type`,`is_system`, | |||||
| `fixed_price`,`calcute_unit`,`time_unit`,`tax_rate`,`is_despoit` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`price`,`type`,`bill_type`,`is_system`, | |||||
| `fixed_price`,`calcute_unit`,`time_unit`,`tax_rate`,`is_despoit`,`is_public` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -36,7 +36,6 @@ | |||||
| and `parent_tenant_id` = #{parentTenantId} | and `parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | <if test=" null != isDel ">and `is_del` = #{isDel}</if> | ||||
| <if test=" null != publicCalcute ">and `public_calcute` = #{publicCalcute}</if> | |||||
| <if test=" null != type ">and `type` = #{type}</if> | <if test=" null != type ">and `type` = #{type}</if> | ||||
| <if test=" null != billType ">and `bill_type` = #{billType}</if> | <if test=" null != billType ">and `bill_type` = #{billType}</if> | ||||
| <if test=" null != notSetOff ">and `bill_type` != 6</if> | <if test=" null != notSetOff ">and `bill_type` != 6</if> | ||||
| @@ -46,6 +45,7 @@ | |||||
| <if test=" null != timeUnit ">and `time_unit` = #{timeUnit}</if> | <if test=" null != timeUnit ">and `time_unit` = #{timeUnit}</if> | ||||
| <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if> | <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if> | ||||
| <if test=" null != isDespoit ">and `is_despoit` = #{isDespoit}</if> | <if test=" null != isDespoit ">and `is_despoit` = #{isDespoit}</if> | ||||
| <if test=" null != isPublic ">and `is_public` = #{isPublic}</if> | |||||
| <if test=" null != billTypeList "> | <if test=" null != billTypeList "> | ||||
| and bill_type in | and bill_type in | ||||
| <foreach collection="billTypeList" index="index" item="billTypeItem" open="(" separator="," close=")"> | <foreach collection="billTypeList" index="index" item="billTypeItem" open="(" separator="," close=")"> | ||||
| @@ -0,0 +1,75 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.iformall.mapper.WxEnergyFeesShopMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxEnergyFeesShop"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||||
| <result column="price" jdbcType="VARCHAR" property="price"/> | |||||
| <result column="is_public" jdbcType="INTEGER" property="isPublic"/> | |||||
| <result column="formula" jdbcType="VARCHAR" property="formula"/> | |||||
| <result column="formula_content" jdbcType="VARCHAR" property="formulaContent"/> | |||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`price`,`is_public`,`formula`,`formula_content`,`shop_id`,`fees_id` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1=1 | |||||
| <if test=" null != id ">and `id` = #{id}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | |||||
| <if test=" null != shopId ">and `shop_id` = #{shopId}</if> | |||||
| <if test=" null != isPublic ">and `is_public` = #{isPublic}</if> | |||||
| <if test=" null != shopIds "> | |||||
| and shop_id in | |||||
| <foreach collection="shopIds" index="index" item="sidItem" open="(" separator="," close=")"> | |||||
| #{sidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != feesIds "> | |||||
| and fees_id in | |||||
| <foreach collection="feesIds" index="index" item="fidItem" open="(" separator="," close=")"> | |||||
| #{fidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxEnergyFeesShop" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_fees_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_fees_shop where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| <select id="findFeesIdList" parameterType="com.iformall.domain.po.WxEnergyFeesShop" resultType="Long"> | |||||
| select distinct fees_id | |||||
| from wx_energy_fees_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | |||||
| @@ -7,15 +7,15 @@ | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | ||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | ||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||||
| <result column="type" jdbcType="INTEGER" property="type"/> | <result column="type" jdbcType="INTEGER" property="type"/> | ||||
| <result column="name" jdbcType="VARCHAR" property="name"/> | |||||
| <result column="start_time" jdbcType="TIMESTAMP" property="startTime"/> | <result column="start_time" jdbcType="TIMESTAMP" property="startTime"/> | ||||
| <result column="end_time" jdbcType="TIMESTAMP" property="endTime"/> | <result column="end_time" jdbcType="TIMESTAMP" property="endTime"/> | ||||
| <result column="period" jdbcType="VARCHAR" property="period"/> | |||||
| <result column="shop_size" jdbcType="INTEGER" property="shopSize"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`type`,`start_time`,`end_time` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`type`,`start_time`,`end_time`,`period`,`shop_size` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -27,9 +27,10 @@ | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | <if test=" null != parentTenantId and '' != parentTenantId"> | ||||
| and `parent_tenant_id` = #{parentTenantId} | and `parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | |||||
| <if test=" null != period and '' != period"> | |||||
| and `period` = #{period} | |||||
| </if> | |||||
| <if test=" null != type ">and `type` = #{type}</if> | <if test=" null != type ">and `type` = #{type}</if> | ||||
| <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -0,0 +1,86 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.iformall.mapper.WxEnergyFeesTimeShopMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxEnergyFeesTimeShop"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||||
| <result column="period" jdbcType="VARCHAR" property="period"/> | |||||
| <result column="time_id" jdbcType="BIGINT" property="timeId"/> | |||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||||
| <result column="type" jdbcType="INTEGER" property="type"/> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`period`,`time_id`,`shop_id`,`type` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1=1 | |||||
| <if test=" null != id ">and `id` = #{id}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != period and '' != period"> | |||||
| and `period` = #{period} | |||||
| </if> | |||||
| <if test=" null != type ">and `type` = #{type}</if> | |||||
| <if test=" null != timeId ">and `time_id` = #{timeId}</if> | |||||
| <if test=" null != shopId ">and `shop_id` = #{shopId}</if> | |||||
| <if test=" null != shopIds "> | |||||
| and shop_id in | |||||
| <foreach collection="shopIds" index="index" item="sidItem" open="(" separator="," close=")"> | |||||
| #{sidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxEnergyFeesTimeShop" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_fees_time_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="findCount" parameterType="com.iformall.domain.po.WxEnergyFeesTimeShop" resultType="Integer"> | |||||
| select count(1) | |||||
| from wx_energy_fees_time_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_fees_time_shop where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| <delete id="deleteByTimeId" parameterType="HashMap"> | |||||
| delete from wx_energy_fees_time_shop where `tenant_id` = #{tenantId} and `time_id` = #{timeId} | |||||
| </delete> | |||||
| <select id="findShopIdList" parameterType="com.iformall.domain.po.WxEnergyFeesTimeShop" resultType="Long"> | |||||
| select distinct shop_id | |||||
| from wx_energy_fees_time_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="findTimeIdList" parameterType="com.iformall.domain.po.WxEnergyFeesTimeShop" resultType="Long"> | |||||
| select distinct time_id | |||||
| from wx_energy_fees_time_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | |||||
| @@ -0,0 +1,62 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.iformall.mapper.WxEnergyMeterChildMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxEnergyMeterChild"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||||
| <result column="parent_meter_id" jdbcType="BIGINT" property="parentMeterId"/> | |||||
| <result column="child_meter_id" jdbcType="BIGINT" property="childMeterId"/> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`parent_meter_id`,`child_meter_id` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1=1 | |||||
| <if test=" null != id ">and `id` = #{id}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != parentMeterId ">and `parent_meter_id` = #{parentMeterId}</if> | |||||
| <if test=" null != childMeterId ">and `child_meter_id` = #{childMeterId}</if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxEnergyMeterChild" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_meter_child | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_meter_child where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| <select id="findChildMeterIdList" parameterType="com.iformall.domain.po.WxEnergyMeterChild" resultType="Long"> | |||||
| select distinct child_meter_id | |||||
| from wx_energy_meter_child | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <delete id = "deleteByCondition" parameterType="com.iformall.domain.po.WxEnergyMeterChild" > | |||||
| delete from wx_energy_meter_child where `tenant_id` = #{tenantId} and `parent_meter_id` = #{parentMeterId} and `child_meter_id` = #{childMeterId} | |||||
| </delete> | |||||
| </mapper> | |||||
| @@ -11,15 +11,12 @@ | |||||
| <result column="type" jdbcType="INTEGER" property="type"/> | <result column="type" jdbcType="INTEGER" property="type"/> | ||||
| <result column="name" jdbcType="VARCHAR" property="name"/> | <result column="name" jdbcType="VARCHAR" property="name"/> | ||||
| <result column="rate" jdbcType="VARCHAR" property="rate"/> | <result column="rate" jdbcType="VARCHAR" property="rate"/> | ||||
| <result column="is_public" jdbcType="INTEGER" property="isPublic"/> | |||||
| <result column="building_id" jdbcType="BIGINT" property="buildingId"/> | |||||
| <result column="floor_id" jdbcType="BIGINT" property="floorId"/> | |||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||||
| <result column="physics_type" jdbcType="INTEGER" property="physicsType"/> | |||||
| <result column="shop_type" jdbcType="INTEGER" property="shopType"/> | <result column="shop_type" jdbcType="INTEGER" property="shopType"/> | ||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`type`,`rate`,`is_public`,`building_id`,`floor_id`,`shop_id`,`shop_type` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`type`,`rate`,`physics_type`,`shop_type` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -33,24 +30,15 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | <if test=" null != isDel ">and `is_del` = #{isDel}</if> | ||||
| <if test=" null != type ">and `type` = #{type}</if> | <if test=" null != type ">and `type` = #{type}</if> | ||||
| <if test=" null != isPublic ">and `is_public` = #{isPublic}</if> | |||||
| <if test=" null != buildingId ">and `building_id` = #{buildingId}</if> | |||||
| <if test=" null != floorId ">and `floor_id` = #{floorId}</if> | |||||
| <if test=" null != shopId ">and `shop_id` = #{shopId}</if> | |||||
| <if test=" null != physicsType ">and `physics_type` = #{physicsType}</if> | |||||
| <if test=" null != shopType ">and `shop_type` = #{shopType}</if> | <if test=" null != shopType ">and `shop_type` = #{shopType}</if> | ||||
| <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if> | <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if> | ||||
| <if test=" null != floorForRule and '' != floorForRule "> | |||||
| and `floor_id` in (${floorForRule}) | |||||
| </if> | |||||
| <if test=" null != shopTypeForRule and '' != shopTypeForRule "> | |||||
| and `shop_type` in (${shopTypeForRule}) | |||||
| </if> | |||||
| <if test=" null != shopIds "> | |||||
| and shop_id in | |||||
| <foreach collection="shopIds" index="index" item="sidItem" open="(" separator="," close=")"> | |||||
| #{sidItem} | |||||
| <if test=" null != physicsTypeList "> | |||||
| and physics_type in | |||||
| <foreach collection="physicsTypeList" index="index" item="ptidItem" open="(" separator="," close=")"> | |||||
| #{ptidItem} | |||||
| </foreach> | </foreach> | ||||
| </if> | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -19,23 +19,19 @@ | |||||
| <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | ||||
| <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | ||||
| <result column="remark" jdbcType="VARCHAR" property="remark"/> | <result column="remark" jdbcType="VARCHAR" property="remark"/> | ||||
| <result column="time_id" jdbcType="BIGINT" property="timeId"/> | |||||
| <result column="meter_id" jdbcType="BIGINT" property="meterId"/> | <result column="meter_id" jdbcType="BIGINT" property="meterId"/> | ||||
| <result column="meter_type" jdbcType="INTEGER" property="meterType"/> | <result column="meter_type" jdbcType="INTEGER" property="meterType"/> | ||||
| <result column="meter_rate" jdbcType="VARCHAR" property="meterRate"/> | <result column="meter_rate" jdbcType="VARCHAR" property="meterRate"/> | ||||
| <result column="is_public" jdbcType="INTEGER" property="isPublic"/> | |||||
| <result column="meter_name" jdbcType="VARCHAR" property="meterName"/> | <result column="meter_name" jdbcType="VARCHAR" property="meterName"/> | ||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||||
| <result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/> | |||||
| <result column="building_id" jdbcType="BIGINT" property="buildingId"/> | |||||
| <result column="floor_id" jdbcType="BIGINT" property="floorId"/> | |||||
| <result column="price" jdbcType="VARCHAR" property="price"/> | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="building_name" jdbcType="VARCHAR" property="buildingName"/> | |||||
| <result column="floor_name" jdbcType="VARCHAR" property="floorName"/> | |||||
| <result column="shop_name" jdbcType="VARCHAR" property="shopName"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`cur_number`,`pre_number`,`pre_time`,`pre_by`,`pre_by_name`,`start_time`,`end_time`,`create_by`,`create_by_name`, | `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`cur_number`,`pre_number`,`pre_time`,`pre_by`,`pre_by_name`,`start_time`,`end_time`,`create_by`,`create_by_name`, | ||||
| `update_by`,`update_by_name`,`remark`,`time_id`,`meter_id`,`meter_type`,`meter_rate`,`is_public`,`meter_name`,`shop_id`,`shop_number`,`building_id`,`floor_id`,`price`,`is_del` | |||||
| `update_by`,`update_by_name`,`remark`,`meter_id`,`meter_type`,`meter_rate`,`meter_name`,`is_del`,`building_name`,`floor_name`,`shop_name` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -48,15 +44,9 @@ | |||||
| and `parent_tenant_id` = #{parentTenantId} | and `parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != createBy ">and `create_by` = #{createBy}</if> | <if test=" null != createBy ">and `create_by` = #{createBy}</if> | ||||
| <if test=" null != timeId ">and `time_id` = #{timeId}</if> | |||||
| <if test=" null != meterId ">and `meter_id` = #{meterId}</if> | <if test=" null != meterId ">and `meter_id` = #{meterId}</if> | ||||
| <if test=" null != meterType ">and `meter_type` = #{meterType}</if> | <if test=" null != meterType ">and `meter_type` = #{meterType}</if> | ||||
| <if test=" null != isPublic ">and `is_public` = #{isPublic}</if> | |||||
| <if test=" null != meterName and '' != meterName ">and meter_name like concat('%', #{meterName},'%')</if> | <if test=" null != meterName and '' != meterName ">and meter_name like concat('%', #{meterName},'%')</if> | ||||
| <if test=" null != shopId ">and `shop_id` = #{shopId}</if> | |||||
| <if test=" null != shopNumber and '' != shopNumber ">and shop_number like concat('%', #{shopNumber},'%')</if> | |||||
| <if test=" null != buildingId ">and `building_id` = #{buildingId}</if> | |||||
| <if test=" null != floorId ">and `floor_id` = #{floorId}</if> | |||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | <if test=" null != isDel ">and `is_del` = #{isDel}</if> | ||||
| <if test=" null != createByName and '' != createByName ">and create_by_name like concat('%', #{createByName},'%')</if> | <if test=" null != createByName and '' != createByName ">and create_by_name like concat('%', #{createByName},'%')</if> | ||||
| <if test=" null != shopIds "> | <if test=" null != shopIds "> | ||||
| @@ -87,26 +77,6 @@ | |||||
| from wx_energy_meter_reading where id = #{id} and `tenant_id` = #{tenantId} | from wx_energy_meter_reading where id = #{id} and `tenant_id` = #{tenantId} | ||||
| </select> | </select> | ||||
| <select id="findAllSumMoney" parameterType="com.iformall.domain.po.WxEnergyMeterReading" resultType="string"> | |||||
| select sum((CAST(cur_number AS DECIMAL(20,4)) - CAST(pre_number AS DECIMAL(20,4)))*(CAST(price AS DECIMAL(20,4))) / (CAST(meter_rate AS DECIMAL(20,4)))) as money | |||||
| from wx_energy_meter_reading | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="findBuildingSumMoney" parameterType="com.iformall.domain.po.WxEnergyMeterReading" resultType="hashmap"> | |||||
| select building_id, sum((CAST(cur_number AS DECIMAL(20,4)) - CAST(pre_number AS DECIMAL(20,4)))*(CAST(price AS DECIMAL(20,4))) / (CAST(meter_rate AS DECIMAL(20,4)))) as money | |||||
| from wx_energy_meter_reading | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| group by building_id | |||||
| </select> | |||||
| <select id="findFloorSumMoney" parameterType="com.iformall.domain.po.WxEnergyMeterReading" resultType="hashmap"> | |||||
| select floor_id, sum((CAST(cur_number AS DECIMAL(20,4)) - CAST(pre_number AS DECIMAL(20,4)))*(CAST(price AS DECIMAL(20,4))) / (CAST(meter_rate AS DECIMAL(20,4)))) as money | |||||
| from wx_energy_meter_reading | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| group by floor_id | |||||
| </select> | |||||
| <update id = "setIsDel" parameterType="HashMap"> | <update id = "setIsDel" parameterType="HashMap"> | ||||
| update wx_energy_meter_reading set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | update wx_energy_meter_reading set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | ||||
| </update> | </update> | ||||
| @@ -0,0 +1,76 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.iformall.mapper.WxEnergyMeterShopFloorMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxEnergyMeterShopFloor"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||||
| <result column="type" jdbcType="INTEGER" property="type"/> | |||||
| <result column="meter_id" jdbcType="BIGINT" property="meterId"/> | |||||
| <result column="alise_id" jdbcType="BIGINT" property="aliseId"/> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`type`,`meter_id`,`alise_id` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1=1 | |||||
| <if test=" null != id ">and `id` = #{id}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != type ">and `type` = #{type}</if> | |||||
| <if test=" null != meterId ">and `meter_id` = #{meterId}</if> | |||||
| <if test=" null != aliseId ">and `alise_id` = #{aliseId}</if> | |||||
| <if test=" null != typeList "> | |||||
| and type in | |||||
| <foreach collection="typeList" index="index" item="tidItem" open="(" separator="," close=")"> | |||||
| #{tidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxEnergyMeterShopFloor" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_meter_shop_floor | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_meter_shop_floor where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| <select id="findAliasIdList" parameterType="com.iformall.domain.po.WxEnergyMeterShopFloor" resultType="Long"> | |||||
| select distinct alise_id | |||||
| from wx_energy_meter_shop_floor | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="findMeterIdList" parameterType="com.iformall.domain.po.WxEnergyMeterShopFloor" resultType="Long"> | |||||
| select distinct meter_id | |||||
| from wx_energy_meter_shop_floor | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <delete id="deleteByConditon" parameterType="com.iformall.domain.po.WxEnergyMeterShopFloor" > | |||||
| delete from wx_energy_meter_shop_floor where `tenant_id` = #{tenantId} and type = #{type} and alise_id = #{aliseId} and meter_id = #{meterId} | |||||
| </delete> | |||||
| </mapper> | |||||
| @@ -11,19 +11,19 @@ | |||||
| <result column="create_by_name" jdbcType="VARCHAR" property="createByName"/> | <result column="create_by_name" jdbcType="VARCHAR" property="createByName"/> | ||||
| <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | ||||
| <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | ||||
| <result column="remark" jdbcType="VARCHAR" property="remark"/> | |||||
| <result column="time_id" jdbcType="BIGINT" property="timeId"/> | |||||
| <result column="remark" jdbcType="VARCHAR" property="remark"/> | |||||
| <result column="period" jdbcType="VARCHAR" property="period"/> | |||||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | ||||
| <result column="is_calcuted" jdbcType="INTEGER" property="isCalcuted"/> | <result column="is_calcuted" jdbcType="INTEGER" property="isCalcuted"/> | ||||
| <result column="is_imported" jdbcType="INTEGER" property="isImported"/> | |||||
| <result column="import_success" jdbcType="INTEGER" property="importSuccess"/> | |||||
| <result column="calcute_success" jdbcType="INTEGER" property="calcuteSuccess"/> | <result column="calcute_success" jdbcType="INTEGER" property="calcuteSuccess"/> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="shop_size" jdbcType="INTEGER" property="shopSize"/> | |||||
| <result column="shop" jdbcType="VARCHAR" property="shop"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`create_by`,`create_by_name`, | `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`create_by`,`create_by_name`, | ||||
| `update_by`,`update_by_name`,`remark`,`time_id`,`fees_id`,`is_calcuted`,`is_imported`,`import_success`,`calcute_success`,`is_del` | |||||
| `update_by`,`update_by_name`,`remark`,`period`,`fees_id`,`is_calcuted`,`calcute_success`,`is_del`,`shop_size`,`shop` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -35,14 +35,20 @@ | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | <if test=" null != parentTenantId and '' != parentTenantId"> | ||||
| and `parent_tenant_id` = #{parentTenantId} | and `parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != period and '' != period"> | |||||
| and `period` = #{period} | |||||
| </if> | |||||
| <if test=" null != createBy ">and `create_by` = #{createBy}</if> | <if test=" null != createBy ">and `create_by` = #{createBy}</if> | ||||
| <if test=" null != timeId ">and `time_id` = #{timeId}</if> | |||||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | ||||
| <if test=" null != isCalcuted ">and `is_calcuted` = #{isCalcuted}</if> | <if test=" null != isCalcuted ">and `is_calcuted` = #{isCalcuted}</if> | ||||
| <if test=" null != isImported ">and `is_imported` = #{isImported}</if> | |||||
| <if test=" null != importSuccess ">and `import_success` = #{importSuccess}</if> | |||||
| <if test=" null != calcuteSuccess ">and `calcute_success` = #{calcuteSuccess}</if> | <if test=" null != calcuteSuccess ">and `calcute_success` = #{calcuteSuccess}</if> | ||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | |||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | |||||
| <if test=" null != feesIds "> | |||||
| and fees_id in | |||||
| <foreach collection="feesIds" index="index" item="fidItem" open="(" separator="," close=")"> | |||||
| #{fidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -0,0 +1,67 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||||
| <mapper namespace="com.iformall.mapper.WxEnergyReadingCalcuteResultMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxEnergyReadingCalcuteResult"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||||
| <result column="calcute_id" jdbcType="BIGINT" property="calcuteId"/> | |||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | |||||
| <result column="fees_calcute_id" jdbcType="BIGINT" property="feesCalcuteId"/> | |||||
| <result column="meter_id" jdbcType="BIGINT" property="meterId"/> | |||||
| <result column="reading_id" jdbcType="BIGINT" property="readingId"/> | |||||
| <result column="money" jdbcType="VARCHAR" property="money" /> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`calcute_id`,`shop_id`,`fees_id`,`fees_calcute_id`,`meter_id`,`reading_id`,`money` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1=1 | |||||
| <if test=" null != id ">and `id` = #{id}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != calcuteId ">and `calcute_id` = #{calcuteId}</if> | |||||
| <if test=" null != shopId ">and `shop_id` = #{shopId}</if> | |||||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | |||||
| <if test=" null != feesCalcuteId ">and `fees_calcute_id` = #{feesCalcuteId}</if> | |||||
| <if test=" null != meterId ">and `meter_id` = #{meterId}</if> | |||||
| <if test=" null != readingId ">and `reading_id` = #{readingId}</if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxEnergyReadingCalcuteResult" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_reading_calcute_result | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_energy_reading_calcute_result where id = #{id} and `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| <select id="findShopIdList" parameterType="com.iformall.domain.po.WxEnergyReadingCalcuteResult" resultType="Long"> | |||||
| select distinct shop_id | |||||
| from wx_energy_reading_calcute_result | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | |||||
| @@ -73,7 +73,12 @@ | |||||
| from wx_mall_building | from wx_mall_building | ||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id="findIdList" parameterType="com.iformall.domain.po.WxMallBuilding" resultType="Long"> | |||||
| select id | |||||
| from wx_mall_building | |||||
| <include refid="dynamicWhereConditions" /> | |||||
| </select> | |||||
| <delete id="deleteByTenantId"> | <delete id="deleteByTenantId"> | ||||
| delete from wx_mall_building where `tenant_id` = #{tenantId} | delete from wx_mall_building where `tenant_id` = #{tenantId} | ||||
| @@ -63,7 +63,12 @@ | |||||
| <if test=" null != floorForRule and '' != floorForRule "> | <if test=" null != floorForRule and '' != floorForRule "> | ||||
| and `id` in (${floorForRule}) | and `id` in (${floorForRule}) | ||||
| </if> | </if> | ||||
| <if test=" null != buildingIdList "> | |||||
| and building_id in | |||||
| <foreach collection="buildingIdList" index="index" item="bidItem" open="(" separator="," close=")"> | |||||
| #{bidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -79,6 +84,12 @@ | |||||
| from wx_mall_floor | from wx_mall_floor | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="getFloorIds" parameterType="com.iformall.domain.po.WxMallFloor" resultType="Long"> | |||||
| select id | |||||
| from wx_mall_floor | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| <delete id="deleteByBuildingId"> | <delete id="deleteByBuildingId"> | ||||
| @@ -677,5 +677,10 @@ | |||||
| GROUP BY | GROUP BY | ||||
| `status`; | `status`; | ||||
| </select> | </select> | ||||
| <select id="findShopNumberList" parameterType="com.iformall.domain.po.WxShop" resultType="String"> | |||||
| select shop_number from wx_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||