dev
Brian 2 months ago
parent 1b8a6773c7
commit 765b93281f

@ -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

@ -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<IPage<TianXianVo>> 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<TianxianGongcan> queryWrapper = QueryGenerator.initQueryWrapper(tianxianGongcan, req.getParameterMap());
// 2. Create Page object for the VO type
Page<TianxianGongcan> page = new Page<>(pageNo, pageSize);
// 3. Inject TianxianGongcanMapper (assuming you have @Autowired)
// 4. Call the custom mapper method
// IPage<TianxianGongcan> pageList = tianxianGongcanService.page(page, queryWrapper);
IPage<TianxianGongcan> pageList = tianxianGongcanService.page(page, queryWrapper);
IPage<TianXianVo> pageList2 = new Page<>(pageList.getCurrent(), pageList.getSize(), pageList.getTotal());
List<TianxianGongcan> records = pageList.getRecords();
List<TianXianVo> pageList1 = new ArrayList<>();
for (TianxianGongcan main : records) {
TianXianVo vo = new TianXianVo();
BeanUtils.copyProperties(main, vo);
List<TianxianGongcanXiaoquData> 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<String> 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<String> 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<String> 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<String> 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<TianxianGongcan> 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<IPage<TianxianGongcanXiaoquData>> queryTianxianGongcanXiaoquDataListByMainId(@RequestParam(name="id",required=true) String id) {
List<TianxianGongcanXiaoquData> tianxianGongcanXiaoquDataList = tianxianGongcanXiaoquDataService.selectByMainId(id);
IPage <TianxianGongcanXiaoquData> 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<TianxianGongcan> queryWrapper = QueryGenerator.initQueryWrapper(tianxianGongcan, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//配置选中数据查询条件
String selections = request.getParameter("selections");
if(oConvertUtils.isNotEmpty(selections)) {
List<String> selectionList = Arrays.asList(selections.split(","));
queryWrapper.in("id",selectionList);
}
//Step.2 获取导出数据
List<TianxianGongcan> tianxianGongcanList = tianxianGongcanService.list(queryWrapper);
// Step.3 组装pageList
List<TianxianGongcanPage> pageList = new ArrayList<TianxianGongcanPage>();
for (TianxianGongcan main : tianxianGongcanList) {
TianxianGongcanPage vo = new TianxianGongcanPage();
BeanUtils.copyProperties(main, vo);
List<TianxianGongcanXiaoquData> 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<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
// 获取上传文件对象
MultipartFile file = entity.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<TianxianGongcanPage> 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("文件导入失败!");
}
}

@ -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<TianxianGongcanXiaoquData> txConfig;
}

@ -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;
}

@ -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;
}

@ -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<TianxianGongcan> {
}

@ -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<TianxianGongcanXiaoquData> {
/**
* id
*
* @param mainId id
* @return boolean
*/
public boolean deleteByMainId(@Param("mainId") String mainId);
/**
* id
*
* @param mainId id
* @return List<TianxianGongcanXiaoquData>
*/
public List<TianxianGongcanXiaoquData> selectByMainId(@Param("mainId") String mainId);
}

@ -0,0 +1,8 @@
<?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">
<!-- 请确保 namespace 指向你的 TianxianGongcanMapper 接口 -->
<mapper namespace="org.jeecg.modules.tianxian.mapper.TianxianGongcanMapper">
</mapper>

@ -0,0 +1,16 @@
<?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="org.jeecg.modules.tianxian.mapper.TianxianGongcanXiaoquDataMapper">
<delete id="deleteByMainId" parameterType="java.lang.String">
DELETE
FROM tianxian_gongcan_xiaoqu_data
WHERE
jizhanid = #{mainId} </delete>
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.tianxian.entity.TianxianGongcanXiaoquData">
SELECT *
FROM tianxian_gongcan_xiaoqu_data
WHERE
jizhanid = #{mainId} </select>
</mapper>

@ -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<TianxianGongcan> {
/**
*
*
* @param tianxianGongcan
* @param tianxianGongcanXiaoquDataList
*/
public void saveMain(TianxianGongcan tianxianGongcan,List<TianxianGongcanXiaoquData> tianxianGongcanXiaoquDataList) ;
/**
*
*
* @param tianxianGongcan
* @param tianxianGongcanXiaoquDataList
*/
public void updateMain(TianxianGongcan tianxianGongcan,List<TianxianGongcanXiaoquData> tianxianGongcanXiaoquDataList);
/**
*
*
* @param id
*/
public void delMain (String id);
/**
*
*
* @param idList
*/
public void delBatchMain (Collection<? extends Serializable> idList);
}

