镜像码相关代码
This commit is contained in:
parent
92e29bc8c6
commit
ee0c483125
|
|
@ -0,0 +1,52 @@
|
|||
package com.nu.modules.directivesynccode.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 镜像码
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_config_directive_sync_code")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_config_directive_org_code对象", description="镜像码")
|
||||
public class DirectiveOrgCode implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**机构编码*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
@ApiModelProperty(value = "机构编码")
|
||||
private java.lang.String orgCode;
|
||||
/**机构指令镜像码*/
|
||||
@Excel(name = "机构指令镜像码", width = 15)
|
||||
@ApiModelProperty(value = "机构指令镜像码")
|
||||
private java.lang.String orgDirectiveCode;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.nu.modules.directivesynccode.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.directivesynccode.entity.DirectiveOrgCode;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 镜像码
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DirectiveOrgCodeMapper extends BaseMapper<DirectiveOrgCode> {
|
||||
|
||||
int deletePhysicsByOrgCode(@Param("orgCode") String orgCode);
|
||||
}
|
||||
|
|
@ -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">
|
||||
<mapper namespace="com.nu.modules.directivesynccode.mapper.DirectiveOrgCodeMapper">
|
||||
|
||||
<delete id="deletePhysicsByOrgCode">
|
||||
delete from nu_config_directive_org_code where org_code = #{orgCode}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.directivesynccode.service;
|
||||
|
||||
import com.nu.modules.directivesynccode.entity.DirectiveOrgCode;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 镜像码
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDirectiveOrgCodeService extends IService<DirectiveOrgCode> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
package com.nu.modules.directivesynccode.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.directive.api.IDirectiveSyncCodeApi;
|
||||
import com.nu.modules.directivesynccode.entity.DirectiveOrgCode;
|
||||
import com.nu.modules.directivesynccode.mapper.DirectiveOrgCodeMapper;
|
||||
import com.nu.modules.directivesynccode.service.IDirectiveOrgCodeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @Description: 镜像码
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DirectiveOrgCodeServiceImpl extends ServiceImpl<DirectiveOrgCodeMapper, DirectiveOrgCode> implements IDirectiveOrgCodeService, IDirectiveSyncCodeApi {
|
||||
|
||||
@Override
|
||||
public String generateDirectiveSyncCode(String createBy,String orgCode) {
|
||||
boolean isFinish = false;
|
||||
String code = "";
|
||||
do {
|
||||
code = generateRandomMixedString();
|
||||
QueryWrapper<DirectiveOrgCode> qw = new QueryWrapper<>();
|
||||
qw.eq("org_directive_code", code);
|
||||
DirectiveOrgCode one = baseMapper.selectOne(qw);
|
||||
if (one == null) {
|
||||
//删除 - 根据orgCode
|
||||
baseMapper.deletePhysicsByOrgCode(orgCode);
|
||||
|
||||
//新增
|
||||
DirectiveOrgCode directiveOrgCode = new DirectiveOrgCode();
|
||||
directiveOrgCode.setOrgCode(orgCode);//机构编码
|
||||
directiveOrgCode.setOrgDirectiveCode(code);//镜像码
|
||||
directiveOrgCode.setCreateBy(createBy);//生成人
|
||||
baseMapper.insert(directiveOrgCode);
|
||||
|
||||
isFinish = true;
|
||||
}
|
||||
} while (!isFinish); //未完成时继续(即:编码重复时)
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOrgCodeBySyncCode(String syncCode) {
|
||||
QueryWrapper<DirectiveOrgCode> qw = new QueryWrapper<>();
|
||||
qw.eq("org_directive_code", syncCode);
|
||||
DirectiveOrgCode one = baseMapper.selectOne(qw);
|
||||
if (one == null) {
|
||||
return null;
|
||||
} else {
|
||||
return one.getOrgCode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyncCodeByOrgCode(String orgCode) {
|
||||
QueryWrapper<DirectiveOrgCode> qw = new QueryWrapper<>();
|
||||
qw.eq("org_code", orgCode);
|
||||
DirectiveOrgCode one = baseMapper.selectOne(qw);
|
||||
if (one == null) {
|
||||
return null;
|
||||
} else {
|
||||
return one.getOrgDirectiveCode();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 6位随机 数字+小写英文
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String generateRandomMixedString() {
|
||||
Random random = new Random();
|
||||
|
||||
// 字符集
|
||||
String digits = "0123456789";
|
||||
String letters = "abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
// 随机确定数字和字母的数量
|
||||
int digitCount = random.nextInt(5) + 1; // 1-5个数字
|
||||
int letterCount = 6 - digitCount; // 剩下的是字母
|
||||
|
||||
List<Character> chars = new ArrayList<>();
|
||||
|
||||
// 添加数字
|
||||
for (int i = 0; i < digitCount; i++) {
|
||||
chars.add(digits.charAt(random.nextInt(digits.length())));
|
||||
}
|
||||
|
||||
// 添加字母
|
||||
for (int i = 0; i < letterCount; i++) {
|
||||
chars.add(letters.charAt(random.nextInt(letters.length())));
|
||||
}
|
||||
|
||||
// 打乱顺序
|
||||
Collections.shuffle(chars, random);
|
||||
|
||||
// 构建字符串
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (char c : chars) {
|
||||
sb.append(c);
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
package com.nu.modules.directivesynclog.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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 com.nu.modules.directivesynclog.entity.DirectiveSyncLogInfo;
|
||||
import com.nu.modules.directivesynclog.service.IDirectiveSyncLogInfoService;
|
||||
|
||||
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 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.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志详情表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="服务指令镜像日志详情表")
|
||||
@RestController
|
||||
@RequestMapping("/directivesynclog/directiveSyncLogInfo")
|
||||
@Slf4j
|
||||
public class DirectiveSyncLogInfoController extends JeecgController<DirectiveSyncLogInfo, IDirectiveSyncLogInfoService> {
|
||||
@Autowired
|
||||
private IDirectiveSyncLogInfoService directiveSyncLogInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param directiveSyncLogInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令镜像日志详情表-分页列表查询")
|
||||
@ApiOperation(value="服务指令镜像日志详情表-分页列表查询", notes="服务指令镜像日志详情表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<DirectiveSyncLogInfo>> queryPageList(DirectiveSyncLogInfo directiveSyncLogInfo,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<DirectiveSyncLogInfo> queryWrapper = QueryGenerator.initQueryWrapper(directiveSyncLogInfo, req.getParameterMap());
|
||||
Page<DirectiveSyncLogInfo> page = new Page<DirectiveSyncLogInfo>(pageNo, pageSize);
|
||||
IPage<DirectiveSyncLogInfo> pageList = directiveSyncLogInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param directiveSyncLogInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令镜像日志详情表-添加")
|
||||
@ApiOperation(value="服务指令镜像日志详情表-添加", notes="服务指令镜像日志详情表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody DirectiveSyncLogInfo directiveSyncLogInfo) {
|
||||
directiveSyncLogInfoService.save(directiveSyncLogInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param directiveSyncLogInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令镜像日志详情表-编辑")
|
||||
@ApiOperation(value="服务指令镜像日志详情表-编辑", notes="服务指令镜像日志详情表-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DirectiveSyncLogInfo directiveSyncLogInfo) {
|
||||
directiveSyncLogInfoService.updateById(directiveSyncLogInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令镜像日志详情表-通过id删除")
|
||||
@ApiOperation(value="服务指令镜像日志详情表-通过id删除", notes="服务指令镜像日志详情表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
directiveSyncLogInfoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令镜像日志详情表-批量删除")
|
||||
@ApiOperation(value="服务指令镜像日志详情表-批量删除", notes="服务指令镜像日志详情表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.directiveSyncLogInfoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令镜像日志详情表-通过id查询")
|
||||
@ApiOperation(value="服务指令镜像日志详情表-通过id查询", notes="服务指令镜像日志详情表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<DirectiveSyncLogInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DirectiveSyncLogInfo directiveSyncLogInfo = directiveSyncLogInfoService.getById(id);
|
||||
if(directiveSyncLogInfo==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(directiveSyncLogInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param directiveSyncLogInfo
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DirectiveSyncLogInfo directiveSyncLogInfo) {
|
||||
return super.exportXls(request, directiveSyncLogInfo, DirectiveSyncLogInfo.class, "服务指令镜像日志详情表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DirectiveSyncLogInfo.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
package com.nu.modules.directivesynclog.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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 com.nu.modules.directivesynclog.entity.DirectiveSyncLogMain;
|
||||
import com.nu.modules.directivesynclog.service.IDirectiveSyncLogMainService;
|
||||
|
||||
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 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.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="服务指令镜像日志主表")
|
||||
@RestController
|
||||
@RequestMapping("/directivesynclog/directiveSyncLogMain")
|
||||
@Slf4j
|
||||
public class DirectiveSyncLogMainController extends JeecgController<DirectiveSyncLogMain, IDirectiveSyncLogMainService> {
|
||||
@Autowired
|
||||
private IDirectiveSyncLogMainService directiveSyncLogMainService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param directiveSyncLogMain
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令镜像日志主表-分页列表查询")
|
||||
@ApiOperation(value="服务指令镜像日志主表-分页列表查询", notes="服务指令镜像日志主表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<DirectiveSyncLogMain>> queryPageList(DirectiveSyncLogMain directiveSyncLogMain,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// 自定义查询规则
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||
customeRuleMap.put("opeOrgCode", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("targetOrgCode", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<DirectiveSyncLogMain> queryWrapper = QueryGenerator.initQueryWrapper(directiveSyncLogMain, req.getParameterMap(),customeRuleMap);
|
||||
Page<DirectiveSyncLogMain> page = new Page<DirectiveSyncLogMain>(pageNo, pageSize);
|
||||
IPage<DirectiveSyncLogMain> pageList = directiveSyncLogMainService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param directiveSyncLogMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令镜像日志主表-添加")
|
||||
@ApiOperation(value="服务指令镜像日志主表-添加", notes="服务指令镜像日志主表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody DirectiveSyncLogMain directiveSyncLogMain) {
|
||||
directiveSyncLogMainService.save(directiveSyncLogMain);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param directiveSyncLogMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令镜像日志主表-编辑")
|
||||
@ApiOperation(value="服务指令镜像日志主表-编辑", notes="服务指令镜像日志主表-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DirectiveSyncLogMain directiveSyncLogMain) {
|
||||
directiveSyncLogMainService.updateById(directiveSyncLogMain);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令镜像日志主表-通过id删除")
|
||||
@ApiOperation(value="服务指令镜像日志主表-通过id删除", notes="服务指令镜像日志主表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
directiveSyncLogMainService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务指令镜像日志主表-批量删除")
|
||||
@ApiOperation(value="服务指令镜像日志主表-批量删除", notes="服务指令镜像日志主表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.directiveSyncLogMainService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "服务指令镜像日志主表-通过id查询")
|
||||
@ApiOperation(value="服务指令镜像日志主表-通过id查询", notes="服务指令镜像日志主表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<DirectiveSyncLogMain> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DirectiveSyncLogMain directiveSyncLogMain = directiveSyncLogMainService.getById(id);
|
||||
if(directiveSyncLogMain==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(directiveSyncLogMain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param directiveSyncLogMain
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DirectiveSyncLogMain directiveSyncLogMain) {
|
||||
return super.exportXls(request, directiveSyncLogMain, DirectiveSyncLogMain.class, "服务指令镜像日志主表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DirectiveSyncLogMain.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
package com.nu.modules.directivesynclog.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志详情表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_config_directive_sync_log_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "nu_config_directive_sync_log_info对象", description = "服务指令镜像日志详情表")
|
||||
public class DirectiveSyncLogInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**
|
||||
* nu_config_directive_sync_log_main.id
|
||||
*/
|
||||
@ApiModelProperty(value = "pkId")
|
||||
private String pkId;
|
||||
/**
|
||||
* 分类标签
|
||||
*/
|
||||
@Excel(name = "分类标签ID", width = 15)
|
||||
@ApiModelProperty(value = "分类标签")
|
||||
private java.lang.String instructionTagId;
|
||||
/**
|
||||
* 分类标签
|
||||
*/
|
||||
@Excel(name = "分类标签名称", width = 15)
|
||||
@ApiModelProperty(value = "分类标签")
|
||||
private java.lang.String instructionTagName;
|
||||
/**
|
||||
* 服务类别id
|
||||
*/
|
||||
@Excel(name = "服务类别id", width = 15)
|
||||
@ApiModelProperty(value = "服务类别id")
|
||||
private java.lang.String categoryId;
|
||||
/**
|
||||
* 服务类别id
|
||||
*/
|
||||
@Excel(name = "服务类别名称", width = 15)
|
||||
@ApiModelProperty(value = "服务类别id")
|
||||
private java.lang.String categoryName;
|
||||
/**
|
||||
* 服务类型id
|
||||
*/
|
||||
@Excel(name = "服务类型id", width = 15)
|
||||
@ApiModelProperty(value = "服务类型id")
|
||||
private java.lang.String typeId;
|
||||
/**
|
||||
* 服务类型id
|
||||
*/
|
||||
@Excel(name = "服务类型名称", width = 15)
|
||||
@ApiModelProperty(value = "服务类型id")
|
||||
private java.lang.String typeName;
|
||||
/**
|
||||
* 服务指令id
|
||||
*/
|
||||
@Excel(name = "服务指令id", width = 15)
|
||||
@ApiModelProperty(value = "服务指令id")
|
||||
private java.lang.String directiveId;
|
||||
/**
|
||||
* 服务指令名称
|
||||
*/
|
||||
@Excel(name = "服务指令名称", width = 15)
|
||||
@ApiModelProperty(value = "服务指令名称")
|
||||
private java.lang.String directiveName;
|
||||
/**
|
||||
* 收费价格
|
||||
*/
|
||||
@Excel(name = "收费价格", width = 15)
|
||||
@ApiModelProperty(value = "收费价格")
|
||||
private java.math.BigDecimal tollPrice;
|
||||
/**
|
||||
* 提成价格
|
||||
*/
|
||||
@Excel(name = "提成价格", width = 15)
|
||||
@ApiModelProperty(value = "提成价格")
|
||||
private java.math.BigDecimal comPrice;
|
||||
/**
|
||||
* 周期类型 1日常护理 2周期护理 3即时护理
|
||||
*/
|
||||
@Excel(name = "周期类型 1日常护理 2周期护理 3即时护理", width = 15)
|
||||
@ApiModelProperty(value = "周期类型 1日常护理 2周期护理 3即时护理")
|
||||
@Dict(dicCode = "period_type")
|
||||
private java.lang.String cycleType;
|
||||
/**
|
||||
* 服务说明
|
||||
*/
|
||||
@Excel(name = "服务说明", width = 15)
|
||||
@ApiModelProperty(value = "服务说明")
|
||||
private java.lang.String serviceContent;
|
||||
/**
|
||||
* 服务时长(分钟)
|
||||
*/
|
||||
@Excel(name = "服务时长(分钟)", width = 15)
|
||||
@ApiModelProperty(value = "服务时长(分钟)")
|
||||
private java.lang.String serviceDuration;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**
|
||||
* 语音文件
|
||||
*/
|
||||
@Excel(name = "语音文件", width = 15)
|
||||
@ApiModelProperty(value = "语音文件")
|
||||
private java.lang.String mp3File;
|
||||
/**
|
||||
* 视频文件
|
||||
*/
|
||||
@Excel(name = "视频文件", width = 15)
|
||||
@ApiModelProperty(value = "视频文件")
|
||||
private java.lang.String mp4File;
|
||||
/**
|
||||
* 服务指令图片大图
|
||||
*/
|
||||
@Excel(name = "服务指令图片大图", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片大图")
|
||||
private java.lang.String previewFile;
|
||||
/**
|
||||
* 服务指令图片小图
|
||||
*/
|
||||
@Excel(name = "服务指令图片小图", width = 15)
|
||||
@ApiModelProperty(value = "服务指令图片小图")
|
||||
private java.lang.String previewFileSmall;
|
||||
/**
|
||||
* 即时指令图片
|
||||
*/
|
||||
@Excel(name = "即时指令图片", width = 15)
|
||||
@ApiModelProperty(value = "即时指令图片")
|
||||
private java.lang.String immediateFile;
|
||||
/**
|
||||
* 即时指令焦点图片
|
||||
*/
|
||||
@Excel(name = "即时指令焦点图片", width = 15)
|
||||
@ApiModelProperty(value = "即时指令焦点图片")
|
||||
private java.lang.String immediateFileFocus;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.nu.modules.directivesynclog.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
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.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_config_directive_sync_log_main")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_config_directive_sync_log_main对象", description="服务指令镜像日志主表")
|
||||
public class DirectiveSyncLogMain implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**哪个机构镜像的*/
|
||||
@Excel(name = "哪个机构镜像的", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
|
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
|
||||
@ApiModelProperty(value = "哪个机构镜像的")
|
||||
private java.lang.String opeOrgCode;
|
||||
/**镜像的哪个机构的指令*/
|
||||
@Excel(name = "镜像的哪个机构的指令", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
|
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
|
||||
@ApiModelProperty(value = "镜像的哪个机构的指令")
|
||||
private java.lang.String targetOrgCode;
|
||||
/**指令镜像码*/
|
||||
@Excel(name = "指令镜像码", width = 15)
|
||||
@ApiModelProperty(value = "指令镜像码")
|
||||
private java.lang.String orgDirectiveCode;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.directivesynclog.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.directivesynclog.entity.DirectiveSyncLogInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志详情表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DirectiveSyncLogInfoMapper extends BaseMapper<DirectiveSyncLogInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.directivesynclog.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.directivesynclog.entity.DirectiveSyncLogMain;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DirectiveSyncLogMainMapper extends BaseMapper<DirectiveSyncLogMain> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.directivesynclog.mapper.DirectiveSyncLogInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.directivesynclog.mapper.DirectiveSyncLogMainMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.directivesynclog.service;
|
||||
|
||||
import com.nu.modules.directivesynclog.entity.DirectiveSyncLogInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志详情表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDirectiveSyncLogInfoService extends IService<DirectiveSyncLogInfo> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.directivesynclog.service;
|
||||
|
||||
import com.nu.modules.directivesynclog.entity.DirectiveSyncLogMain;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDirectiveSyncLogMainService extends IService<DirectiveSyncLogMain> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.directivesynclog.service.impl;
|
||||
|
||||
import com.nu.modules.directivesynclog.entity.DirectiveSyncLogInfo;
|
||||
import com.nu.modules.directivesynclog.mapper.DirectiveSyncLogInfoMapper;
|
||||
import com.nu.modules.directivesynclog.service.IDirectiveSyncLogInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志详情表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DirectiveSyncLogInfoServiceImpl extends ServiceImpl<DirectiveSyncLogInfoMapper, DirectiveSyncLogInfo> implements IDirectiveSyncLogInfoService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.directivesynclog.service.impl;
|
||||
|
||||
import com.nu.modules.directivesynclog.entity.DirectiveSyncLogMain;
|
||||
import com.nu.modules.directivesynclog.mapper.DirectiveSyncLogMainMapper;
|
||||
import com.nu.modules.directivesynclog.service.IDirectiveSyncLogMainService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令镜像日志主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DirectiveSyncLogMainServiceImpl extends ServiceImpl<DirectiveSyncLogMainMapper, DirectiveSyncLogMain> implements IDirectiveSyncLogMainService {
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue