Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-pcitc into dev
This commit is contained in:
@ -2,6 +2,8 @@ package com.xjrsoft.module.datalog.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -65,9 +67,17 @@ public class DataChangeLogVo {
|
||||
@ApiModelProperty("操作时间")
|
||||
private String operationTime;
|
||||
|
||||
private long sort;
|
||||
|
||||
@ApiModelProperty("子对象")
|
||||
private List<DataChangeLogVo> children;
|
||||
|
||||
|
||||
public void addChild(DataChangeLogVo vo) {
|
||||
if(children==null) children = Lists.newArrayList();
|
||||
children.add(vo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -15,7 +15,11 @@ import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.OffsetTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -855,27 +859,68 @@ public class DataLogTools {
|
||||
for (Entry<String, List<DataChangeLog>> entry : flowGroup.entrySet()) {
|
||||
Map<String, List<DataChangeLog>> pidMap = entry.getValue().stream().collect(Collectors.groupingBy(DataChangeLog::getPid));
|
||||
DataChangeLog root = pidMap.get("#").get(0);
|
||||
DataChangeLogVo vo = new DataChangeLogVo();
|
||||
DataChangeLogVo vo = toVo(root);
|
||||
addChildVo(root,vo,pidMap);
|
||||
result.add(vo);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Collections.sort(result,new Comparator<DataChangeLogVo>() {
|
||||
@Override
|
||||
public int compare(DataChangeLogVo o1, DataChangeLogVo o2) {
|
||||
return Long.valueOf(o2.getSort()-o1.getSort()).intValue();
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void addChildVo(DataChangeLog current,DataChangeLogVo parentVo,Map<String, List<DataChangeLog>> pidMap){
|
||||
List<DataChangeLog> childs = pidMap.get(current.getId());
|
||||
if(CollectionUtils.isNotEmpty(childs)) {
|
||||
for (DataChangeLog item : childs) {
|
||||
DataChangeLogVo logVo = toVo(item,parentVo.getId());
|
||||
parentVo.addChild(logVo);
|
||||
addChildVo(item, logVo, pidMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static DataChangeLogVo toVo(DataChangeLog obj){
|
||||
return toVo(obj, obj.getPid());
|
||||
}
|
||||
|
||||
private static long toMills(LocalDateTime datetime) {
|
||||
ZonedDateTime systemZoned = datetime.atZone(ZoneId.systemDefault());
|
||||
return systemZoned.toInstant().toEpochMilli();
|
||||
}
|
||||
|
||||
private static DataChangeLogVo toVo(DataChangeLog obj,String pid){
|
||||
DataChangeLogVo vo = new DataChangeLogVo();
|
||||
vo.setId(obj.getId());
|
||||
vo.setPid(obj.getPid());
|
||||
vo.setPid(pid);
|
||||
vo.setTableName(obj.getBusName());
|
||||
vo.setOperationType(obj.getOperationType());
|
||||
vo.setOperatorName(obj.getOperatorName());
|
||||
vo.setOperationIp(obj.getOperationIp());
|
||||
vo.setOperationTime(DateUtils.format(obj.getOperationTime()));
|
||||
vo.setSort(toMills(obj.getOperationTime()));
|
||||
|
||||
List<FieldChange> fieldChanges = obj.getFieldChanges();
|
||||
|
||||
for (FieldChange fieldChange : fieldChanges) {
|
||||
DataChangeLogVo fvo = new DataChangeLogVo();
|
||||
fvo.setId(obj.getId()+"_"+fieldChange.getField());
|
||||
fvo.setPid(obj.getId());
|
||||
fvo.setName(fvo.getName());
|
||||
fvo.setOldValue(fieldChange.getOldValue());
|
||||
fvo.setNewValue(fieldChange.getNewValue());
|
||||
|
||||
fvo.setOperationType(obj.getOperationType());
|
||||
fvo.setOperatorName(obj.getOperatorName());
|
||||
fvo.setOperationIp(obj.getOperationIp());
|
||||
fvo.setOperationTime(DateUtils.format(obj.getOperationTime()));
|
||||
|
||||
vo.addChild(fvo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ import com.pictc.annotations.datalog.LogTable;
|
||||
/**
|
||||
* @title: 银行
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
@ -19,7 +19,7 @@ import com.pictc.annotations.datalog.LogTable;
|
||||
/**
|
||||
* @title: 国家地区
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
@ -14,7 +14,7 @@ import java.math.BigDecimal;
|
||||
/**
|
||||
* @title: 分页查询入参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ -41,5 +41,20 @@ public class LngBBankPageDto extends PageInput {
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
private String valid;
|
||||
/**
|
||||
* 名称(不能与名称、简称重复)
|
||||
*/
|
||||
@ApiModelProperty("名称(不能与名称、简称重复)")
|
||||
private String fullName;
|
||||
/**
|
||||
* 助记码(自动生成,4位,0001……)
|
||||
*/
|
||||
@ApiModelProperty("助记码(自动生成,4位,0001……)")
|
||||
private String code;
|
||||
/**
|
||||
* SWIFT
|
||||
*/
|
||||
@ApiModelProperty("SWIFT")
|
||||
private String swift;
|
||||
|
||||
}
|
||||
|
||||
@ -21,37 +21,27 @@ import java.math.BigDecimal;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class LngBCurrencyPageDto extends PageInput {
|
||||
|
||||
/**
|
||||
* 助记码(USD/CNY)
|
||||
*/
|
||||
@ApiModelProperty("助记码(USD/CNY)")
|
||||
private String code;
|
||||
/**
|
||||
* 名称(不能重复)
|
||||
*/
|
||||
@ApiModelProperty("名称(不能重复)")
|
||||
private String fullName;
|
||||
/**
|
||||
* 符号
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("符号")
|
||||
private String currSymbol;
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
private String valid;
|
||||
/**
|
||||
* 助记码(USD/CNY)
|
||||
*/
|
||||
@ApiModelProperty("助记码(USD/CNY)")
|
||||
private String code;
|
||||
/**
|
||||
* 是否本币(Y-是,N-否;只能有一个有效的Y)
|
||||
*/
|
||||
@ApiModelProperty("是否本币(Y-是,N-否;只能有一个有效的Y)")
|
||||
private String localSign;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
private Short sort;
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
private String valid;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
|
||||
@ -21,17 +21,22 @@ import java.math.BigDecimal;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class LngBPriceTermPageDto extends PageInput {
|
||||
|
||||
/**
|
||||
* 助记码(FOB/DES/……)
|
||||
*/
|
||||
@ApiModelProperty("助记码(FOB/DES/……)")
|
||||
private String code;
|
||||
/**
|
||||
* 名称(不能重复)
|
||||
*/
|
||||
@ApiModelProperty("名称(不能重复)")
|
||||
private String fullName;
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
private String valid;
|
||||
/**
|
||||
* 助记码(FOB/DES/……)
|
||||
*/
|
||||
@ApiModelProperty("助记码(FOB/DES/……)")
|
||||
private String code;
|
||||
/**
|
||||
* 是否承担运费(Y-是,N-否)
|
||||
*/
|
||||
@ApiModelProperty("是否承担运费(Y-是,N-否)")
|
||||
@ -42,16 +47,6 @@ public class LngBPriceTermPageDto extends PageInput {
|
||||
@ApiModelProperty("是否承担保险(Y-是,N-否)")
|
||||
private String insuranceSign;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
private Short sort;
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
private String valid;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
|
||||
@ -14,28 +14,23 @@ import java.math.BigDecimal;
|
||||
/**
|
||||
* @title: 分页查询入参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class LngBRegionPageDto extends PageInput {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 助记码
|
||||
*/
|
||||
@ApiModelProperty("助记码")
|
||||
private String code;
|
||||
/**
|
||||
* 创建人id
|
||||
* 名称(不能重复)
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
private Long createUserId;
|
||||
@ApiModelProperty("名称(不能重复)")
|
||||
private String fullName;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@ -47,10 +42,10 @@ public class LngBRegionPageDto extends PageInput {
|
||||
@ApiModelProperty("上级ID")
|
||||
private Long pid;
|
||||
/**
|
||||
* 名称(不能重复)
|
||||
* 全路径名称
|
||||
*/
|
||||
@ApiModelProperty("名称(不能重复)")
|
||||
private String fullName;
|
||||
@ApiModelProperty("全路径名称")
|
||||
private String fullPath;
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
|
||||
@ -24,7 +24,7 @@ import com.pictc.annotations.datalog.ValueDirectionType;
|
||||
/**
|
||||
* @title: 银行
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
@ -24,7 +24,7 @@ import com.pictc.annotations.datalog.ValueDirectionType;
|
||||
/**
|
||||
* @title: 国家地区
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
@ -13,7 +13,7 @@ import java.math.BigDecimal;
|
||||
/**
|
||||
* @title: 分页列表出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ -25,6 +25,16 @@ public class LngBBankPageVo {
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
/**
|
||||
* 助记码(自动生成,4位,0001……)
|
||||
*/
|
||||
@ApiModelProperty("助记码(自动生成,4位,0001……)")
|
||||
private String code;
|
||||
/**
|
||||
* 名称(不能与名称、简称重复)
|
||||
*/
|
||||
@ApiModelProperty("名称(不能与名称、简称重复)")
|
||||
private String fullName;
|
||||
/**
|
||||
* 简称(不能与名称、简称重复)
|
||||
*/
|
||||
@ApiModelProperty("简称(不能与名称、简称重复)")
|
||||
@ -40,6 +50,11 @@ public class LngBBankPageVo {
|
||||
@ApiModelProperty("所属国家和地区")
|
||||
private String regionCode;
|
||||
/**
|
||||
* SWIFT
|
||||
*/
|
||||
@ApiModelProperty("SWIFT")
|
||||
private String swift;
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
|
||||
@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
@ -35,22 +35,12 @@ public class LngBCurrencyPageVo {
|
||||
@ApiModelProperty("名称(不能重复)")
|
||||
private String fullName;
|
||||
/**
|
||||
* 符号
|
||||
*/
|
||||
@ApiModelProperty("符号")
|
||||
private String currSymbol;
|
||||
/**
|
||||
* 是否本币(Y-是,N-否;只能有一个有效的Y)
|
||||
*/
|
||||
@ApiModelProperty("是否本币(Y-是,N-否;只能有一个有效的Y)")
|
||||
@Trans(type = TransType.DIC, id = "1978056598125330433")
|
||||
private String localSign;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
private Short sort;
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
|
||||
@ -47,11 +47,6 @@ public class LngBPriceTermPageVo {
|
||||
@Trans(type = TransType.DIC, id = "1978056598125330433")
|
||||
private String insuranceSign;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@ApiModelProperty("显示顺序")
|
||||
private Short sort;
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
|
||||
@ -13,7 +13,7 @@ import java.math.BigDecimal;
|
||||
/**
|
||||
* @title: 分页列表出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ -46,6 +46,11 @@ public class LngBRegionPageVo {
|
||||
@ApiModelProperty("上级ID")
|
||||
private Long pid;
|
||||
/**
|
||||
* 全路径名称
|
||||
*/
|
||||
@ApiModelProperty("全路径名称")
|
||||
private String fullPath;
|
||||
/**
|
||||
* 有效标志(Y-有效,N-无效)
|
||||
*/
|
||||
@ApiModelProperty("有效标志(Y-有效,N-无效)")
|
||||
@ -56,15 +61,5 @@ public class LngBRegionPageVo {
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
private Long createUserId;
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
private Long ruleUserId;
|
||||
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* @title: 表单出参
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
@ -23,7 +23,8 @@ import com.xjrsoft.module.mdm.vo.LngBBankPageVo;
|
||||
import com.xjrsoft.module.authority.dto.BatchSetDataAuthDto;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.datalog.entity.DataChangeLog;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBBankVo;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -38,7 +39,7 @@ import java.util.List;
|
||||
/**
|
||||
* @title: 银行
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@ -62,6 +63,9 @@ public class BankController {
|
||||
.like(StrUtil.isNotBlank(dto.getBankCode()),LngBBank::getBankCode,dto.getBankCode())
|
||||
.like(StrUtil.isNotBlank(dto.getRegionCode()),LngBBank::getRegionCode,dto.getRegionCode())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBBank::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBBank::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBBank::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getSwift()),LngBBank::getSwift,dto.getSwift())
|
||||
.orderByDesc(LngBBank::getId)
|
||||
.select(LngBBank.class,x -> VoToColumnUtil.fieldsToColumns(LngBBankPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngBBank> page = bankService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
@ -79,6 +83,14 @@ public class BankController {
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBBank, LngBBankVo.class));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngBBank数据详细日志")
|
||||
@SaCheckPermission("bank:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBBankDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ -103,6 +115,7 @@ public class BankController {
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBBankDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@PutMapping("/data-auth")
|
||||
@ApiOperation(value = "批量设置权限所属人")
|
||||
|
||||
@ -1,45 +1,47 @@
|
||||
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 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.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.xjrsoft.common.constant.GlobalConstant;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
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.AddLngBRegionDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBRegionDto;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
|
||||
import com.xjrsoft.module.datalog.entity.DataChangeLog;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.mdm.dto.LngBRegionPageDto;
|
||||
import com.xjrsoft.module.mdm.dto.UpdateLngBRegionDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBRegion;
|
||||
import com.xjrsoft.module.mdm.enums.CountryRegionEnum;
|
||||
import com.xjrsoft.module.mdm.service.ICountryRegionService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBRegionPageVo;
|
||||
import com.xjrsoft.module.authority.dto.BatchSetDataAuthDto;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBRegionVo;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@ -59,12 +61,11 @@ public class CountryRegionController {
|
||||
|
||||
LambdaQueryWrapper<LngBRegion> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.eq(ObjectUtil.isNotNull(dto.getId()),LngBRegion::getId,dto.getId())
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBRegion::getCode,dto.getCode())
|
||||
.eq(ObjectUtil.isNotNull(dto.getCreateUserId()),LngBRegion::getCreateUserId,dto.getCreateUserId())
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBRegion::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getRegionTypeCode()),LngBRegion::getRegionTypeCode,dto.getRegionTypeCode())
|
||||
.eq(ObjectUtil.isNotNull(dto.getPid()),LngBRegion::getPid,dto.getPid())
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBRegion::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getFullPath()),LngBRegion::getFullPath,dto.getFullPath())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBRegion::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBRegion::getNote,dto.getNote())
|
||||
.orderByDesc(LngBRegion::getId)
|
||||
@ -84,22 +85,30 @@ public class CountryRegionController {
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBRegion, LngBRegionVo.class));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngBRegion数据详细日志")
|
||||
@SaCheckPermission("countryRegion:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBRegionDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增LngBRegion")
|
||||
@SaCheckPermission("countryRegion:add")
|
||||
public R add(@Valid @RequestBody UpdateLngBRegionDto dto){
|
||||
if(!CountryRegionEnum.CONTINENT.getCode().equals(dto.getRegionTypeCode()) ) {
|
||||
if(dto.getPid() != null && dto.getPid() != 0) {
|
||||
LngBRegion parentRegion = countryRegionService.getById(dto.getPid());
|
||||
if(parentRegion != null) {
|
||||
dto.setFullPath(parentRegion.getFullPath()+dto.getFullName());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
dto.setFullPath(dto.getFullName());
|
||||
}
|
||||
if(!CountryRegionEnum.CONTINENT.getCode().equals(dto.getRegionTypeCode()) ) {
|
||||
if(dto.getPid() != null && dto.getPid() != 0) {
|
||||
LngBRegion parentRegion = countryRegionService.getById(dto.getPid());
|
||||
if(parentRegion != null) {
|
||||
dto.setFullPath(parentRegion.getFullPath()+dto.getFullName());
|
||||
}
|
||||
}
|
||||
}else {
|
||||
dto.setFullPath(dto.getFullName());
|
||||
}
|
||||
UpdateLngBRegionDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
}
|
||||
@ -108,7 +117,7 @@ public class CountryRegionController {
|
||||
@ApiOperation(value = "修改LngBRegion")
|
||||
@SaCheckPermission("countryRegion:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngBRegionDto dto){
|
||||
if(!CountryRegionEnum.CONTINENT.getCode().equals(dto.getRegionTypeCode()) ) {
|
||||
if(!CountryRegionEnum.CONTINENT.getCode().equals(dto.getRegionTypeCode()) ) {
|
||||
if(dto.getPid() != null && dto.getPid() != 0) {
|
||||
LngBRegion parentRegion = countryRegionService.getById(dto.getPid());
|
||||
if(parentRegion != null) {
|
||||
@ -125,21 +134,16 @@ public class CountryRegionController {
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("countryRegion:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBRegionDto.class, ids));
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBRegionDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@PutMapping("/data-auth")
|
||||
@ApiOperation(value = "批量设置权限所属人")
|
||||
@SaCheckPermission("countryRegion:batchSetUserId")
|
||||
public R setDataAUth(@RequestBody BatchSetDataAuthDto dto){
|
||||
List<LngBRegion> toUpdateList = new ArrayList<>();
|
||||
for (Long dataId : dto.getDataIdList()) {
|
||||
LngBRegion lngBRegion = new LngBRegion();
|
||||
lngBRegion.setId(dataId);
|
||||
lngBRegion.setRuleUserId(dto.getUserIdList().get(0));
|
||||
toUpdateList.add(lngBRegion);
|
||||
}
|
||||
return R.ok(countryRegionService.updateBatchById(toUpdateList));
|
||||
@GetMapping(value = "/tree")
|
||||
@ApiOperation(value = "LngBRegion树形结构")
|
||||
//@SaCheckPermission("countryRegion:edit")
|
||||
public R tree(@Valid @RequestBody UpdateLngBRegionDto dto){
|
||||
|
||||
return R.ok(null);
|
||||
}
|
||||
}
|
||||
@ -20,7 +20,8 @@ import com.xjrsoft.module.mdm.dto.LngBCurrencyPageDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBCurrency;
|
||||
import com.xjrsoft.module.mdm.service.ICurrencyService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBCurrencyPageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.datalog.entity.DataChangeLog;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBCurrencyVo;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -55,12 +56,10 @@ public class CurrencyController {
|
||||
|
||||
LambdaQueryWrapper<LngBCurrency> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBCurrency::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBCurrency::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getCurrSymbol()),LngBCurrency::getCurrSymbol,dto.getCurrSymbol())
|
||||
.like(StrUtil.isNotBlank(dto.getLocalSign()),LngBCurrency::getLocalSign,dto.getLocalSign())
|
||||
//.like(StrUtil.isNotBlank(dto.getSort()),LngBCurrency::getSort,dto.getSort())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBCurrency::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBCurrency::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getLocalSign()),LngBCurrency::getLocalSign,dto.getLocalSign())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBCurrency::getNote,dto.getNote())
|
||||
.orderByDesc(LngBCurrency::getId)
|
||||
.select(LngBCurrency.class,x -> VoToColumnUtil.fieldsToColumns(LngBCurrencyPageVo.class).contains(x.getProperty()));
|
||||
@ -79,6 +78,14 @@ public class CurrencyController {
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBCurrency, LngBCurrencyVo.class));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngBCurrency数据详细日志")
|
||||
@SaCheckPermission("currency:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBCurrencyDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ -103,5 +110,6 @@ public class CurrencyController {
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBCurrencyDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -20,7 +20,8 @@ import com.xjrsoft.module.mdm.dto.LngBPriceTermPageDto;
|
||||
import com.xjrsoft.module.mdm.entity.LngBPriceTerm;
|
||||
import com.xjrsoft.module.mdm.service.IPriceTermsService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBPriceTermPageVo;
|
||||
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.datalog.entity.DataChangeLog;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.mdm.vo.LngBPriceTermVo;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -55,14 +56,13 @@ public class PriceTermsController {
|
||||
|
||||
LambdaQueryWrapper<LngBPriceTerm> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBPriceTerm::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getFullName()),LngBPriceTerm::getFullName,dto.getFullName())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBPriceTerm::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getCode()),LngBPriceTerm::getCode,dto.getCode())
|
||||
.like(StrUtil.isNotBlank(dto.getFreightSign()),LngBPriceTerm::getFreightSign,dto.getFreightSign())
|
||||
.like(StrUtil.isNotBlank(dto.getInsuranceSign()),LngBPriceTerm::getInsuranceSign,dto.getInsuranceSign())
|
||||
.like(StrUtil.isNotBlank(dto.getSort()),LngBPriceTerm::getSort,dto.getSort())
|
||||
.like(StrUtil.isNotBlank(dto.getValid()),LngBPriceTerm::getValid,dto.getValid())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBPriceTerm::getNote,dto.getNote())
|
||||
.orderByAsc(LngBPriceTerm::getCode)
|
||||
.orderByDesc(LngBPriceTerm::getId)
|
||||
.select(LngBPriceTerm.class,x -> VoToColumnUtil.fieldsToColumns(LngBPriceTermPageVo.class).contains(x.getProperty()));
|
||||
IPage<LngBPriceTerm> page = priceTermsService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngBPriceTermPageVo> pageOutput = ConventPage.getPageOutput(page, LngBPriceTermPageVo.class);
|
||||
@ -79,6 +79,14 @@ public class PriceTermsController {
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngBPriceTerm, LngBPriceTermVo.class));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ApiOperation(value="根据id查询LngBPriceTerm数据详细日志")
|
||||
@SaCheckPermission("priceTerms:datalog")
|
||||
public R datalog(@RequestParam Long id){
|
||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBPriceTermDto.class,id);
|
||||
return R.ok(logs);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@ -103,5 +111,6 @@ public class PriceTermsController {
|
||||
return R.ok(dataService.deleteByIds(UpdateLngBPriceTermDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -20,7 +20,7 @@ import java.util.List;
|
||||
/**
|
||||
* @title: 银行
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
@ -20,7 +20,7 @@ import java.util.List;
|
||||
/**
|
||||
* @title: 国家地区
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
|
||||
@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
|
||||
@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
|
||||
@ -16,7 +16,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
/**
|
||||
* @title: service
|
||||
* @Author 管理员
|
||||
* @Date: 2025-10-21
|
||||
* @Date: 2025-10-22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
|
||||
Reference in New Issue
Block a user