@ -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<TianxianGongcanXiaoquData> {
/**
* id
*
* @param mainId id
* @return List<TianxianGongcanXiaoquData>
*/
public List<TianxianGongcanXiaoquData> selectByMainId(String mainId);
}

@ -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<TianxianGongcanMapper, TianxianGongcan> implements ITianxianGongcanService {
@Autowired
private TianxianGongcanMapper tianxianGongcanMapper;
@Autowired
private TianxianGongcanXiaoquDataMapper tianxianGongcanXiaoquDataMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public void saveMain(TianxianGongcan tianxianGongcan, List<TianxianGongcanXiaoquData> 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<TianxianGongcanXiaoquData> 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<? extends Serializable> idList) {
for(Serializable id:idList) {
tianxianGongcanXiaoquDataMapper.deleteByMainId(id.toString());
tianxianGongcanMapper.deleteById(id);
}
}
}

@ -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<TianxianGongcanXiaoquDataMapper, TianxianGongcanXiaoquData> implements ITianxianGongcanXiaoquDataService {
@Autowired
private TianxianGongcanXiaoquDataMapper tianxianGongcanXiaoquDataMapper;
@Override
public List<TianxianGongcanXiaoquData> selectByMainId(String mainId) {
return tianxianGongcanXiaoquDataMapper.selectByMainId(mainId);
}
}

@ -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<TianxianGongcanXiaoquData> tianxianGongcanXiaoquDataList;
}

@ -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});

@ -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;
}

@ -0,0 +1,212 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand">
<!-- 内嵌table区域 begin -->
<template #expandedRowRender="{record}">
<a-tabs tabPosition="top">
<a-tab-pane tab="天线工参小区数据" key="tianxianGongcanXiaoquData" forceRender>
<tianxianGongcanXiaoquDataSubTable v-if="expandedRowKeys.includes(record.id)" :id="record.id" />
</a-tab-pane>
</a-tabs>
</template>
<!-- 内嵌table区域 end -->
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" v-auth="'tianxian:tianxian_gongcan:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> </a-button>
<a-button type="primary" v-auth="'tianxian:tianxian_gongcan:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> </a-button>
<j-upload-button type="primary" v-auth="'tianxian:tianxian_gongcan:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls"></j-upload-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button v-auth="'tianxian:tianxian_gongcan:deleteBatch'">
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
<!-- 高级查询 -->
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<TianxianGongcanModal @register="registerModal" @success="handleSuccess"></TianxianGongcanModal>
</div>
</template>
<script lang="ts" name="tianxian-tianxianGongcan" setup>
import {ref, reactive, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'
import {useModal} from '/@/components/Modal';
import TianxianGongcanModal from './components/TianxianGongcanModal.vue'
import TianxianGongcanXiaoquDataSubTable from './subTables/TianxianGongcanXiaoquDataSubTable.vue'
import {columns, searchFormSchema, superQuerySchema} from './TianxianGongcan.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './TianxianGongcan.api';
import {downloadFile} from '/@/utils/common/renderUtils';
import { useUserStore } from '/@/store/modules/user';
const queryParam = reactive<any>({});
// key
const expandedRowKeys = ref<any[]>([]);
//model
const [registerModal, {openModal}] = useModal();
const userStore = useUserStore();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '天线工参',
api: list,
columns,
canResize:false,
formConfig: {
//labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToNumber: [
],
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
fixed:'right'
},
beforeFetch: (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name:"天线工参",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
reload();
}
/**
* 展开事件
* */
function handleExpand(expanded, record){
expandedRowKeys.value=[];
if (expanded === true) {
expandedRowKeys.value.push(record.id)
}
}
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: selectedRowKeys.value},handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'tianxian:tianxian_gongcan:edit'
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft'
},
auth: 'tianxian:tianxian_gongcan:delete'
}
]
}
</script>
<style lang="less" scoped>
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
</style>

@ -0,0 +1,26 @@
-- views/tianxian
-- sqlcomponent
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);

