生成港口 等代码
This commit is contained in:
@ -0,0 +1,107 @@
|
||||
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.AddLngBCategoryDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBCategoryDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.mdm.dto.LngBCategoryPageDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBCategory;
|
||||
import com.xjrsoft.module.mdm.service.ICategoryService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBCategoryPageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBCategoryVo;
|
||||
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" + "/category")
|
||||
@Api(value = "/mdm" + "/category",tags = "品种代码")
|
||||
@AllArgsConstructor
|
||||
public class CategoryController {
|
||||
|
||||
|
||||
private final ICategoryService categoryService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngBCategory列表(分页)")
|
||||
@SaCheckPermission("category:list")
|
||||
public R page(@Valid LngBCategoryPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngBCategory> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBCategory::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBCategory::getValid,dto.getValid())
|
||||
.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.getNote()),LngBCategory::getNote,dto.getNote())
|
||||
.orderByDesc(LngBCategory::getId)
|
||||
.select(LngBCategory.class,x -> VoToColumnUtil.fieldsToColumns(LngBCategoryPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngBCategory> page = categoryService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngBCategoryPageVo> pageOutput = ConventPage.getPageOutput(page, LngBCategoryPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngBCategory信息")
|
||||
@SaCheckPermission("category:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngBCategory lngBCategory = categoryService.getById(id);
|
||||
if (lngBCategory == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBCategory, LngBCategoryVo.class));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngBCategory")
|
||||
@SaCheckPermission("category:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBCategoryDto dto){
|
||||
UpdateLngBCategoryDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngBCategory")
|
||||
@SaCheckPermission("category:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBCategoryDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("category:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBCategoryDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -139,6 +139,7 @@ public class CountryRegionController {
|
||||
for(LngBRegion br:list) {
|
||||
LngBRegionTreeVo vo = new LngBRegionTreeVo();
|
||||
BeanUtil.copyProperties(br, vo);
|
||||
|
||||
if(br.getPid() != null) {
|
||||
vo.setParentId(String.valueOf(br.getPid()) );
|
||||
}else {
|
||||
@ -178,8 +179,25 @@ public class CountryRegionController {
|
||||
.and(StrUtil.isNotBlank(keyword), x -> {
|
||||
x.like(StrUtil.isNotBlank(keyword), LngBRegion::getFullName, keyword);
|
||||
}));
|
||||
|
||||
List<LngBRegionVo> voList = CollectionUtils.newArrayList();
|
||||
if(voList != null && voList.size() > 0) {
|
||||
for(LngBRegionVo br:voList) {
|
||||
LngBRegionVo vo = new LngBRegionVo();
|
||||
BeanUtil.copyProperties(br, vo);
|
||||
Long parentId = br.getPid();
|
||||
if(parentId == null) {
|
||||
parentId = 0L;
|
||||
}
|
||||
Long codeCount = countryRegionService.count(new LambdaQueryWrapper<LngBRegion>()
|
||||
.eq(LngBRegion::getPid, parentId));
|
||||
if(codeCount > 0) {
|
||||
vo.setHasChild(true);
|
||||
}
|
||||
voList.add(vo);
|
||||
}
|
||||
}
|
||||
|
||||
List<LngBRegionVo> resultList = BeanUtil.copyToList(regionList, LngBRegionVo.class);
|
||||
return R.ok(resultList);
|
||||
return R.ok(voList);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
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.AddLngBDocCpDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBDocCpDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.mdm.dto.LngBDocCpPageDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBDocCp;
|
||||
import com.xjrsoft.module.mdm.service.IDocCpService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBDocCpPageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBDocCpVo;
|
||||
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" + "/docCp")
|
||||
@Api(value = "/mdm" + "/docCp",tags = "公司资质证书代码")
|
||||
@AllArgsConstructor
|
||||
public class DocCpController {
|
||||
|
||||
|
||||
private final IDocCpService docCpService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngBDocCp列表(分页)")
|
||||
@SaCheckPermission("docCp:list")
|
||||
public R page(@Valid LngBDocCpPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngBDocCp> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBDocCp::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBDocCp::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBDocCp::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getSuSign()),LngBDocCp::getSuSign,dto.getSuSign())
|
||||
.like(StrUtil.isNotBlank(dto.getSuNecSign()),LngBDocCp::getSuNecSign,dto.getSuNecSign())
|
||||
.like(StrUtil.isNotBlank(dto.getCuSign()),LngBDocCp::getCuSign,dto.getCuSign())
|
||||
.like(StrUtil.isNotBlank(dto.getCuNecSign()),LngBDocCp::getCuNecSign,dto.getCuNecSign())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBDocCp::getNote,dto.getNote())
|
||||
.orderByDesc(LngBDocCp::getId)
|
||||
.select(LngBDocCp.class,x -> VoToColumnUtil.fieldsToColumns(LngBDocCpPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngBDocCp> page = docCpService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngBDocCpPageVo> pageOutput = ConventPage.getPageOutput(page, LngBDocCpPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngBDocCp信息")
|
||||
@SaCheckPermission("docCp:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngBDocCp lngBDocCp = docCpService.getById(id);
|
||||
if (lngBDocCp == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBDocCp, LngBDocCpVo.class));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngBDocCp")
|
||||
@SaCheckPermission("docCp:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBDocCpDto dto){
|
||||
UpdateLngBDocCpDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngBDocCp")
|
||||
@SaCheckPermission("docCp:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBDocCpDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("docCp:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBDocCpDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -17,11 +17,13 @@ import com.xjrsoft.module.mdm.dto.UpdateLngBFeeDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.mdm.dto.LngBFeePageDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBFee;
|
||||
import com.xjrsoft.module.mdm.service.IExpenseNameService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBFeePageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.mdm.vo.LngBFeeVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -83,23 +85,45 @@ public class ExpenseNameController {
|
||||
@ApiOperation(value = "新增LngBFee")
|
||||
@SaCheckPermission("expenseName:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBFeeDto dto){
|
||||
UpdateLngBFeeDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
return R.ok(expenseNameService.add(dto));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngBFee")
|
||||
@SaCheckPermission("expenseName:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBFeeDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
return R.ok(expenseNameService.update(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("expenseName:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBFeeDto.class, ids));
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBFeeDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngBFee数据详细日志")
|
||||
@SaCheckPermission("expenseName:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBFeeDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
@PostMapping("/enable")
|
||||
@ApiOperation(value = "启用")
|
||||
@SaCheckPermission("expenseName:enable")
|
||||
public R enable(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(expenseNameService.enable(ids));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/disable")
|
||||
@ApiOperation(value = "禁用")
|
||||
@SaCheckPermission("expenseName:disable")
|
||||
public R disable(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(expenseNameService.disable(ids));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
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.AddLngBStationLngDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBStationLngDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.mdm.dto.LngBStationLngPageDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBStationLng;
|
||||
import com.xjrsoft.module.mdm.service.ILNGStationService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBStationLngPageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBStationLngVo;
|
||||
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: LNG气源地
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mdm" + "/lNGStation")
|
||||
@Api(value = "/mdm" + "/lNGStation",tags = "LNG气源地代码")
|
||||
@AllArgsConstructor
|
||||
public class LNGStationController {
|
||||
|
||||
|
||||
private final ILNGStationService lNGStationService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngBStationLng列表(分页)")
|
||||
@SaCheckPermission("lNGStation:list")
|
||||
public R page(@Valid LngBStationLngPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngBStationLng> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBStationLng::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBStationLng::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getEnterprise()),LngBStationLng::getEnterprise,dto.getEnterprise())
|
||||
.like(StrUtil.isNotBlank(dto.getContact()),LngBStationLng::getContact,dto.getContact())
|
||||
.like(StrUtil.isNotBlank(dto.getTel()),LngBStationLng::getTel,dto.getTel())
|
||||
.like(StrUtil.isNotBlank(dto.getEmail()),LngBStationLng::getEmail,dto.getEmail())
|
||||
.like(StrUtil.isNotBlank(dto.getRegionCode()),LngBStationLng::getRegionCode,dto.getRegionCode())
|
||||
.like(StrUtil.isNotBlank(dto.getAddr()),LngBStationLng::getAddr,dto.getAddr())
|
||||
.like(StrUtil.isNotBlank(dto.getAddrMail()),LngBStationLng::getAddrMail,dto.getAddrMail())
|
||||
.like(StrUtil.isNotBlank(dto.getOwnSign()),LngBStationLng::getOwnSign,dto.getOwnSign())
|
||||
.like(StrUtil.isNotBlank(dto.getOnlineSign()),LngBStationLng::getOnlineSign,dto.getOnlineSign())
|
||||
.like(StrUtil.isNotBlank(dto.getSort()),LngBStationLng::getSort,dto.getSort())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBStationLng::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBStationLng::getNote,dto.getNote())
|
||||
.orderByAsc(LngBStationLng::getCode)
|
||||
.select(LngBStationLng.class,x -> VoToColumnUtil.fieldsToColumns(LngBStationLngPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngBStationLng> page = lNGStationService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngBStationLngPageVo> pageOutput = ConventPage.getPageOutput(page, LngBStationLngPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngBStationLng信息")
|
||||
@SaCheckPermission("lNGStation:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngBStationLng lngBStationLng = lNGStationService.getById(id);
|
||||
if (lngBStationLng == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBStationLng, LngBStationLngVo.class));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngBStationLng")
|
||||
@SaCheckPermission("lNGStation:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBStationLngDto dto){
|
||||
UpdateLngBStationLngDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngBStationLng")
|
||||
@SaCheckPermission("lNGStation:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBStationLngDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("lNGStation:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBStationLngDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
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.AddLngBPortDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBPortDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.mdm.dto.LngBPortPageDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPort;
|
||||
import com.xjrsoft.module.mdm.service.IPortService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBPortPageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBPortVo;
|
||||
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" + "/port")
|
||||
@Api(value = "/mdm" + "/port",tags = "港口代码")
|
||||
@AllArgsConstructor
|
||||
public class PortController {
|
||||
|
||||
|
||||
private final IPortService portService;
|
||||
private final DatalogService dataService;
|
||||
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperation(value="LngBPort列表(分页)")
|
||||
@SaCheckPermission("port:list")
|
||||
public R page(@Valid LngBPortPageDto dto){
|
||||
|
||||
LambdaQueryWrapper<LngBPort> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBPort::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBPort::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBPort::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getShortName()),LngBPort::getShortName,dto.getShortName())
|
||||
.like(StrUtil.isNotBlank(dto.getRegionCode()),LngBPort::getRegionCode,dto.getRegionCode())
|
||||
.eq(ObjectUtil.isNotNull(dto.getCapacity()),LngBPort::getCapacity,dto.getCapacity())
|
||||
.eq(ObjectUtil.isNotNull(dto.getLongitude()),LngBPort::getLongitude,dto.getLongitude())
|
||||
.eq(ObjectUtil.isNotNull(dto.getLatitude()),LngBPort::getLatitude,dto.getLatitude())
|
||||
.like(StrUtil.isNotBlank(dto.getLimit1()),LngBPort::getLimit1,dto.getLimit1())
|
||||
.like(StrUtil.isNotBlank(dto.getLimit2()),LngBPort::getLimit2,dto.getLimit2())
|
||||
.like(StrUtil.isNotBlank(dto.getLimit3()),LngBPort::getLimit3,dto.getLimit3())
|
||||
.like(StrUtil.isNotBlank(dto.getLimit4()),LngBPort::getLimit4,dto.getLimit4())
|
||||
.like(StrUtil.isNotBlank(dto.getSort()),LngBPort::getSort,dto.getSort())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBPort::getNote,dto.getNote())
|
||||
.orderByDesc(LngBPort::getId)
|
||||
.select(LngBPort.class,x -> VoToColumnUtil.fieldsToColumns(LngBPortPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngBPort> page = portService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngBPortPageVo> pageOutput = ConventPage.getPageOutput(page, LngBPortPageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@ApiOperation(value="根据id查询LngBPort信息")
|
||||
@SaCheckPermission("port:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngBPort lngBPort = portService.getById(id);
|
||||
if (lngBPort == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBPort, LngBPortVo.class));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngBPort")
|
||||
@SaCheckPermission("port:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBPortDto dto){
|
||||
UpdateLngBPortDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngBPort")
|
||||
@SaCheckPermission("port:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBPortDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("port:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBPortDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -17,11 +17,13 @@ import com.xjrsoft.module.mdm.dto.UpdateLngBTaxDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.mdm.dto.LngBTaxPageDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBFeeDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBTax;
|
||||
import com.xjrsoft.module.mdm.service.ITaxRateService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBTaxPageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.mdm.vo.LngBTaxVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -39,7 +41,7 @@ import java.util.List;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mdm" + "/taxRate")
|
||||
@RequestMapping("/mdm/taxRate")
|
||||
@Api(value = "/mdm" + "/taxRate",tags = "税率代码")
|
||||
@AllArgsConstructor
|
||||
public class TaxRateController {
|
||||
@ -84,23 +86,45 @@ public class TaxRateController {
|
||||
@ApiOperation(value = "新增LngBTax")
|
||||
@SaCheckPermission("taxRate:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBTaxDto dto){
|
||||
UpdateLngBTaxDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
return R.ok(taxRateService.add(dto));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngBTax")
|
||||
@SaCheckPermission("taxRate:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBTaxDto dto){
|
||||
return R.ok(dataService.updateById(dto));
|
||||
return R.ok(taxRateService.update(dto));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("taxRate:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBTaxDto.class, ids));
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBTaxDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngBTaxRate数据详细日志")
|
||||
@SaCheckPermission("taxRate:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBTaxDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
@PostMapping("/enable")
|
||||
@ApiOperation(value = "启用")
|
||||
@SaCheckPermission("taxRate:enable")
|
||||
public R enable(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(taxRateService.enable(ids));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/disable")
|
||||
@ApiOperation(value = "禁用")
|
||||
@SaCheckPermission("taxRate:disable")
|
||||
public R disable(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(taxRateService.disable(ids));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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_category")
|
||||
@ApiModel(value = "品种对象", description = "品种")
|
||||
public class LngBCategory implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 助记码(LNG/PNG)
|
||||
*/
|
||||
@ApiModelProperty("助记码(LNG/PNG)")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 名称(不能重复)
|
||||
*/
|
||||
@ApiModelProperty("名称(不能重复)")
|
||||
private String fullName;
|
||||
|
||||
/**
|
||||
* 数量单位(不显示)
|
||||
*/
|
||||
@ApiModelProperty("数量单位(不显示)")
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 车/数量单位(LNG:21;缺省1)
|
||||
*/
|
||||
@ApiModelProperty("车/数量单位(LNG:21;缺省1)")
|
||||
private BigDecimal coefficient;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@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,152 @@
|
||||
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_doc_cp")
|
||||
@ApiModel(value = "公司资质证书对象", description = "公司资质证书")
|
||||
public class LngBDocCp 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 suSign;
|
||||
|
||||
/**
|
||||
* 供应商必须提供(Y-是,N-否;供应商适用N时置为N且只读)
|
||||
*/
|
||||
@ApiModelProperty("供应商必须提供(Y-是,N-否;供应商适用N时置为N且只读)")
|
||||
private String suNecSign;
|
||||
|
||||
/**
|
||||
* 客户适用(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("客户适用(Y-是,N-否)")
|
||||
private String cuSign;
|
||||
|
||||
/**
|
||||
* 客户必须提供(Y-是,N-否;客户适用N时置为N且只读)
|
||||
*/
|
||||
@ApiModelProperty("客户必须提供(Y-是,N-否;客户适用N时置为N且只读)")
|
||||
private String cuNecSign;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@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,182 @@
|
||||
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_port")
|
||||
@ApiModel(value = "港口对象", description = "港口")
|
||||
public class LngBPort 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;
|
||||
|
||||
/**
|
||||
* 简称(名称和简称都不能重复)
|
||||
*/
|
||||
@ApiModelProperty("简称(名称和简称都不能重复)")
|
||||
private String shortName;
|
||||
|
||||
/**
|
||||
* 所属国家和地区
|
||||
*/
|
||||
@ApiModelProperty("所属国家和地区")
|
||||
private String regionCode;
|
||||
|
||||
/**
|
||||
* 吞吐量
|
||||
*/
|
||||
@ApiModelProperty("吞吐量")
|
||||
private BigDecimal capacity;
|
||||
|
||||
/**
|
||||
* 连线经度
|
||||
*/
|
||||
@ApiModelProperty("连线经度")
|
||||
private BigDecimal longitude;
|
||||
|
||||
/**
|
||||
* 连线纬度
|
||||
*/
|
||||
@ApiModelProperty("连线纬度")
|
||||
private BigDecimal latitude;
|
||||
|
||||
/**
|
||||
* 限制1
|
||||
*/
|
||||
@ApiModelProperty("限制1")
|
||||
private String limit1;
|
||||
|
||||
/**
|
||||
* 限制2
|
||||
*/
|
||||
@ApiModelProperty("限制2")
|
||||
private String limit2;
|
||||
|
||||
/**
|
||||
* 限制3
|
||||
*/
|
||||
@ApiModelProperty("限制3")
|
||||
private String limit3;
|
||||
|
||||
/**
|
||||
* 限制4
|
||||
*/
|
||||
@ApiModelProperty("限制4")
|
||||
private String limit4;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@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,182 @@
|
||||
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: LNG气源地
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_b_station_lng")
|
||||
@ApiModel(value = "LNG气源地对象", description = "LNG气源地")
|
||||
public class LngBStationLng 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;
|
||||
|
||||
/**
|
||||
* 所属企业
|
||||
*/
|
||||
@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;
|
||||
|
||||
/**
|
||||
* 自有设备标识(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("自有设备标识(Y-是,N-否)")
|
||||
private String ownSign;
|
||||
|
||||
/**
|
||||
* 系统直连(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("系统直连(Y-是,N-否)")
|
||||
private String onlineSign;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@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,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.LngBCategory;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngBCategoryMapper extends BaseMapper<LngBCategory> {
|
||||
|
||||
}
|
||||
@ -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.LngBDocCp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngBDocCpMapper extends BaseMapper<LngBDocCp> {
|
||||
|
||||
}
|
||||
@ -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.LngBPort;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngBPortMapper extends BaseMapper<LngBPort> {
|
||||
|
||||
}
|
||||
@ -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.LngBStationLng;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngBStationLngMapper extends BaseMapper<LngBStationLng> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xjrsoft.module.mdm.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.module.mdm.entity.LngBCategory;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface ICategoryService extends IService<LngBCategory> {
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xjrsoft.module.mdm.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.module.mdm.entity.LngBDocCp;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IDocCpService extends IService<LngBDocCp> {
|
||||
}
|
||||
@ -1,13 +1,11 @@
|
||||
package com.xjrsoft.module.mdm.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.module.mdm.entity.LngBFee;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBFeeDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBFee;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
@ -16,4 +14,12 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
public interface IExpenseNameService extends IService<LngBFee> {
|
||||
|
||||
Boolean enable(List<Long> ids);
|
||||
|
||||
Boolean disable(List<Long> ids);
|
||||
|
||||
Long update(UpdateLngBFeeDto dto);
|
||||
|
||||
Long add(UpdateLngBFeeDto dto);
|
||||
}
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xjrsoft.module.mdm.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.module.mdm.entity.LngBStationLng;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface ILNGStationService extends IService<LngBStationLng> {
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xjrsoft.module.mdm.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPort;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface IPortService extends IService<LngBPort> {
|
||||
}
|
||||
@ -1,13 +1,11 @@
|
||||
package com.xjrsoft.module.mdm.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.yulichang.base.MPJBaseService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||
import com.xjrsoft.module.mdm.entity.LngBTax;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBTaxDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBTax;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
@ -16,4 +14,12 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
public interface ITaxRateService extends IService<LngBTax> {
|
||||
|
||||
Long add(UpdateLngBTaxDto dto);
|
||||
|
||||
Long update(UpdateLngBTaxDto dto);
|
||||
|
||||
Boolean enable(List<Long> ids);
|
||||
|
||||
Boolean disable(List<Long> ids);
|
||||
}
|
||||
|
||||
@ -36,8 +36,6 @@ public class BankServiceImpl extends ServiceImpl<LngBBankMapper, LngBBank> imple
|
||||
|
||||
private final CommonCallService commonCallService;
|
||||
|
||||
private final DatalogService dataService;
|
||||
|
||||
private final ICodeRuleClient codeRuleClient;
|
||||
|
||||
private final String BANKCODE = "bankCode";
|
||||
@ -65,7 +63,7 @@ public class BankServiceImpl extends ServiceImpl<LngBBankMapper, LngBBank> imple
|
||||
|
||||
@Override
|
||||
public boolean enable(List<Long> ids) {
|
||||
DataLogTools.enable(UpdateLngBBankDto.class,ids);
|
||||
DataLogTools.enable(UpdateLngBBankDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_PRICE_TERM, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.mdm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.xjrsoft.module.mdm.entity.LngBCategory;
|
||||
import com.xjrsoft.module.mdm.mapper.LngBCategoryMapper;
|
||||
import com.xjrsoft.module.mdm.service.ICategoryService;
|
||||
import lombok.AllArgsConstructor;
|
||||
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.toolkit.Wrappers;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class CategoryServiceImpl extends ServiceImpl<LngBCategoryMapper, LngBCategory> implements ICategoryService {
|
||||
}
|
||||
@ -53,7 +53,7 @@ public class CountryRegionServiceImpl extends ServiceImpl<LngBRegionMapper, LngB
|
||||
}
|
||||
this.checkParams(dto);
|
||||
UpdateLngBRegionDto res = DataLogTools.insert(dto);
|
||||
//this.addOrUpdateAfter(res.getId());
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ public class CountryRegionServiceImpl extends ServiceImpl<LngBRegionMapper, LngB
|
||||
}
|
||||
this.checkParams(dto);
|
||||
UpdateLngBRegionDto res = DataLogTools.update(dto);
|
||||
//this.addOrUpdateAfter(res.getId());
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.mdm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.xjrsoft.module.mdm.entity.LngBDocCp;
|
||||
import com.xjrsoft.module.mdm.mapper.LngBDocCpMapper;
|
||||
import com.xjrsoft.module.mdm.service.IDocCpService;
|
||||
import lombok.AllArgsConstructor;
|
||||
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.toolkit.Wrappers;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class DocCpServiceImpl extends ServiceImpl<LngBDocCpMapper, LngBDocCp> implements IDocCpService {
|
||||
}
|
||||
@ -1,8 +1,21 @@
|
||||
package com.xjrsoft.module.mdm.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
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.UpdateLngBBankDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBFeeDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBFee;
|
||||
import com.xjrsoft.module.mdm.mapper.LngBFeeMapper;
|
||||
import com.xjrsoft.module.mdm.service.IExpenseNameService;
|
||||
@ -18,4 +31,72 @@ import lombok.AllArgsConstructor;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ExpenseNameServiceImpl extends ServiceImpl<LngBFeeMapper, LngBFee> implements IExpenseNameService {
|
||||
|
||||
private final CommonCallService commonCallService;
|
||||
|
||||
@Override
|
||||
public Long add(UpdateLngBFeeDto dto) {
|
||||
this.checkParams(dto);
|
||||
UpdateLngBFeeDto res = DataLogTools.update(dto);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long update(UpdateLngBFeeDto dto) {
|
||||
this.checkParams(dto);
|
||||
UpdateLngBFeeDto res = DataLogTools.update(dto);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean enable(List<Long> ids) {
|
||||
DataLogTools.enable(UpdateLngBBankDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_FEE, 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(UpdateLngBBankDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_FEE, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void checkParams(UpdateLngBFeeDto dto) {
|
||||
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBFee>()
|
||||
.eq(LngBFee::getCode, dto.getCode()).ne(dto.getId() != null, LngBFee::getId, dto.getId()));
|
||||
if (codeCount > 0) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||
FieldNameConstants.CODE));
|
||||
}
|
||||
|
||||
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBFee>()
|
||||
.eq(LngBFee::getFullName, dto.getFullName()).ne(dto.getId() != null, LngBFee::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_FEE, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.mdm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.xjrsoft.module.mdm.entity.LngBStationLng;
|
||||
import com.xjrsoft.module.mdm.mapper.LngBStationLngMapper;
|
||||
import com.xjrsoft.module.mdm.service.ILNGStationService;
|
||||
import lombok.AllArgsConstructor;
|
||||
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.toolkit.Wrappers;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class LNGStationServiceImpl extends ServiceImpl<LngBStationLngMapper, LngBStationLng> implements ILNGStationService {
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.xjrsoft.module.mdm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPort;
|
||||
import com.xjrsoft.module.mdm.mapper.LngBPortMapper;
|
||||
import com.xjrsoft.module.mdm.service.IPortService;
|
||||
import lombok.AllArgsConstructor;
|
||||
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.toolkit.Wrappers;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class PortServiceImpl extends ServiceImpl<LngBPortMapper, LngBPort> implements IPortService {
|
||||
}
|
||||
@ -1,17 +1,26 @@
|
||||
package com.xjrsoft.module.mdm.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.UpdateLngBBankDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBTaxDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBTax;
|
||||
import com.xjrsoft.module.mdm.mapper.LngBTaxMapper;
|
||||
import com.xjrsoft.module.mdm.service.ITaxRateService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
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.toolkit.Wrappers;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
@ -22,4 +31,71 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TaxRateServiceImpl extends ServiceImpl<LngBTaxMapper, LngBTax> implements ITaxRateService {
|
||||
|
||||
private final CommonCallService commonCallService;
|
||||
|
||||
@Override
|
||||
public Long add(UpdateLngBTaxDto dto) {
|
||||
this.checkParams(dto);
|
||||
UpdateLngBTaxDto res = DataLogTools.update(dto);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long update(UpdateLngBTaxDto dto) {
|
||||
this.checkParams(dto);
|
||||
UpdateLngBTaxDto res = DataLogTools.update(dto);
|
||||
this.addOrUpdateAfter(res.getId());
|
||||
return res.getId();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean enable(List<Long> ids) {
|
||||
DataLogTools.enable(UpdateLngBTaxDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_TAX, 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(UpdateLngBBankDto.class,ids);
|
||||
for (Long id : ids) {
|
||||
String msg = commonCallService.enableBefore(TableNameConstants.LNG_B_TAX, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void checkParams(UpdateLngBTaxDto dto) {
|
||||
Long codeCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBTax>()
|
||||
.eq(LngBTax::getCode, dto.getCode()).ne(dto.getId() != null, LngBTax::getId, dto.getId()));
|
||||
if (codeCount > 0) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||
FieldNameConstants.CODE));
|
||||
}
|
||||
|
||||
Long nameCount = this.baseMapper.selectCount(new LambdaQueryWrapper<LngBTax>()
|
||||
.eq(LngBTax::getFullName, dto.getFullName()).ne(dto.getId() != null, LngBTax::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_TAX, id);
|
||||
if (StringUtils.isNotBlank(msg)) {
|
||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user