gongdecai 2 năm trước cách đây
mục cha
commit
982c66a6ac

+ 102 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/wuye/IWuyeAmountInfoAppService.java

@@ -0,0 +1,102 @@
+package com.iotechn.unimall.app.api.wuye;
+
+
+import com.iotechn.unimall.core.annotation.HttpMethod;
+import com.iotechn.unimall.core.annotation.HttpOpenApi;
+import com.iotechn.unimall.core.annotation.HttpParam;
+import com.iotechn.unimall.core.annotation.HttpParamType;
+import com.iotechn.unimall.core.annotation.param.NotNull;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.wuye.WuyeAmountInfo;
+import com.iotechn.unimall.data.model.Page;
+
+import java.util.Date;
+
+/**
+ * infoService接口
+ *
+ * @author jlb
+ * @date 2022-10-12
+ */
+@HttpOpenApi(group = "wuyeAmountInfoApp", description = "info")
+public interface IWuyeAmountInfoAppService {
+    @HttpMethod(description = "新增", permission = "admin:wuye:wuyeAmountInfo:add", permissionParentName = "宠物管理", permissionName = "info管理")
+    public Boolean add(@NotNull @HttpParam(name = "wuyeAmountInfo", type = HttpParamType.COMMON, description = "info") WuyeAmountInfo wuyeAmountInfo,
+                       @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;
+
+    @HttpMethod(description = "列表", permission = "admin:wuye:wuyeAmountInfo:list", permissionParentName = "宠物管理", permissionName = "info管理")
+    public Page<WuyeAmountInfo> list(
+            @HttpParam(name = "buildingNo", type = HttpParamType.COMMON, description = "楼号") String buildingNo,
+            @HttpParam(name = "unitNo", type = HttpParamType.COMMON, description = "单元号") String unitNo,
+            @HttpParam(name = "floor", type = HttpParamType.COMMON, description = "楼层") String floor,
+            @HttpParam(name = "sourceNumber", type = HttpParamType.COMMON, description = "房源号") String sourceNumber,
+            @HttpParam(name = "householder", type = HttpParamType.COMMON, description = "户主") String householder,
+            @HttpParam(name = "predictedArea", type = HttpParamType.COMMON, description = "预测面积") Double predictedArea,
+            @HttpParam(name = "actualMoney", type = HttpParamType.COMMON, description = "实际面积") Double actualMoney,
+            @HttpParam(name = "propertyFee", type = HttpParamType.COMMON, description = "一年物业费(1.6元/平)") Double propertyFee,
+            @HttpParam(name = "elevatorFee", type = HttpParamType.COMMON, description = "一年电梯费(一层30元/月,每增加一层累加3元/月)") Double elevatorFee,
+            @HttpParam(name = "parkingSpace", type = HttpParamType.COMMON, description = "一年车位管理费(单独150元/月,子母225元/月)") Double parkingSpace,
+            @HttpParam(name = "cheweiNo", type = HttpParamType.COMMON, description = "车位号") String cheweiNo,
+            @HttpParam(name = "garage", type = HttpParamType.COMMON, description = "一年车库管理费(单独150元/月,子母225元/月)") Double garage,
+            @HttpParam(name = "garageNo", type = HttpParamType.COMMON, description = "车库号") String garageNo,
+            @HttpParam(name = "warehouse", type = HttpParamType.COMMON, description = "一年仓库管理费(200元/年)") Double warehouse,
+            @HttpParam(name = "warehouseNo", type = HttpParamType.COMMON, description = "仓库号") String warehouseNo,
+            @HttpParam(name = "garbageClearing", type = HttpParamType.COMMON, description = "垃圾清运费(平层建筑面积3元/平,带地下及阁楼5元/平)") Double garbageClearing,
+            @HttpParam(name = "paymentDate", type = HttpParamType.COMMON, description = "缴费日期") Date paymentDate,
+            @HttpParam(name = "paymentMethod", type = HttpParamType.COMMON, description = "缴费方式") String paymentMethod,
+            @HttpParam(name = "totalActualPayment", type = HttpParamType.COMMON, description = "实际缴费总合计") Double totalActualPayment,
+            @HttpParam(name = "paymentRange", type = HttpParamType.COMMON, description = "缴费区间") String paymentRange,
+            @HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Long deleteFlag,
+            @HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+            @HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+            @HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
+            @HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
+            @HttpParam(name = "pageNum", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+            @HttpParam(name = "pageSize", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit)
+            throws ServiceException;
+
+    @HttpMethod(description = "删除", permission = "admin:wuye:wuyeAmountInfo:delete", permissionParentName = "宠物管理", permissionName = "info管理")
+    public Boolean delete(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") Long id) throws ServiceException;
+
+    @HttpMethod(description = "修改", permission = "admin:wuyeAmountInfo:wuyeAmountInfo:update", permissionParentName = "宠物管理", permissionName = "info管理")
+    public Boolean update(@NotNull @HttpParam(name = "wuyeAmountInfo", type = HttpParamType.COMMON, description = "info") WuyeAmountInfo wuyeAmountInfo,
+                          @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;
+
+    @HttpMethod(description = "查询", permission = "admin:wuye:wuyeAmountInfo:get", permissionParentName = "宠物管理", permissionName = "info管理")
+    public WuyeAmountInfo get(@NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "") Long id) throws ServiceException;
+
+    @HttpMethod(description = "查询")
+    public WuyeAmountInfo getInfo(@NotNull @HttpParam(name = "wuyeAmountInfo", type = HttpParamType.COMMON, description = "info") WuyeAmountInfo wuyeAmountInfo
+    ) throws ServiceException;
+
+    @HttpMethod(description = "导出excl表", permission = "admin:wuye:wuyeAmountInfo:export", permissionParentName = "宠物管理", permissionName = "info管理")
+    public String export(
+            @HttpParam(name = "buildingNo", type = HttpParamType.COMMON, description = "楼号") String buildingNo,
+            @HttpParam(name = "unitNo", type = HttpParamType.COMMON, description = "单元号") String unitNo,
+            @HttpParam(name = "floor", type = HttpParamType.COMMON, description = "楼层") String floor,
+            @HttpParam(name = "sourceNumber", type = HttpParamType.COMMON, description = "房源号") String sourceNumber,
+            @HttpParam(name = "householder", type = HttpParamType.COMMON, description = "户主") String householder,
+            @HttpParam(name = "predictedArea", type = HttpParamType.COMMON, description = "预测面积") Double predictedArea,
+            @HttpParam(name = "actualMoney", type = HttpParamType.COMMON, description = "实际面积") Double actualMoney,
+            @HttpParam(name = "propertyFee", type = HttpParamType.COMMON, description = "一年物业费(1.6元/平)") Double propertyFee,
+            @HttpParam(name = "elevatorFee", type = HttpParamType.COMMON, description = "一年电梯费(一层30元/月,每增加一层累加3元/月)") Double elevatorFee,
+            @HttpParam(name = "parkingSpace", type = HttpParamType.COMMON, description = "一年车位管理费(单独150元/月,子母225元/月)") Double parkingSpace,
+            @HttpParam(name = "cheweiNo", type = HttpParamType.COMMON, description = "车位号") String cheweiNo,
+            @HttpParam(name = "garage", type = HttpParamType.COMMON, description = "一年车库管理费(单独150元/月,子母225元/月)") Double garage,
+            @HttpParam(name = "garageNo", type = HttpParamType.COMMON, description = "车库号") String garageNo,
+            @HttpParam(name = "warehouse", type = HttpParamType.COMMON, description = "一年仓库管理费(200元/年)") Double warehouse,
+            @HttpParam(name = "warehouseNo", type = HttpParamType.COMMON, description = "仓库号") String warehouseNo,
+            @HttpParam(name = "garbageClearing", type = HttpParamType.COMMON, description = "垃圾清运费(平层建筑面积3元/平,带地下及阁楼5元/平)") Double garbageClearing,
+            @HttpParam(name = "paymentDate", type = HttpParamType.COMMON, description = "缴费日期") Date paymentDate,
+            @HttpParam(name = "paymentMethod", type = HttpParamType.COMMON, description = "缴费方式") String paymentMethod,
+            @HttpParam(name = "totalActualPayment", type = HttpParamType.COMMON, description = "实际缴费总合计") Double totalActualPayment,
+            @HttpParam(name = "paymentRange", type = HttpParamType.COMMON, description = "缴费区间") String paymentRange,
+            @HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "删除标识") Long deleteFlag,
+            @HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
+            @HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+            @HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
+            @HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
+            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
+            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit) throws ServiceException;
+
+}

+ 237 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/wuye/WuyeAmountInfoServiceAppImpl.java

@@ -0,0 +1,237 @@
+package com.iotechn.unimall.app.api.wuye;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.iotechn.unimall.core.exception.ServiceException;
+import com.iotechn.unimall.data.domain.wuye.WuyeAmountInfo;
+import com.iotechn.unimall.data.mapper.wuye.WuyeAmountInfoMapper;
+import com.iotechn.unimall.data.model.Page;
+import com.iotechn.unimall.data.util.ExcelUtil;
+import org.apache.ibatis.session.RowBounds;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * infoService业务层处理
+ *
+ * @author jlb
+ * @date 2022-10-12
+ */
+@Service
+public class WuyeAmountInfoServiceAppImpl implements IWuyeAmountInfoAppService {
+    @Autowired
+    private WuyeAmountInfoMapper wuyeAmountInfoMapper;
+
+    @Override
+    public Boolean add(WuyeAmountInfo wuyeAmountInfo, Long adminId) throws ServiceException {
+        Date now = new Date();
+        wuyeAmountInfo.setGmtCreate(now);
+        wuyeAmountInfo.setGmtUpdate(now);
+        wuyeAmountInfo.setAdminId(adminId);
+        return wuyeAmountInfoMapper.insert(wuyeAmountInfo) > 0;
+    }
+
+    @Override
+    public Page<WuyeAmountInfo> list(String buildingNo, String unitNo, String floor, String sourceNumber, String householder, Double predictedArea, Double actualMoney, Double propertyFee, Double elevatorFee, Double parkingSpace, String cheweiNo, Double garage, String garageNo, Double warehouse, String warehouseNo, Double garbageClearing, Date paymentDate, String paymentMethod, Double totalActualPayment, String paymentRange, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<WuyeAmountInfo> wrapper = new EntityWrapper<WuyeAmountInfo>();
+        if (!StringUtils.isEmpty(buildingNo)) {
+            wrapper.eq("building_no", buildingNo);
+        }
+        if (!StringUtils.isEmpty(unitNo)) {
+            wrapper.eq("unit_no", unitNo);
+        }
+        if (!StringUtils.isEmpty(floor)) {
+            wrapper.eq("floor", floor);
+        }
+        if (!StringUtils.isEmpty(sourceNumber)) {
+            wrapper.eq("source_number", sourceNumber);
+        }
+        if (!StringUtils.isEmpty(householder)) {
+            wrapper.eq("householder", householder);
+        }
+        if (!StringUtils.isEmpty(predictedArea)) {
+            wrapper.eq("predicted_area", predictedArea);
+        }
+        if (!StringUtils.isEmpty(actualMoney)) {
+            wrapper.eq("actual_money", actualMoney);
+        }
+        if (!StringUtils.isEmpty(propertyFee)) {
+            wrapper.eq("property_fee", propertyFee);
+        }
+        if (!StringUtils.isEmpty(elevatorFee)) {
+            wrapper.eq("elevator_fee", elevatorFee);
+        }
+        if (!StringUtils.isEmpty(parkingSpace)) {
+            wrapper.eq("parking_space", parkingSpace);
+        }
+        if (!StringUtils.isEmpty(cheweiNo)) {
+            wrapper.eq("chewei_no", cheweiNo);
+        }
+        if (!StringUtils.isEmpty(garage)) {
+            wrapper.eq("garage", garage);
+        }
+        if (!StringUtils.isEmpty(garageNo)) {
+            wrapper.eq("garage_no", garageNo);
+        }
+        if (!StringUtils.isEmpty(warehouse)) {
+            wrapper.eq("warehouse", warehouse);
+        }
+        if (!StringUtils.isEmpty(warehouseNo)) {
+            wrapper.eq("warehouse_no", warehouseNo);
+        }
+        if (!StringUtils.isEmpty(garbageClearing)) {
+            wrapper.eq("garbage_clearing", garbageClearing);
+        }
+        if (!StringUtils.isEmpty(paymentDate)) {
+            wrapper.eq("payment_date", paymentDate);
+        }
+        if (!StringUtils.isEmpty(paymentMethod)) {
+            wrapper.eq("payment_method", paymentMethod);
+        }
+        if (!StringUtils.isEmpty(totalActualPayment)) {
+            wrapper.eq("total_actual_payment", totalActualPayment);
+        }
+        if (!StringUtils.isEmpty(paymentRange)) {
+            wrapper.eq("payment_range", paymentRange);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        wrapper.eq("delete_flag", 0);
+        List<WuyeAmountInfo> list = wuyeAmountInfoMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+        Integer count = wuyeAmountInfoMapper.selectCount(wrapper);
+        return new Page<WuyeAmountInfo>(list, page, limit, count);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(Long id) {
+        String[] ids = String.valueOf(id).split(",");
+        for (String tt : ids) {
+            WuyeAmountInfo tmp = wuyeAmountInfoMapper.selectById(Long.parseLong(tt));
+            if (tmp != null) {
+                tmp.setDeleteFlag(1L);
+                wuyeAmountInfoMapper.updateById(tmp);
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public Boolean update(WuyeAmountInfo wuyeAmountInfo, Long adminId) throws ServiceException {
+        Date now = new Date();
+        wuyeAmountInfo.setGmtUpdate(now);
+        wuyeAmountInfo.setAdminId(adminId);
+        return wuyeAmountInfoMapper.updateById(wuyeAmountInfo) > 0;
+    }
+
+    @Override
+    public WuyeAmountInfo get(Long id) throws ServiceException {
+        return wuyeAmountInfoMapper.selectById(id);
+    }
+
+	@Override
+	public WuyeAmountInfo getInfo(WuyeAmountInfo wuyeAmountInfo) throws ServiceException {
+		return wuyeAmountInfoMapper.selectOne(wuyeAmountInfo);
+	}
+
+    @Override
+    public String export(String buildingNo, String unitNo, String floor, String sourceNumber, String householder, Double predictedArea, Double actualMoney, Double propertyFee, Double elevatorFee, Double parkingSpace, String cheweiNo, Double garage, String garageNo, Double warehouse, String warehouseNo, Double garbageClearing, Date paymentDate, String paymentMethod, Double totalActualPayment, String paymentRange, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+        Wrapper<WuyeAmountInfo> wrapper = new EntityWrapper<WuyeAmountInfo>();
+        if (!StringUtils.isEmpty(buildingNo)) {
+            wrapper.eq("building_no", buildingNo);
+        }
+        if (!StringUtils.isEmpty(unitNo)) {
+            wrapper.eq("unit_no", unitNo);
+        }
+        if (!StringUtils.isEmpty(floor)) {
+            wrapper.eq("floor", floor);
+        }
+        if (!StringUtils.isEmpty(sourceNumber)) {
+            wrapper.eq("source_number", sourceNumber);
+        }
+        if (!StringUtils.isEmpty(householder)) {
+            wrapper.eq("householder", householder);
+        }
+        if (!StringUtils.isEmpty(predictedArea)) {
+            wrapper.eq("predicted_area", predictedArea);
+        }
+        if (!StringUtils.isEmpty(actualMoney)) {
+            wrapper.eq("actual_money", actualMoney);
+        }
+        if (!StringUtils.isEmpty(propertyFee)) {
+            wrapper.eq("property_fee", propertyFee);
+        }
+        if (!StringUtils.isEmpty(elevatorFee)) {
+            wrapper.eq("elevator_fee", elevatorFee);
+        }
+        if (!StringUtils.isEmpty(parkingSpace)) {
+            wrapper.eq("parking_space", parkingSpace);
+        }
+        if (!StringUtils.isEmpty(cheweiNo)) {
+            wrapper.eq("chewei_no", cheweiNo);
+        }
+        if (!StringUtils.isEmpty(garage)) {
+            wrapper.eq("garage", garage);
+        }
+        if (!StringUtils.isEmpty(garageNo)) {
+            wrapper.eq("garage_no", garageNo);
+        }
+        if (!StringUtils.isEmpty(warehouse)) {
+            wrapper.eq("warehouse", warehouse);
+        }
+        if (!StringUtils.isEmpty(warehouseNo)) {
+            wrapper.eq("warehouse_no", warehouseNo);
+        }
+        if (!StringUtils.isEmpty(garbageClearing)) {
+            wrapper.eq("garbage_clearing", garbageClearing);
+        }
+        if (!StringUtils.isEmpty(paymentDate)) {
+            wrapper.eq("payment_date", paymentDate);
+        }
+        if (!StringUtils.isEmpty(paymentMethod)) {
+            wrapper.eq("payment_method", paymentMethod);
+        }
+        if (!StringUtils.isEmpty(totalActualPayment)) {
+            wrapper.eq("total_actual_payment", totalActualPayment);
+        }
+        if (!StringUtils.isEmpty(paymentRange)) {
+            wrapper.eq("payment_range", paymentRange);
+        }
+        if (!StringUtils.isEmpty(deleteFlag)) {
+            wrapper.eq("delete_flag", deleteFlag);
+        }
+        if (!StringUtils.isEmpty(gmtCreate)) {
+            wrapper.eq("gmt_create", gmtCreate);
+        }
+        if (!StringUtils.isEmpty(gmtUpdate)) {
+            wrapper.eq("gmt_update", gmtUpdate);
+        }
+        if (!StringUtils.isEmpty(userId)) {
+            wrapper.eq("user_id", userId);
+        }
+        if (!StringUtils.isEmpty(adminId)) {
+            wrapper.eq("admin_id", adminId);
+        }
+        List<WuyeAmountInfo> list = wuyeAmountInfoMapper.selectList(wrapper);
+        ExcelUtil<WuyeAmountInfo> util = new ExcelUtil<WuyeAmountInfo>(WuyeAmountInfo.class);
+        return util.exportExcel(list, "操作日志");
+    }
+}