@ -0,0 +1,134 @@
<template>
<div>
<BasicForm @register="registerForm" ref="formRef"/>
<!-- 子表单区域 -->
<a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs">
<a-tab-pane tab="天线工参小区数据" key="tianxianGongcanXiaoquData" :forceRender="true">
<JVxeTable
v-if="tianxianGongcanXiaoquDataTable.show"
keep-source
resizable
ref="tianxianGongcanXiaoquData"
:loading="tianxianGongcanXiaoquDataTable.loading"
:columns="tianxianGongcanXiaoquDataTable.columns"
:dataSource="tianxianGongcanXiaoquDataTable.dataSource"
:height="340"
:disabled="formDisabled"
:rowNumber="true"
:rowSelection="true"
:toolbar="true"
/>
</a-tab-pane>
</a-tabs>
<div style="width: 100%;text-align: center;margin-top: 10px;" v-if="showFlowSubmitButton">
<a-button preIcon="ant-design:check-outlined" style="width: 126px" type="primary" @click="handleSubmit"> </a-button>
</div>
</div>
</template>
<script lang="ts" setup>
import { defHttp } from '/@/utils/http/axios';
import {ref, computed, unref,reactive, onMounted, defineProps } from 'vue';
import {BasicForm, useForm} from '/@/components/Form/index';
import { JVxeTable } from '/@/components/jeecg/JVxeTable'
import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
import {formSchema,tianxianGongcanXiaoquDataJVxeColumns} from '../TianxianGongcan.data';
import {saveOrUpdate,queryTianxianGongcanXiaoquData} from '../TianxianGongcan.api';
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
const isUpdate = ref(true);
const refKeys = ref(['tianxianGongcanXiaoquData', ]);
const activeKey = ref('tianxianGongcanXiaoquData');
const tianxianGongcanXiaoquData = ref();
const tableRefs = {tianxianGongcanXiaoquData, };
const tianxianGongcanXiaoquDataTable = reactive({
loading: false,
dataSource: [],
columns:tianxianGongcanXiaoquDataJVxeColumns,
show: false
})
const props = defineProps({
formData: { type: Object, default: ()=>{} },
formBpm: { type: Boolean, default: true }
});
const formDisabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}
}
return true;
});
//
const showFlowSubmitButton = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return true
}
}
return false
});
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
baseColProps: {span: 24}
});
onMounted(()=>{
initFormData();
});
//
const queryByIdUrl = '/tianxian/tianxianGongcan/queryById';
async function initFormData(){
if(props.formBpm === true){
await reset();
let params = {id: props.formData.dataId};
const data = await defHttp.get({url: queryByIdUrl, params});
//
await setFieldsValue({
...data
});
requestSubTableData(queryTianxianGongcanXiaoquData, {id: data.id}, tianxianGongcanXiaoquDataTable, ()=>{
tianxianGongcanXiaoquDataTable.show = true;
});
//
setProps({ disabled: formDisabled.value })
}
}
//
const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys);
async function reset(){
await resetFields();
activeKey.value = 'tianxianGongcanXiaoquData';
tianxianGongcanXiaoquDataTable.dataSource = [];
}
function classifyIntoFormData(allValues) {
let main = Object.assign({}, allValues.formValue)
return {
...main, //
tianxianGongcanXiaoquDataList: allValues.tablesValue[0].tableData,
}
}
//
async function requestAddOrEdit(values) {
//
await saveOrUpdate(values, true);
}
</script>
<style lang="less" scoped>
/** 时间和数字输入框样式 */
:deep(.ant-input-number) {
width: 100%;
}
:deep(.ant-calendar-picker) {
width: 100%;
}
</style>

