Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-pcitc into dev
# Conflicts: # itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/mdm/controller/LNGStationController.java # itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/mdm/controller/PortController.java
This commit is contained in:
@ -60,7 +60,7 @@ public class CategoryController {
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBCategory::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getUnitCode()),LngBCategory::getUnitCode,dto.getUnitCode())
|
||||
.eq(ObjectUtil.isNotNull(dto.getCoefficient()),LngBCategory::getCoefficient,dto.getCoefficient())
|
||||
.like(StrUtil.isNotBlank(dto.getSort()),LngBCategory::getSort,dto.getSort())
|
||||
//.like(StrUtil.isNotBlank(dto.getSort()),LngBCategory::getSort,dto.getSort())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBCategory::getNote,dto.getNote())
|
||||
.orderByDesc(LngBCategory::getId)
|
||||
.select(LngBCategory.class,x -> VoToColumnUtil.fieldsToColumns(LngBCategoryPageVo.class).contains(x.getProperty()));
|
||||
|
||||
@ -181,8 +181,8 @@ public class CountryRegionController {
|
||||
}));
|
||||
|
||||
List<LngBRegionVo> voList = CollectionUtils.newArrayList();
|
||||
if(voList != null && voList.size() > 0) {
|
||||
for(LngBRegionVo br:voList) {
|
||||
if(voList != null && regionList.size() > 0) {
|
||||
for(LngBRegion br:regionList) {
|
||||
LngBRegionVo vo = new LngBRegionVo();
|
||||
BeanUtil.copyProperties(br, vo);
|
||||
Long parentId = br.getPid();
|
||||
|
||||
@ -0,0 +1,142 @@
|
||||
package com.xjrsoft.module.mdm.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.mdm.dto.LngBStationPngPageDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBStationPngDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBStationPng;
|
||||
import com.xjrsoft.module.mdm.service.IPipeGasDownloadPointService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBStationPngPageVo;
|
||||
import com.xjrsoft.module.mdm.vo.LngBStationPngVo;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* @title: 管道气上下载点
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mdm/pipeGasDownloadPoint")
|
||||
@Api(value = "/mdm" + "/pipeGasDownloadPoint",tags = "管道气上下载点代码")
|
||||
@AllArgsConstructor
|
||||
public class PipeGasDownloadPointController {
|
||||
|
||||
|
||||
private final IPipeGasDownloadPointService pipeGasDownloadPointService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngBStationPng列表(分页)")
|
||||
@SaCheckPermission("pipeGasDownloadPoint:list")
|
||||
public R page(@Valid LngBStationPngPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngBStationPng> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBStationPng::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBStationPng::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getPipelineCode()),LngBStationPng::getPipelineCode,dto.getPipelineCode())
|
||||
.like(StrUtil.isNotBlank(dto.getEnterprise()),LngBStationPng::getEnterprise,dto.getEnterprise())
|
||||
.like(StrUtil.isNotBlank(dto.getContact()),LngBStationPng::getContact,dto.getContact())
|
||||
.like(StrUtil.isNotBlank(dto.getTel()),LngBStationPng::getTel,dto.getTel())
|
||||
.like(StrUtil.isNotBlank(dto.getEmail()),LngBStationPng::getEmail,dto.getEmail())
|
||||
.like(StrUtil.isNotBlank(dto.getRegionCode()),LngBStationPng::getRegionCode,dto.getRegionCode())
|
||||
.like(StrUtil.isNotBlank(dto.getAddr()),LngBStationPng::getAddr,dto.getAddr())
|
||||
.like(StrUtil.isNotBlank(dto.getAddrMail()),LngBStationPng::getAddrMail,dto.getAddrMail())
|
||||
.like(StrUtil.isNotBlank(dto.getOwnSign()),LngBStationPng::getOwnSign,dto.getOwnSign())
|
||||
.like(StrUtil.isNotBlank(dto.getStaCodeLng()),LngBStationPng::getStaCodeLng,dto.getStaCodeLng())
|
||||
.like(StrUtil.isNotBlank(dto.getOwnLineSign()),LngBStationPng::getOwnLineSign,dto.getOwnLineSign())
|
||||
//.like(StrUtil.isNotBlank(dto.getSort()),LngBStationPng::getSort,dto.getSort())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBStationPng::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBStationPng::getNote,dto.getNote())
|
||||
.orderByDesc(LngBStationPng::getId)
|
||||
.select(LngBStationPng.class,x -> VoToColumnUtil.fieldsToColumns(LngBStationPngPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngBStationPng> page = pipeGasDownloadPointService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngBStationPngPageVo> pageOutput = ConventPage.getPageOutput(page, LngBStationPngPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngBStationPng信息")
|
||||
@SaCheckPermission("pipeGasDownloadPoint:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngBStationPng lngBStationPng = pipeGasDownloadPointService.getById(id);
|
||||
if (lngBStationPng == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBStationPng, LngBStationPngVo.class));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngBStationPng")
|
||||
@SaCheckPermission("pipeGasDownloadPoint:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBStationPngDto dto){
|
||||
return R.ok(pipeGasDownloadPointService.add(dto));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngBStationPng")
|
||||
@SaCheckPermission("pipeGasDownloadPoint:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBStationPngDto dto){
|
||||
return R.ok(pipeGasDownloadPointService.update(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("pipeGasDownloadPoint:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBStationPngDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/enable")
|
||||
@ApiOperation(value = "启用")
|
||||
@SaCheckPermission("pipeGasDownloadPoint:enable")
|
||||
public R enable(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(pipeGasDownloadPointService.enable(ids));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/disable")
|
||||
@ApiOperation(value = "禁用")
|
||||
@SaCheckPermission("pipeGasDownloadPoint:disable")
|
||||
public R disable(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(pipeGasDownloadPointService.disable(ids));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngBStationPng数据详细日志")
|
||||
@SaCheckPermission("pipeGasDownloadPoint:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBBankDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
package com.xjrsoft.module.mdm.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.mdm.dto.AddLngBPngLineDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBPngLineDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.mdm.dto.LngBPngLinePageDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPngLine;
|
||||
import com.xjrsoft.module.mdm.service.IPipelineGgasLineService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBPngLinePageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.mdm.vo.LngBPngLineVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: 管道气管线
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mdm/pipelineGgasLine")
|
||||
@Api(value = "/mdm" + "/pipelineGgasLine",tags = "管道气管线代码")
|
||||
@AllArgsConstructor
|
||||
public class PipelineGgasLineController {
|
||||
|
||||
|
||||
private final IPipelineGgasLineService pipelineGgasLineService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngBPngLine列表(分页)")
|
||||
@SaCheckPermission("pipelineGgasLine:list")
|
||||
public R page(@Valid LngBPngLinePageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngBPngLine> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBPngLine::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBPngLine::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBPngLine::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getOwnSign()),LngBPngLine::getOwnSign,dto.getOwnSign())
|
||||
.like(StrUtil.isNotBlank(dto.getStaCodeLng()),LngBPngLine::getStaCodeLng,dto.getStaCodeLng())
|
||||
//.like(StrUtil.isNotBlank(dto.getSort()),LngBPngLine::getSort,dto.getSort())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBPngLine::getNote,dto.getNote())
|
||||
.orderByDesc(LngBPngLine::getId)
|
||||
.select(LngBPngLine.class,x -> VoToColumnUtil.fieldsToColumns(LngBPngLinePageVo.class).contains(x.getProperty()));
|
||||
IPage<LngBPngLine> page = pipelineGgasLineService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngBPngLinePageVo> pageOutput = ConventPage.getPageOutput(page, LngBPngLinePageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngBPngLine信息")
|
||||
@SaCheckPermission("pipelineGgasLine:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngBPngLine lngBPngLine = pipelineGgasLineService.getById(id);
|
||||
if (lngBPngLine == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBPngLine, LngBPngLineVo.class));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngBPngLine")
|
||||
@SaCheckPermission("pipelineGgasLine:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBPngLineDto dto){
|
||||
return R.ok(pipelineGgasLineService.add(dto));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngBPngLine")
|
||||
@SaCheckPermission("pipelineGgasLine:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBPngLineDto dto){
|
||||
return R.ok(pipelineGgasLineService.update(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("pipelineGgasLine:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBPngLineDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/enable")
|
||||
@ApiOperation(value = "启用")
|
||||
@SaCheckPermission("pipelineGgasLine:enable")
|
||||
public R enable(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(pipelineGgasLineService.enable(ids));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/disable")
|
||||
@ApiOperation(value = "禁用")
|
||||
@SaCheckPermission("pipelineGgasLine:disable")
|
||||
public R disable(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(pipelineGgasLineService.disable(ids));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngBPngLine数据详细日志")
|
||||
@SaCheckPermission("pipelineGgasLine:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBBankDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,140 @@
|
||||
package com.xjrsoft.module.mdm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.github.yulichang.annotation.EntityMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 管道气管线
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_b_png_line")
|
||||
@ApiModel(value = "管道气管线对象", description = "管道气管线")
|
||||
public class LngBPngLine implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 助记码(自动生成,4位,0001……)
|
||||
*/
|
||||
@ApiModelProperty("助记码(自动生成,4位,0001……)")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 名称(不能重复)
|
||||
*/
|
||||
@ApiModelProperty("名称(不能重复)")
|
||||
private String fullName;
|
||||
|
||||
/**
|
||||
* 自有管道标识(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("自有管道标识(Y-是,N-否)")
|
||||
private String ownSign;
|
||||
|
||||
/**
|
||||
* 自有接收站(惠州/阳江)
|
||||
*/
|
||||
@ApiModelProperty("自有接收站(惠州/阳江)")
|
||||
private String staCodeLng;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
private Short sort;
|
||||
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
private String valid;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*/
|
||||
@ApiModelProperty("逻辑删除")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@TableLogic
|
||||
private Integer deleteMark;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,194 @@
|
||||
package com.xjrsoft.module.mdm.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.github.yulichang.annotation.EntityMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 管道气上下载点
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_b_station_png")
|
||||
@ApiModel(value = "管道气上下载点对象", description = "管道气上下载点")
|
||||
public class LngBStationPng implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String fullName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String pipelineCode;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String enterprise;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String contact;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String tel;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String regionCode;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String addr;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String addrMail;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String ownSign;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String staCodeLng;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String ownLineSign;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Short sort;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String valid;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@TableLogic
|
||||
private Integer deleteMark;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty("")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.mdm.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPngLine;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngBPngLineMapper extends BaseMapper<LngBPngLine> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.mdm.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.mdm.entity.LngBStationPng;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngBStationPngMapper extends BaseMapper<LngBStationPng> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.mdm.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBStationPngDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBStationPng;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IPipeGasDownloadPointService extends IService<LngBStationPng> {
|
||||
|
||||
Boolean enable(List<Long> ids);
|
||||
|
||||
Boolean disable(List<Long> ids);
|
||||
|
||||
Long add(UpdateLngBStationPngDto dto);
|
||||
|
||||
Long update(UpdateLngBStationPngDto dto);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.mdm.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBPngLineDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPngLine;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IPipelineGgasLineService extends IService<LngBPngLine> {
|
||||
|
||||
Boolean disable(List<Long> ids);
|
||||
|
||||
Boolean enable(List<Long> ids);
|
||||
|
||||
Long add(UpdateLngBPngLineDto dto);
|
||||
|
||||
Long update(UpdateLngBPngLineDto dto);
|
||||
}
|
||||
@ -38,16 +38,16 @@ public class BankServiceImpl extends ServiceImpl<LngBBankMapper, LngBBank> imple
|
||||
|
||||
private final ICodeRuleClient codeRuleClient;
|
||||
|
||||
private final String BANKCODE = "bankCode";
|
||||
private final String BANK_CODE = "bankCode";
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long add(UpdateLngBBankDto dto) {
|
||||
String code = codeRuleClient.genEncode(BANKCODE);
|
||||
String code = codeRuleClient.genEncode(BANK_CODE);
|
||||
dto.setCode(code);
|
||||
this.checkParams(dto);
|
||||
UpdateLngBBankDto res = DataLogTools.insert(dto);
|
||||
codeRuleClient.useEncode(BANKCODE);
|
||||
codeRuleClient.useEncode(BANK_CODE);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
@ -65,7 +65,7 @@ public class BankServiceImpl extends ServiceImpl<LngBBankMapper, LngBBank> imple
|
||||
public boolean enable(List<Long> ids) {
|
||||
DataLogTools.enable(UpdateLngBBankDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_BANK, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
@ -79,7 +79,7 @@ public class BankServiceImpl extends ServiceImpl<LngBBankMapper, LngBBank> imple
|
||||
DataLogTools.disable(UpdateLngBBankDto.class,ids);
|
||||
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_BANK, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ public class CountryRegionServiceImpl extends ServiceImpl<LngBRegionMapper, LngB
|
||||
public boolean enable(List<Long> ids) {
|
||||
dataService.enable(UpdateLngBRegionDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_REGION, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class CountryRegionServiceImpl extends ServiceImpl<LngBRegionMapper, LngB
|
||||
public boolean disable(List<Long> ids) {
|
||||
dataService.disable(UpdateLngBRegionDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_REGION, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
|
||||
@ -0,0 +1,113 @@
|
||||
package com.xjrsoft.module.mdm.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.pictc.constant.FieldNameConstants;
|
||||
import com.pictc.constant.TableNameConstants;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.pictc.enums.ExceptionCommonCode;
|
||||
import com.pictc.utils.DataLogTools;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.common.db.service.CommonCallService;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBStationPngDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBStationPng;
|
||||
import com.xjrsoft.module.mdm.mapper.LngBStationPngMapper;
|
||||
import com.xjrsoft.module.mdm.service.IPipeGasDownloadPointService;
|
||||
import com.xjrsoft.module.system.client.ICodeRuleClient;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PipeGasDownloadPointServiceImpl extends ServiceImpl<LngBStationPngMapper, LngBStationPng> implements IPipeGasDownloadPointService {
|
||||
|
||||
private final CommonCallService commonCallService;
|
||||
|
||||
private final ICodeRuleClient codeRuleClient;
|
||||
|
||||
private final String PNG_DL_POINT_CODE = "pngDlPointCode";
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long add(UpdateLngBStationPngDto dto) {
|
||||
String code = codeRuleClient.genEncode(PNG_DL_POINT_CODE);
|
||||
dto.setCode(code);
|
||||
this.checkParams(dto);
|
||||
UpdateLngBStationPngDto res = DataLogTools.insert(dto);
|
||||
codeRuleClient.useEncode(PNG_DL_POINT_CODE);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long update(UpdateLngBStationPngDto dto) {
|
||||
this.checkParams(dto);
|
||||
UpdateLngBStationPngDto res = DataLogTools.update(dto);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean enable(List<Long> ids) {
|
||||
DataLogTools.enable(UpdateLngBStationPngDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_STATION_PNG, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean disable(List<Long> ids) {
|
||||
DataLogTools.disable(UpdateLngBStationPngDto.class,ids);
|
||||
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_STATION_PNG, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void checkParams(UpdateLngBStationPngDto dto) {
|
||||
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBStationPng>()
|
||||
.eq(LngBStationPng::getCode, dto.getCode()).ne(dto.getId() != null, LngBStationPng::getId, dto.getId()));
|
||||
if (codeCount > 0) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||
FieldNameConstants.CODE));
|
||||
}
|
||||
|
||||
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBStationPng>()
|
||||
.eq(LngBStationPng::getFullName, dto.getFullName()).ne(dto.getId() != null, LngBStationPng::getId, dto.getId()));
|
||||
if (nameCount > 0) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||
FieldNameConstants.FULL_NAME));
|
||||
}
|
||||
}
|
||||
|
||||
private void addOrUpdateAfter(Long id) {
|
||||
String msg = commonCallService.saveAfter(TableNameConstants.LNG_B_STATION_PNG, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
package com.xjrsoft.module.mdm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.pictc.constant.FieldNameConstants;
|
||||
import com.pictc.constant.TableNameConstants;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
import com.pictc.enums.ExceptionCommonCode;
|
||||
import com.pictc.utils.DataLogTools;
|
||||
import com.xjrsoft.common.exception.BusinessException;
|
||||
import com.xjrsoft.module.common.db.service.CommonCallService;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBPngLineDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBPngLineDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPngLine;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPngLine;
|
||||
import com.xjrsoft.module.mdm.mapper.LngBPngLineMapper;
|
||||
import com.xjrsoft.module.mdm.service.IPipelineGgasLineService;
|
||||
import com.xjrsoft.module.system.client.ICodeRuleClient;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PipelineGgasLineServiceImpl extends ServiceImpl<LngBPngLineMapper, LngBPngLine> implements IPipelineGgasLineService {
|
||||
|
||||
|
||||
private final CommonCallService commonCallService;
|
||||
|
||||
private final ICodeRuleClient codeRuleClient;
|
||||
|
||||
private final String PNG_LINE_CODE = "pngLineCode";
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long add(UpdateLngBPngLineDto dto) {
|
||||
String code = codeRuleClient.genEncode(PNG_LINE_CODE);
|
||||
dto.setCode(code);
|
||||
this.checkParams(dto);
|
||||
UpdateLngBPngLineDto res = DataLogTools.insert(dto);
|
||||
codeRuleClient.useEncode(PNG_LINE_CODE);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long update(UpdateLngBPngLineDto dto) {
|
||||
this.checkParams(dto);
|
||||
UpdateLngBPngLineDto res = DataLogTools.update(dto);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean enable(List<Long> ids) {
|
||||
DataLogTools.enable(UpdateLngBPngLineDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PNG_LINE, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean disable(List<Long> ids) {
|
||||
DataLogTools.disable(UpdateLngBPngLineDto.class,ids);
|
||||
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PNG_LINE, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void checkParams(UpdateLngBPngLineDto dto) {
|
||||
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBPngLine>()
|
||||
.eq(LngBPngLine::getCode, dto.getCode()).ne(dto.getId() != null, LngBPngLine::getId, dto.getId()));
|
||||
if (codeCount > 0) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||
FieldNameConstants.CODE));
|
||||
}
|
||||
|
||||
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBPngLine>()
|
||||
.eq(LngBPngLine::getFullName, dto.getFullName()).ne(dto.getId() != null, LngBPngLine::getId, dto.getId()));
|
||||
if (nameCount > 0) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||
FieldNameConstants.FULL_NAME));
|
||||
}
|
||||
}
|
||||
|
||||
private void addOrUpdateAfter(Long id) {
|
||||
String msg = commonCallService.saveAfter(TableNameConstants.LNG_B_PNG_LINE, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user