diff --git a/jeecg-boot/docker-compose.yml b/jeecg-boot/docker-compose.yml index 6912d212..c43d55af 100644 --- a/jeecg-boot/docker-compose.yml +++ b/jeecg-boot/docker-compose.yml @@ -31,8 +31,7 @@ services: container_name: jeecg-boot-redis networks: - jeecg-boot - - jeecg-boot-system: + jeecg-boot-system: build: context: ./jeecg-module-system/jeecg-system-start restart: on-failure diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/controller/TianxianGongcanController.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/controller/TianxianGongcanController.java new file mode 100644 index 00000000..f771a0c7 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/controller/TianxianGongcanController.java @@ -0,0 +1,300 @@ +package org.jeecg.modules.tianxian.controller; + +import java.io.UnsupportedEncodingException; +import java.io.IOException; +import java.net.URLDecoder; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.util.stream.Collectors; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.jeecg.modules.tianxian.entity.TianXianVo; +import org.jeecg.modules.tianxian.mapper.TianxianGongcanMapper; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.vo.LoginUser; +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.tianxian.entity.TianxianGongcanXiaoquData; +import org.jeecg.modules.tianxian.entity.TianxianGongcan; +import org.jeecg.modules.tianxian.vo.TianxianGongcanPage; +import org.jeecg.modules.tianxian.service.ITianxianGongcanService; +import org.jeecg.modules.tianxian.service.ITianxianGongcanXiaoquDataService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import com.alibaba.fastjson.JSON; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; + /** + * @Description: 天线工参 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +@Tag(name="天线工参") +@RestController +@RequestMapping("/tianxian/tianxianGongcan") +@Slf4j +public class TianxianGongcanController { + @Autowired + private ITianxianGongcanService tianxianGongcanService; + @Autowired + private ITianxianGongcanXiaoquDataService tianxianGongcanXiaoquDataService; + + /** + * 分页列表查询 + * + * @param tianxianGongcan + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "天线工参-分页列表查询") + @Operation(summary = "天线工参-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(TianxianGongcan tianxianGongcan, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + // 1. Create QueryWrapper (same as before) + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(tianxianGongcan, req.getParameterMap()); + + // 2. Create Page object for the VO type + Page page = new Page<>(pageNo, pageSize); + + // 3. Inject TianxianGongcanMapper (assuming you have @Autowired) + + // 4. Call the custom mapper method +// IPage pageList = tianxianGongcanService.page(page, queryWrapper); + + IPage pageList = tianxianGongcanService.page(page, queryWrapper); + IPage pageList2 = new Page<>(pageList.getCurrent(), pageList.getSize(), pageList.getTotal()); + List records = pageList.getRecords(); + + List pageList1 = new ArrayList<>(); + + for (TianxianGongcan main : records) { + TianXianVo vo = new TianXianVo(); + BeanUtils.copyProperties(main, vo); + List tianxianGongcanXiaoquDataList = tianxianGongcanXiaoquDataService.selectByMainId(main.getId()); + vo.setTxConfig(tianxianGongcanXiaoquDataList); + pageList1.add(vo); + } + // 5. Set the records back to the page object + pageList2.setRecords(pageList1); + // 6. Set the total count + + + + // 5. Return the result directly + return Result.OK(pageList2); + } + + /** + * 添加 + * + * @param tianxianGongcanPage + * @return + */ + @AutoLog(value = "天线工参-添加") + @Operation(summary = "天线工参-添加") + @RequiresPermissions("tianxian:tianxian_gongcan:add") + @PostMapping(value = "/add") + public Result add(@RequestBody TianxianGongcanPage tianxianGongcanPage) { + TianxianGongcan tianxianGongcan = new TianxianGongcan(); + BeanUtils.copyProperties(tianxianGongcanPage, tianxianGongcan); + tianxianGongcanService.saveMain(tianxianGongcan, tianxianGongcanPage.getTianxianGongcanXiaoquDataList()); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param tianxianGongcanPage + * @return + */ + @AutoLog(value = "天线工参-编辑") + @Operation(summary = "天线工参-编辑") + @RequiresPermissions("tianxian:tianxian_gongcan:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody TianxianGongcanPage tianxianGongcanPage) { + TianxianGongcan tianxianGongcan = new TianxianGongcan(); + BeanUtils.copyProperties(tianxianGongcanPage, tianxianGongcan); + TianxianGongcan tianxianGongcanEntity = tianxianGongcanService.getById(tianxianGongcan.getId()); + if(tianxianGongcanEntity==null) { + return Result.error("未找到对应数据"); + } + tianxianGongcanService.updateMain(tianxianGongcan, tianxianGongcanPage.getTianxianGongcanXiaoquDataList()); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "天线工参-通过id删除") + @Operation(summary = "天线工参-通过id删除") + @RequiresPermissions("tianxian:tianxian_gongcan:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + tianxianGongcanService.delMain(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "天线工参-批量删除") + @Operation(summary = "天线工参-批量删除") + @RequiresPermissions("tianxian:tianxian_gongcan:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.tianxianGongcanService.delBatchMain(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "天线工参-通过id查询") + @Operation(summary = "天线工参-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + TianxianGongcan tianxianGongcan = tianxianGongcanService.getById(id); + if(tianxianGongcan==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(tianxianGongcan); + + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "天线工参小区数据-通过主表ID查询") + @Operation(summary = "天线工参小区数据-通过主表ID查询") + @GetMapping(value = "/queryTianxianGongcanXiaoquDataByMainId") + public Result> queryTianxianGongcanXiaoquDataListByMainId(@RequestParam(name="id",required=true) String id) { + List tianxianGongcanXiaoquDataList = tianxianGongcanXiaoquDataService.selectByMainId(id); + IPage page = new Page<>(); + page.setRecords(tianxianGongcanXiaoquDataList); + page.setTotal(tianxianGongcanXiaoquDataList.size()); + return Result.OK(page); + } + + /** + * 导出excel + * + * @param request + * @param tianxianGongcan + */ + @RequiresPermissions("tianxian:tianxian_gongcan:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, TianxianGongcan tianxianGongcan) { + // Step.1 组装查询条件查询数据 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(tianxianGongcan, request.getParameterMap()); + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + //配置选中数据查询条件 + String selections = request.getParameter("selections"); + if(oConvertUtils.isNotEmpty(selections)) { + List selectionList = Arrays.asList(selections.split(",")); + queryWrapper.in("id",selectionList); + } + //Step.2 获取导出数据 + List tianxianGongcanList = tianxianGongcanService.list(queryWrapper); + + // Step.3 组装pageList + List pageList = new ArrayList(); + for (TianxianGongcan main : tianxianGongcanList) { + TianxianGongcanPage vo = new TianxianGongcanPage(); + BeanUtils.copyProperties(main, vo); + List tianxianGongcanXiaoquDataList = tianxianGongcanXiaoquDataService.selectByMainId(main.getId()); + vo.setTianxianGongcanXiaoquDataList(tianxianGongcanXiaoquDataList); + pageList.add(vo); + } + + // Step.4 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + mv.addObject(NormalExcelConstants.FILE_NAME, "天线工参列表"); + mv.addObject(NormalExcelConstants.CLASS, TianxianGongcanPage.class); + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("天线工参数据", "导出人:"+sysUser.getRealname(), "天线工参")); + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); + return mv; + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("tianxian:tianxian_gongcan:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + // 获取上传文件对象 + MultipartFile file = entity.getValue(); + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List list = ExcelImportUtil.importExcel(file.getInputStream(), TianxianGongcanPage.class, params); + for (TianxianGongcanPage page : list) { + TianxianGongcan po = new TianxianGongcan(); + BeanUtils.copyProperties(page, po); + tianxianGongcanService.saveMain(po, page.getTianxianGongcanXiaoquDataList()); + } + return Result.OK("文件导入成功!数据行数:" + list.size()); + } catch (Exception e) { + log.error(e.getMessage(),e); + return Result.error("文件导入失败:"+e.getMessage()); + } finally { + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return Result.OK("文件导入失败!"); + } + +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianXianVo.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianXianVo.java new file mode 100644 index 00000000..139d7382 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianXianVo.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.tianxian.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; +@Schema(description="天线工参") +@Data +public class TianXianVo extends TianxianGongcan{ + + @Schema(description = "天线配置") + private List txConfig; +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianxianGongcan.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianxianGongcan.java new file mode 100644 index 00000000..f9d7c07b --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianxianGongcan.java @@ -0,0 +1,75 @@ +package org.jeecg.modules.tianxian.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.v3.oas.annotations.media.Schema; + + +/** + * @Description: 天线工参 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +@Schema(description="天线工参") +@Data +@TableName("tianxian_gongcan") +public class TianxianGongcan implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @Schema(description = "主键") + private java.lang.String id; + /**创建人*/ + @Schema(description = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @Schema(description = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @Schema(description = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @Schema(description = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @Schema(description = "所属部门") + private java.lang.String sysOrgCode; + /**城市*/ + @Excel(name = "城市", width = 15) + @Schema(description = "城市") + private java.lang.String cityName; + /**基站名称*/ + @Excel(name = "基站名称", width = 15) + @Schema(description = "基站名称") + private java.lang.String jizhanName; + /**经度*/ + @Excel(name = "经度", width = 15) + @Schema(description = "经度") + private java.lang.String log; + /**纬度*/ + @Excel(name = "纬度", width = 15) + @Schema(description = "纬度") + private java.lang.String lat; + /**运营商*/ + @Excel(name = "运营商", width = 15) + @Schema(description = "运营商") + private java.lang.String yunyingshangName; +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianxianGongcanXiaoquData.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianxianGongcanXiaoquData.java new file mode 100644 index 00000000..27aee964 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/entity/TianxianGongcanXiaoquData.java @@ -0,0 +1,110 @@ +package org.jeecg.modules.tianxian.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import java.util.Date; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.v3.oas.annotations.media.Schema; + +import java.io.UnsupportedEncodingException; + +/** + * @Description: 天线工参小区数据 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +@Schema(description="天线工参小区数据") +@Data +@TableName("tianxian_gongcan_xiaoqu_data") +public class TianxianGongcanXiaoquData implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @Schema(description = "主键") + private java.lang.String id; + /**创建人*/ + @Schema(description = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @Schema(description = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @Schema(description = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @Schema(description = "更新日期") + private java.util.Date updateTime; + /**vr拍摄*/ + @Excel(name = "vr拍摄", width = 15) + @Schema(description = "vr拍摄") + private java.lang.String vrPaishe; + /**小区名称*/ + @Excel(name = "小区名称", width = 15) + @Schema(description = "小区名称") + private java.lang.String xiaoquName; + /**照片*/ + @Excel(name = "照片", width = 15) + @Schema(description = "照片") + private java.lang.String zhaopian; + @Excel(name = "覆盖图", width = 15) + @Schema(description = "照片") + private java.lang.String fugaitu; + /**方向角*/ + @Excel(name = "方向角", width = 15) + @Schema(description = "方向角") + private java.lang.String fangxiaojiao; + /**下倾角图片*/ + @Excel(name = "下倾角图片", width = 15) + @Schema(description = "下倾角图片") + private java.lang.String xiaoqingjiaotupian; + /**机械倾角*/ + @Excel(name = "机械倾角", width = 15) + @Schema(description = "机械倾角") + private java.lang.String jiexieqingjiao; + /**天线挂高*/ + @Excel(name = "天线挂高", width = 15) + @Schema(description = "天线挂高") + private java.lang.String tianxianguagao; + /**楼高*/ + @Excel(name = "楼高", width = 15) + @Schema(description = "楼高") + private java.lang.String lougao; + /**平台*/ + @Excel(name = "平台", width = 15) + @Schema(description = "平台") + private java.lang.String pingtai; + /**基站id*/ + @Schema(description = "基站id") + private java.lang.String jizhanid; + /**天线数量*/ + @Excel(name = "天线数量", width = 15) + @Schema(description = "天线数量") + private java.lang.String tianxianNum; + /**运营商*/ + @Excel(name = "运营商", width = 15) + @Schema(description = "运营商") + private java.lang.String yunyingshang; + /**网络制式*/ + @Excel(name = "网络制式", width = 15) + @Schema(description = "网络制式") + private java.lang.String wangluozhishi; + /**频点号*/ + @Excel(name = "频点号", width = 15) + @Schema(description = "频点号") + private java.lang.String pindianhao; +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/TianxianGongcanMapper.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/TianxianGongcanMapper.java new file mode 100644 index 00000000..af173d67 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/TianxianGongcanMapper.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.tianxian.mapper; + +import java.util.List; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.tianxian.entity.TianXianVo; +import org.jeecg.modules.tianxian.entity.TianxianGongcan; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 天线工参 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +public interface TianxianGongcanMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/TianxianGongcanXiaoquDataMapper.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/TianxianGongcanXiaoquDataMapper.java new file mode 100644 index 00000000..f9ecbc94 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/TianxianGongcanXiaoquDataMapper.java @@ -0,0 +1,31 @@ +package org.jeecg.modules.tianxian.mapper; + +import java.util.List; +import org.jeecg.modules.tianxian.entity.TianxianGongcanXiaoquData; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @Description: 天线工参小区数据 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +public interface TianxianGongcanXiaoquDataMapper extends BaseMapper { + + /** + * 通过主表id删除子表数据 + * + * @param mainId 主表id + * @return boolean + */ + public boolean deleteByMainId(@Param("mainId") String mainId); + + /** + * 通过主表id查询子表数据 + * + * @param mainId 主表id + * @return List + */ + public List selectByMainId(@Param("mainId") String mainId); +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/xml/TianxianGongcanMapper.xml b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/xml/TianxianGongcanMapper.xml new file mode 100644 index 00000000..404d6532 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/xml/TianxianGongcanMapper.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/xml/TianxianGongcanXiaoquDataMapper.xml b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/xml/TianxianGongcanXiaoquDataMapper.xml new file mode 100644 index 00000000..a42b77d9 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/mapper/xml/TianxianGongcanXiaoquDataMapper.xml @@ -0,0 +1,16 @@ + + + + + + DELETE + FROM tianxian_gongcan_xiaoqu_data + WHERE + jizhanid = #{mainId} + + + diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/ITianxianGongcanService.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/ITianxianGongcanService.java new file mode 100644 index 00000000..ee247422 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/ITianxianGongcanService.java @@ -0,0 +1,48 @@ +package org.jeecg.modules.tianxian.service; + +import org.jeecg.modules.tianxian.entity.TianxianGongcanXiaoquData; +import org.jeecg.modules.tianxian.entity.TianxianGongcan; +import com.baomidou.mybatisplus.extension.service.IService; +import java.io.Serializable; +import java.util.Collection; +import java.util.List; + +/** + * @Description: 天线工参 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +public interface ITianxianGongcanService extends IService { + + /** + * 添加一对多 + * + * @param tianxianGongcan + * @param tianxianGongcanXiaoquDataList + */ + public void saveMain(TianxianGongcan tianxianGongcan,List tianxianGongcanXiaoquDataList) ; + + /** + * 修改一对多 + * + * @param tianxianGongcan + * @param tianxianGongcanXiaoquDataList + */ + public void updateMain(TianxianGongcan tianxianGongcan,List tianxianGongcanXiaoquDataList); + + /** + * 删除一对多 + * + * @param id + */ + public void delMain (String id); + + /** + * 批量删除一对多 + * + * @param idList + */ + public void delBatchMain (Collection idList); + +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/ITianxianGongcanXiaoquDataService.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/ITianxianGongcanXiaoquDataService.java new file mode 100644 index 00000000..57a8e9b9 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/ITianxianGongcanXiaoquDataService.java @@ -0,0 +1,22 @@ +package org.jeecg.modules.tianxian.service; + +import org.jeecg.modules.tianxian.entity.TianxianGongcanXiaoquData; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 天线工参小区数据 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +public interface ITianxianGongcanXiaoquDataService extends IService { + + /** + * 通过主表id查询子表数据 + * + * @param mainId 主表id + * @return List + */ + public List selectByMainId(String mainId); +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/impl/TianxianGongcanServiceImpl.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/impl/TianxianGongcanServiceImpl.java new file mode 100644 index 00000000..f289dbd6 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/impl/TianxianGongcanServiceImpl.java @@ -0,0 +1,77 @@ +package org.jeecg.modules.tianxian.service.impl; + +import org.jeecg.modules.tianxian.entity.TianxianGongcan; +import org.jeecg.modules.tianxian.entity.TianxianGongcanXiaoquData; +import org.jeecg.modules.tianxian.mapper.TianxianGongcanXiaoquDataMapper; +import org.jeecg.modules.tianxian.mapper.TianxianGongcanMapper; +import org.jeecg.modules.tianxian.service.ITianxianGongcanService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import java.io.Serializable; +import java.util.List; +import java.util.Collection; + +/** + * @Description: 天线工参 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +@Service +public class TianxianGongcanServiceImpl extends ServiceImpl implements ITianxianGongcanService { + + @Autowired + private TianxianGongcanMapper tianxianGongcanMapper; + @Autowired + private TianxianGongcanXiaoquDataMapper tianxianGongcanXiaoquDataMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveMain(TianxianGongcan tianxianGongcan, List tianxianGongcanXiaoquDataList) { + tianxianGongcanMapper.insert(tianxianGongcan); + if(tianxianGongcanXiaoquDataList!=null && tianxianGongcanXiaoquDataList.size()>0) { + for(TianxianGongcanXiaoquData entity:tianxianGongcanXiaoquDataList) { + //外键设置 + entity.setJizhanid(tianxianGongcan.getId()); + tianxianGongcanXiaoquDataMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateMain(TianxianGongcan tianxianGongcan,List tianxianGongcanXiaoquDataList) { + tianxianGongcanMapper.updateById(tianxianGongcan); + + //1.先删除子表数据 + tianxianGongcanXiaoquDataMapper.deleteByMainId(tianxianGongcan.getId()); + + //2.子表数据重新插入 + if(tianxianGongcanXiaoquDataList!=null && tianxianGongcanXiaoquDataList.size()>0) { + for(TianxianGongcanXiaoquData entity:tianxianGongcanXiaoquDataList) { + //外键设置 + entity.setJizhanid(tianxianGongcan.getId()); + tianxianGongcanXiaoquDataMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delMain(String id) { + tianxianGongcanXiaoquDataMapper.deleteByMainId(id); + tianxianGongcanMapper.deleteById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delBatchMain(Collection idList) { + for(Serializable id:idList) { + tianxianGongcanXiaoquDataMapper.deleteByMainId(id.toString()); + tianxianGongcanMapper.deleteById(id); + } + } + +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/impl/TianxianGongcanXiaoquDataServiceImpl.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/impl/TianxianGongcanXiaoquDataServiceImpl.java new file mode 100644 index 00000000..c73c2fad --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/service/impl/TianxianGongcanXiaoquDataServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.tianxian.service.impl; + +import org.jeecg.modules.tianxian.entity.TianxianGongcanXiaoquData; +import org.jeecg.modules.tianxian.mapper.TianxianGongcanXiaoquDataMapper; +import org.jeecg.modules.tianxian.service.ITianxianGongcanXiaoquDataService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 天线工参小区数据 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +@Service +public class TianxianGongcanXiaoquDataServiceImpl extends ServiceImpl implements ITianxianGongcanXiaoquDataService { + + @Autowired + private TianxianGongcanXiaoquDataMapper tianxianGongcanXiaoquDataMapper; + + @Override + public List selectByMainId(String mainId) { + return tianxianGongcanXiaoquDataMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vo/TianxianGongcanPage.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vo/TianxianGongcanPage.java new file mode 100644 index 00000000..9744b9fb --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vo/TianxianGongcanPage.java @@ -0,0 +1,76 @@ +package org.jeecg.modules.tianxian.vo; + +import java.util.List; +import org.jeecg.modules.tianxian.entity.TianxianGongcan; +import org.jeecg.modules.tianxian.entity.TianxianGongcanXiaoquData; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecgframework.poi.excel.annotation.ExcelEntity; +import org.jeecgframework.poi.excel.annotation.ExcelCollection; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import io.swagger.v3.oas.annotations.media.Schema; + + +/** + * @Description: 天线工参 + * @Author: jeecg-boot + * @Date: 2025-04-12 + * @Version: V1.0 + */ +@Data +@Schema(description="天线工参") +public class TianxianGongcanPage { + + /**主键*/ + @Schema(description = "主键") + private java.lang.String id; + /**创建人*/ + @Schema(description = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @Schema(description = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @Schema(description = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @Schema(description = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @Schema(description = "所属部门") + private java.lang.String sysOrgCode; + /**城市*/ + @Excel(name = "城市", width = 15) + @Schema(description = "城市") + private java.lang.String cityName; + /**基站名称*/ + @Excel(name = "基站名称", width = 15) + @Schema(description = "基站名称") + private java.lang.String jizhanName; + /**经度*/ + @Excel(name = "经度", width = 15) + @Schema(description = "经度") + private java.lang.String log; + /**纬度*/ + @Excel(name = "纬度", width = 15) + @Schema(description = "纬度") + private java.lang.String lat; + /**运营商*/ + @Excel(name = "运营商", width = 15) + @Schema(description = "运营商") + private java.lang.String yunyingshangName; + + @ExcelCollection(name="天线工参小区数据") + @Schema(description = "天线工参小区数据") + private List tianxianGongcanXiaoquDataList; + +} diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcan.api.ts b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcan.api.ts new file mode 100644 index 00000000..ddb485f7 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcan.api.ts @@ -0,0 +1,77 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/tianxian/tianxianGongcan/list', + save='/tianxian/tianxianGongcan/add', + edit='/tianxian/tianxianGongcan/edit', + deleteOne = '/tianxian/tianxianGongcan/delete', + deleteBatch = '/tianxian/tianxianGongcan/deleteBatch', + importExcel = '/tianxian/tianxianGongcan/importExcel', + exportXls = '/tianxian/tianxianGongcan/exportXls', + tianxianGongcanXiaoquDataList = '/tianxian/tianxianGongcan/queryTianxianGongcanXiaoquDataByMainId', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 子表单查询接口 + * @param params + */ +export const queryTianxianGongcanXiaoquData = Api.tianxianGongcanXiaoquDataList +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} +/** + * 子表列表接口 + * @param params + */ +export const tianxianGongcanXiaoquDataList = (params) => + defHttp.get({url: Api.tianxianGongcanXiaoquDataList, params},{isTransformResponse:false}); diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcan.data.ts b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcan.data.ts new file mode 100644 index 00000000..d4221cf9 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcan.data.ts @@ -0,0 +1,295 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types' +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '城市', + align:"center", + dataIndex: 'cityName' + }, + { + title: '基站名称', + align:"center", + dataIndex: 'jizhanName' + }, + { + title: '经度', + align:"center", + dataIndex: 'log' + }, + { + title: '纬度', + align:"center", + dataIndex: 'lat' + }, + { + title: '运营商', + align:"center", + dataIndex: 'yunyingshangName' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '城市', + field: 'cityName', + component: 'Input', + }, + { + label: '基站名称', + field: 'jizhanName', + component: 'Input', + }, + { + label: '经度', + field: 'log', + component: 'Input', + }, + { + label: '纬度', + field: 'lat', + component: 'Input', + }, + { + label: '运营商', + field: 'yunyingshangName', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; +//子表单数据 +//子表列表数据 +export const tianxianGongcanXiaoquDataColumns: BasicColumn[] = [ + { + title: 'vr拍摄', + align:"center", + dataIndex: 'vrPaishe', + customRender:render.renderImage, + }, + { + title: '小区名称', + align:"center", + dataIndex: 'xiaoquName' + }, + { + title: '照片', + align:"center", + dataIndex: 'zhaopian', + customRender:render.renderImage, + }, + { + title: '方向角', + align:"center", + dataIndex: 'fangxiaojiao' + }, + { + title: '下倾角图片', + align:"center", + dataIndex: 'xiaoqingjiaotupian', + customRender:render.renderImage, + }, + { + title: '机械倾角', + align:"center", + dataIndex: 'jiexieqingjiao' + }, + { + title: '天线挂高', + align:"center", + dataIndex: 'tianxianguagao' + }, + { + title: '楼高', + align:"center", + dataIndex: 'lougao' + }, + { + title: '平台', + align:"center", + dataIndex: 'pingtai' + }, + { + title: '天线数量', + align:"center", + dataIndex: 'tianxianNum' + }, + { + title: '运营商', + align:"center", + dataIndex: 'yunyingshang' + }, + { + title: '网络制式', + align:"center", + dataIndex: 'wangluozhishi' + }, + { + title: '频点号', + align:"center", + dataIndex: 'pindianhao' + }, +]; +//子表表格配置 +export const tianxianGongcanXiaoquDataJVxeColumns: JVxeColumn[] = [ + { + title: 'vr拍摄', + key: 'vrPaishe', + type: JVxeTypes.image, + token:true, + responseName:"message", + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '小区名称', + key: 'xiaoquName', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '照片', + key: 'zhaopian', + type: JVxeTypes.image, + token:true, + responseName:"message", + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '方向角', + key: 'fangxiaojiao', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '下倾角图片', + key: 'xiaoqingjiaotupian', + type: JVxeTypes.image, + token:true, + responseName:"message", + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '机械倾角', + key: 'jiexieqingjiao', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '天线挂高', + key: 'tianxianguagao', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '楼高', + key: 'lougao', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '平台', + key: 'pingtai', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '天线数量', + key: 'tianxianNum', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '运营商', + key: 'yunyingshang', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '网络制式', + key: 'wangluozhishi', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '频点号', + key: 'pindianhao', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + ] + +// 高级查询数据 +export const superQuerySchema = { + cityName: {title: '城市',order: 0,view: 'text', type: 'string',}, + jizhanName: {title: '基站名称',order: 1,view: 'text', type: 'string',}, + log: {title: '经度',order: 2,view: 'text', type: 'string',}, + lat: {title: '纬度',order: 3,view: 'text', type: 'string',}, + yunyingshangName: {title: '运营商',order: 4,view: 'text', type: 'string',}, + //子表高级查询 + tianxianGongcanXiaoquData: { + title: '天线工参小区数据', + view: 'table', + fields: { + vrPaishe: {title: 'vr拍摄',order: 0,view: 'image', type: 'string',}, + xiaoquName: {title: '小区名称',order: 1,view: 'text', type: 'string',}, + zhaopian: {title: '照片',order: 2,view: 'image', type: 'string',}, + fangxiaojiao: {title: '方向角',order: 3,view: 'text', type: 'string',}, + xiaoqingjiaotupian: {title: '下倾角图片',order: 4,view: 'image', type: 'string',}, + jiexieqingjiao: {title: '机械倾角',order: 5,view: 'text', type: 'string',}, + tianxianguagao: {title: '天线挂高',order: 6,view: 'text', type: 'string',}, + lougao: {title: '楼高',order: 7,view: 'text', type: 'string',}, + pingtai: {title: '平台',order: 8,view: 'text', type: 'string',}, + tianxianNum: {title: '天线数量',order: 9,view: 'text', type: 'string',}, + yunyingshang: {title: '运营商',order: 10,view: 'text', type: 'string',}, + wangluozhishi: {title: '网络制式',order: 11,view: 'text', type: 'string',}, + pindianhao: {title: '频点号',order: 12,view: 'text', type: 'string',}, + } + }, +}; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[]{ + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcanList.vue b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcanList.vue new file mode 100644 index 00000000..200ad7a5 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/TianxianGongcanList.vue @@ -0,0 +1,212 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/V20250412_1__menu_insert_TianxianGongcan.sql b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/V20250412_1__menu_insert_TianxianGongcan.sql new file mode 100644 index 00000000..1e4916c9 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/V20250412_1__menu_insert_TianxianGongcan.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/tianxian文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2025041212123330130', NULL, '天线工参', '/tianxian/tianxianGongcanList', 'tianxian/TianxianGongcanList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-04-12 00:12:13', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025041212123340131', '2025041212123330130', '添加天线工参', NULL, NULL, 0, NULL, NULL, 2, 'tianxian:tianxian_gongcan:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-04-12 00:12:13', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025041212123340132', '2025041212123330130', '编辑天线工参', NULL, NULL, 0, NULL, NULL, 2, 'tianxian:tianxian_gongcan:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-04-12 00:12:13', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025041212123340133', '2025041212123330130', '删除天线工参', NULL, NULL, 0, NULL, NULL, 2, 'tianxian:tianxian_gongcan:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-04-12 00:12:13', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025041212123340134', '2025041212123330130', '批量删除天线工参', NULL, NULL, 0, NULL, NULL, 2, 'tianxian:tianxian_gongcan:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-04-12 00:12:13', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025041212123340135', '2025041212123330130', '导出excel_天线工参', NULL, NULL, 0, NULL, NULL, 2, 'tianxian:tianxian_gongcan:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-04-12 00:12:13', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025041212123340136', '2025041212123330130', '导入excel_天线工参', NULL, NULL, 0, NULL, NULL, 2, 'tianxian:tianxian_gongcan:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-04-12 00:12:13', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/components/TianxianGongcanForm.vue b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/components/TianxianGongcanForm.vue new file mode 100644 index 00000000..d7044d44 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/components/TianxianGongcanForm.vue @@ -0,0 +1,134 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/components/TianxianGongcanModal.vue b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/components/TianxianGongcanModal.vue new file mode 100644 index 00000000..8cfe8040 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/components/TianxianGongcanModal.vue @@ -0,0 +1,114 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/subTables/TianxianGongcanXiaoquDataSubTable.vue b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/subTables/TianxianGongcanXiaoquDataSubTable.vue new file mode 100644 index 00000000..404923e9 --- /dev/null +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/tianxian/vue3/subTables/TianxianGongcanXiaoquDataSubTable.vue @@ -0,0 +1,44 @@ + + + diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/weixn/controller/WeixinUserController.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/weixn/controller/WeixinUserController.java index 1de3c2c3..a78c03a4 100644 --- a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/weixn/controller/WeixinUserController.java +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/weixn/controller/WeixinUserController.java @@ -4,6 +4,7 @@ import java.util.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; @@ -79,7 +80,10 @@ public class WeixinUserController extends JeecgController customeRuleMap = new HashMap<>(); // 自定义多选的查询规则为:LIKE_WITH_OR customeRuleMap.put("computedids", QueryRuleEnum.LIKE_WITH_OR); + // *** 新增:指定 request parameter 中名为 "city" 的参数使用 LIKE 规则 *** + customeRuleMap.put("city", QueryRuleEnum.LIKE_WITH_OR); // LIKE 会生成 %value% QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(weixinUser, req.getParameterMap(),customeRuleMap); + Page page = new Page(pageNo, pageSize); IPage pageList = weixinUserService.page(page, queryWrapper); return Result.OK(pageList); @@ -201,14 +205,16 @@ public class WeixinUserController extends JeecgController getPhoneNumber(@RequestParam String code) { + public Result getPhoneNumber(@RequestBody UserDto userDto) { + String code = userDto.getCode(); + String city = userDto.getCity(); try { // 1. 首先获取access_token String tokenUrl = String.format( @@ -240,7 +246,7 @@ public class WeixinUserController extends JeecgController { WeixinUser getByPhone(String phoneNumber); - JSONObject wxLogin(String phone); + JSONObject wxLogin(String phone, String city); } diff --git a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/weixn/service/impl/WeixinUserServiceImpl.java b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/weixn/service/impl/WeixinUserServiceImpl.java index 20014121..d17ae6f2 100644 --- a/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/weixn/service/impl/WeixinUserServiceImpl.java +++ b/jeecg-boot/jeecg-module-computed/src/main/java/org/jeecg/modules/weixn/service/impl/WeixinUserServiceImpl.java @@ -47,12 +47,13 @@ public class WeixinUserServiceImpl extends ServiceImpl calcList = calcService.list(); // 计算器列表 @@ -87,7 +88,7 @@ public class WeixinUserServiceImpl extends ServiceImpl