@ -0,0 +1,114 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">
<BasicForm @register="registerForm" ref="formRef" name="TianxianGongcanForm" />
<!-- 子表单区域 -->
<a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs">
<a-tab-pane tab="天线工参小区数据" key="tianxianGongcanXiaoquData" :forceRender="true">
<JVxeTable
keep-source
resizable
ref="tianxianGongcanXiaoquData"
:loading="tianxianGongcanXiaoquDataTable.loading"
:columns="tianxianGongcanXiaoquDataTable.columns"
:dataSource="tianxianGongcanXiaoquDataTable.dataSource"
:height="340"
:disabled="formDisabled"
:rowNumber="true"
:rowSelection="true"
:toolbar="true"
/>
</a-tab-pane>
</a-tabs>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref,reactive} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import { JVxeTable } from '/@/components/jeecg/JVxeTable'
import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
import {formSchema,tianxianGongcanXiaoquDataJVxeColumns} from '../TianxianGongcan.data';
import {saveOrUpdate,queryTianxianGongcanXiaoquData} from '../TianxianGongcan.api';
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
const formDisabled = ref(false);
const refKeys = ref(['tianxianGongcanXiaoquData', ]);
const activeKey = ref('tianxianGongcanXiaoquData');
const tianxianGongcanXiaoquData = ref();
const tableRefs = {tianxianGongcanXiaoquData, };
const tianxianGongcanXiaoquDataTable = reactive({
loading: false,
dataSource: [],
columns:tianxianGongcanXiaoquDataJVxeColumns
})
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
baseColProps: {span: 24}
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await reset();
setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter});
isUpdate.value = !!data?.isUpdate;
formDisabled.value = !data?.showFooter;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
requestSubTableData(queryTianxianGongcanXiaoquData, {id:data?.record?.id}, tianxianGongcanXiaoquDataTable)
}
//
setProps({ disabled: !data?.showFooter })
});
//
const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys);
//
const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(formDisabled) ? '编辑' : '详情'));
async function reset(){
await resetFields();
activeKey.value = 'tianxianGongcanXiaoquData';
tianxianGongcanXiaoquDataTable.dataSource = [];
}
function classifyIntoFormData(allValues) {
let main = Object.assign({}, allValues.formValue)
return {
...main, //
tianxianGongcanXiaoquDataList: allValues.tablesValue[0].tableData,
}
}
//
async function requestAddOrEdit(values) {
try {
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
/** 时间和数字输入框样式 */
:deep(.ant-input-number) {
width: 100%;
}
:deep(.ant-calendar-picker) {
width: 100%;
}
</style>

@ -0,0 +1,44 @@
<template>
<div>
<!--引用表格-->
<BasicTable bordered size="middle" :loading="loading" rowKey="id" :canResize="false" :columns="tianxianGongcanXiaoquDataColumns" :dataSource="dataSource" :pagination="false">
<!--字段回显插槽-->
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
</div>
</template>
<script lang="ts" setup>
import {ref,watchEffect} from 'vue';
import {BasicTable} from '/@/components/Table';
import {tianxianGongcanXiaoquDataColumns} from '../TianxianGongcan.data';
import {tianxianGongcanXiaoquDataList} from '../TianxianGongcan.api';
import { downloadFile } from '/@/utils/common/renderUtils';
const props = defineProps({
id: {
type: String,
default: '',
},
})
const loading = ref(false);
const dataSource = ref([]);
watchEffect(() => {
props.id && loadData(props.id);
});
function loadData(id) {
dataSource.value = []
loading.value = true
tianxianGongcanXiaoquDataList({id}).then((res) => {
if (res.success) {
dataSource.value = res.result.records
}
}).finally(() => {
loading.value = false
})
}
</script>

@ -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<WeixinUser, IWeixinUse
Map<String, QueryRuleEnum> 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<WeixinUser> queryWrapper = QueryGenerator.initQueryWrapper(weixinUser, req.getParameterMap(),customeRuleMap);
Page<WeixinUser> page = new Page<WeixinUser>(pageNo, pageSize);
IPage<WeixinUser> pageList = weixinUserService.page(page, queryWrapper);
return Result.OK(pageList);
@ -201,14 +205,16 @@ public class WeixinUserController extends JeecgController<WeixinUser, IWeixinUse
* 4.
* 5.
*
* @param code
* @param userDto
* @return Result
*/
@Operation(summary = "获取微信小程序手机号")
@IgnoreAuth
@PostMapping("/getPhoneNumber")
@ResponseBody
public Result<?> 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, IWeixinUse
if (response != null && response.getInteger("errcode") == 0) {
JSONObject phoneInfo = response.getJSONObject("phone_info");
String phoneNumber = phoneInfo.getString("phoneNumber");
return Result.OK(weixinUserService.wxLogin(phoneNumber));
return Result.OK(weixinUserService.wxLogin(phoneNumber, city));
} else {
return Result.error("获取手机号失败:" + (response != null ? response.getString("errmsg") : "未知错误"));
}

@ -0,0 +1,18 @@
package org.jeecg.modules.weixn.entity.Dto;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
@Data
@Getter
@Setter
public class UserDto implements Serializable {
private String code;
private String city;
}

@ -15,5 +15,5 @@ public interface IWeixinUserService extends IService<WeixinUser> {
WeixinUser getByPhone(String phoneNumber);
JSONObject wxLogin(String phone);
JSONObject wxLogin(String phone, String city);
}

@ -47,12 +47,13 @@ public class WeixinUserServiceImpl extends ServiceImpl<WeixinUserMapper, WeixinU
}
@NotNull
private WeixinUser create(String phoneNumber) {
private WeixinUser create(String phoneNumber, String city) {
WeixinUser weixinUser = new WeixinUser();
weixinUser.setPhone(phoneNumber);
weixinUser.setNickname(null);
weixinUser.setOpenid(null);
weixinUser.setSex(null);
weixinUser.setCity(city);
List<Calc> calcList = calcService.list();
// 计算器列表
@ -87,7 +88,7 @@ public class WeixinUserServiceImpl extends ServiceImpl<WeixinUserMapper, WeixinU
}
@Override
public JSONObject wxLogin(String phone) {
public JSONObject wxLogin(String phone, String city) {
JSONObject jsonObject = new JSONObject();
WeixinUser weixinUser = this.getByPhone(phone);
if (weixinUser == null) {
@ -96,7 +97,7 @@ public class WeixinUserServiceImpl extends ServiceImpl<WeixinUserMapper, WeixinU
// 设置角色和部门
sysUserService.saveUser(newSysUser, "ee8626f80f7c2619917b6236f3a7f02b", "", "");
WeixinUser newUser = this.create(phone);
WeixinUser newUser = this.create(phone, city);
this.save(newUser);

@ -149,7 +149,8 @@ spring:
slow-sql-millis: 5000
datasource:
master:
url: jdbc:mysql://127.0.0.1:3308/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# url: jdbc:mysql://47.98.212.243:3308/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
url: jdbc:mysql://jeecg-boot-mysql:3308/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
@ -162,7 +163,7 @@ spring:
#redis 配置
redis:
database: 0
host: 127.0.0.1
host: jeecg-boot-redis
port: 6378
password:
#mybatis plus 设置
@ -189,7 +190,7 @@ jeecg:
ai-chat:
enabled: true
model: deepseek-chat
apiKey: sk-aff64e37bcc7412ba648a093c8c321cb
apiKey: sk-xx
apiHost: https://api.deepseek.com
timeout: 60
# 平台上线安全配置
@ -210,7 +211,7 @@ jeecg:
app: http://localhost:8051
path:
#文件上传根目录 设置
upload: /opt/upFiles
upload: /server/factory/upFiles
#webapp文件路径
webapp: /opt/webapp
shiro:

@ -3,21 +3,22 @@ spring:
name: jeecg-system
profiles:
active: '@profile.name@'
debug: true
calculation:
api:
requestUrl: http://aiprice.orgcoder.com/v1/workflows/run
requestUrl: http://127.0.0.1:90/v1/workflows/run
keys:
calculation:
# 碳源
TAN_YUAN: app-FMYftrMR2YpkHvszHjeN4byA
TAN_YUAN: app-l3lLtvc8iNfKxnJkprTjaw5J
# 沼气
ZHAO_QI: app-1g43UYH246H2iiOWLhGt36Qo
ZHAO_QI: app-cf1FXWalVxpGAiuSISaDapAX
# 产渣率
CHAN_ZHA_LV: app-3e5IegYWfIIHYIGcRjNc2MmT
CHAN_ZHA_LV: app-DaQeQsFXYsyhcgIFkxkUXWop
# 厌氧有机负荷
YAN_YANG_JI_FU_HE: app-quUgZTamWh2DDQomcTyZWek4
YAN_YANG_JI_FU_HE: app-raiYnTn1nWNcbQyWVHz4PM2O
# 污水碳源
WU_SHUI_TANYUAN: app-ZM1L5tm0LnSaHJ9tRF2JXJGe
WU_SHUI_TANYUAN: app-ZqdNaAjvUAGv2WOjrbIeCVj8
# 厌氧罐气率
YAN_YANG_GUAN_QI_LV: app-aLIGiBuUgj7yxUIlGUDgfn7v
YAN_YANG_GUAN_QI_LV: app-RNHvOynN5nAJQxKaK2kKAwFx
Loading…
Cancel
Save