This commit is contained in:
2025-12-05 10:11:11 +08:00
11 changed files with 124 additions and 18 deletions

View File

@ -0,0 +1,24 @@
package com.xjrsoft.module.mdm.client;
import java.util.Map;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.xjrsoft.common.constant.GlobalConstant;
/**
* @author: ksy
* @since: 2025/11/5
*/
@FeignClient(value = GlobalConstant.CLIENT_PCITC_MDM_NAME, path = GlobalConstant.CLIENT_API_PRE + GlobalConstant.MDM_MODULE_PREFIX + "/tran/lngStation")
public interface ILngStationClient {
@GetMapping("/getAllTranData")
Map<String,String> getAllTranData();
@GetMapping("/getTranById")
String getTranById(@RequestParam("id")String id);
}

View File

@ -44,6 +44,7 @@ public class LngBPngLinePageVo {
* 自有接收站(惠州/阳江)
*/
@ApiModelProperty("自有接收站(惠州/阳江)")
@Trans(type = TransType.LNG_STATION)
private String staCodeLng;
/**
* 显示顺序

View File

@ -63,7 +63,7 @@ public class AddLngFileUploadDto implements Serializable {
*/
@ApiModelProperty("")
@LogField(name="",index=0)
private Long filesize;
private Long fileSize;
/**
*
*/
@ -83,4 +83,8 @@ public class AddLngFileUploadDto implements Serializable {
@LogField(name="",index=0)
private Long tenantId;
@LogField(name="",index=10)
@ApiModelProperty("")
private Long xjrFileId;
}

View File

@ -80,7 +80,7 @@ public class UpdateLngFileUploadDto implements Serializable {
*/
@LogField(name="",index=6)
@ApiModelProperty("")
private Long filesize;
private Long fileSize;
/**
*
@ -103,5 +103,7 @@ public class UpdateLngFileUploadDto implements Serializable {
@ApiModelProperty("")
private Long tenantId;
@LogField(name="",index=10)
@ApiModelProperty("")
private Long xjrFileId;
}

View File

@ -9,6 +9,7 @@ import java.math.BigDecimal;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import com.pictc.annotations.datalog.LogField;
/**
* @title: 表单出参
@ -65,7 +66,7 @@ public class LngFileUploadVo {
*
*/
@ApiModelProperty("")
private Long filesize;
private Long fileSize;
/**
@ -135,4 +136,8 @@ public class LngFileUploadVo {
private String presignedUrl;
@LogField(name="",index=10)
@ApiModelProperty("")
private Long xjrFileId;
}

View File

@ -0,0 +1,50 @@
package com.xjrsoft.module.mdm.client;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.xjrsoft.common.constant.GlobalConstant;
import com.xjrsoft.common.utils.TenantUtil;
import com.xjrsoft.module.mdm.entity.LngBStationLng;
import com.xjrsoft.module.mdm.service.ILNGStationService;
import lombok.AllArgsConstructor;
/**
* @author: yjw
* @since: 2025/3/5
*/
//@Api(hidden = true)
@RestController
@RequestMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MDM_MODULE_PREFIX + "/tran/lngStation")
@AllArgsConstructor
public class LngStationClientImpl implements ILngStationClient {
private final ILNGStationService lngStationService;
@GetMapping("/getAllTranData")
@Override
public Map<String, String> getAllTranData() {
try {
TenantUtil.ignore(true);
List<LngBStationLng> list = lngStationService.list();
return list.stream().collect(Collectors.toMap(LngBStationLng::getCode,LngBStationLng::getFullName));
}finally {
TenantUtil.clear();
}
}
@GetMapping("/getTranById")
@Override
public String getTranById(@RequestParam("id")String code) {
LngBStationLng region = lngStationService.getByCode(code);
return region!=null?region.getFullName():null;
}
}

View File

@ -23,4 +23,6 @@ public interface ILNGStationService extends IService<LngBStationLng> {
boolean enable(@Valid List<Long> ids);
boolean disable(@Valid List<Long> ids);
LngBStationLng getByCode(String code);
}

View File

@ -17,7 +17,6 @@ import com.pictc.utils.CollectionUtils;
import com.xjrsoft.common.constant.GlobalConstant;
import com.xjrsoft.common.utils.TreeUtil;
import com.xjrsoft.module.mdm.entity.LngBRegion;
import com.xjrsoft.module.mdm.enums.CountryRegionEnum;
import com.xjrsoft.module.mdm.mapper.LngBRegionMapper;
import com.xjrsoft.module.mdm.service.ICountryRegionService;
import com.xjrsoft.module.mdm.vo.LngBRegionTreeVo;
@ -60,7 +59,8 @@ public class CountryRegionServiceImpl extends ServiceImpl<LngBRegionMapper, LngB
}
LambdaQueryWrapper<LngBRegion> tempQw = Wrappers.<LngBRegion>query().lambda()
.notIn(StringUtils.isNotBlank(excludeType),LngBRegion::getRegionTypeCode, excludeTypeList);
.notIn(StringUtils.isNotBlank(excludeType),LngBRegion::getRegionTypeCode, excludeTypeList)
.orderByAsc(LngBRegion::getCode);
//.eq(StringUtils.isNotBlank(startPCode),LngBRegion::getCode, startPCode);
List<LngBRegion> allList = this.list(tempQw);
Map<Long,LngBRegion> map = allList.stream().collect(Collectors.toMap(LngBRegion::getId,
@ -145,7 +145,7 @@ public class CountryRegionServiceImpl extends ServiceImpl<LngBRegionMapper, LngB
.in(pid == null, LngBRegion::getPid, pidList)
.and(StrUtil.isNotBlank(keyword), x -> {
x.like(StrUtil.isNotBlank(keyword), LngBRegion::getFullName, keyword);
}));
}).orderByAsc(LngBRegion::getCode));
List<LngBRegionVo> voList = CollectionUtils.newArrayList();
if(regionList != null && regionList.size() > 0) {

View File

@ -1,5 +1,12 @@
package com.xjrsoft.module.mdm.service.impl;
import java.util.List;
import java.util.Objects;
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;
@ -7,6 +14,8 @@ import com.pictc.constant.TableNameConstants;
import com.pictc.enums.BusinessCode;
import com.pictc.enums.ExceptionCommonCode;
import com.pictc.utils.DataLogTools;
import com.xjrsoft.common.advice.tran.LngStationDataProvider;
import com.xjrsoft.common.advice.tran.RegionDataProvider;
import com.xjrsoft.common.exception.BusinessException;
import com.xjrsoft.module.common.db.service.CommonCallService;
import com.xjrsoft.module.mdm.dto.UpdateLngBStationLngDto;
@ -14,13 +23,8 @@ import com.xjrsoft.module.mdm.entity.LngBStationLng;
import com.xjrsoft.module.mdm.mapper.LngBStationLngMapper;
import com.xjrsoft.module.mdm.service.ILNGStationService;
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 lombok.AllArgsConstructor;
/**
* @title: service
@ -38,6 +42,8 @@ public class LNGStationServiceImpl extends ServiceImpl<LngBStationLngMapper, Lng
private final String STATIONCODE = "stationCode";
private final LngStationDataProvider tranProvider;
@Override
@Transactional(rollbackFor = Exception.class)
public Long add(UpdateLngBStationLngDto dto) {
@ -46,6 +52,7 @@ public class LNGStationServiceImpl extends ServiceImpl<LngBStationLngMapper, Lng
UpdateLngBStationLngDto res = DataLogTools.insert(dto);
codeRuleClient.useEncode(STATIONCODE);
this.addOrUpdateAfter(res.getId());
tranProvider.saveData(dto.getCode(), dto.getFullName());
return res.getId();
}
@ -79,6 +86,7 @@ public class LNGStationServiceImpl extends ServiceImpl<LngBStationLngMapper, Lng
this.checkParams(dto);
DataLogTools.update(dto);
this.addOrUpdateAfter(dto.getId());
tranProvider.saveData(dto.getCode(), dto.getFullName());
return true;
}
@ -107,4 +115,11 @@ public class LNGStationServiceImpl extends ServiceImpl<LngBStationLngMapper, Lng
}
return true;
}
@Override
public LngBStationLng getByCode(String code) {
LambdaQueryWrapper<LngBStationLng> queryWrapper = new LambdaQueryWrapper<LngBStationLng>();
queryWrapper.eq(LngBStationLng::getCode,code);
return baseMapper.selectOne(queryWrapper);
}
}

View File

@ -71,7 +71,7 @@ public class LngFileUpload implements Serializable {
*
*/
@ApiModelProperty("")
private Long filesize;
private Long fileSize;
/**
*
@ -137,4 +137,7 @@ public class LngFileUpload implements Serializable {
@TableField(exist = false)
private String presignedUrl;
//@ApiModelProperty("")
//private Long xjrFileId;
}

View File

@ -84,10 +84,10 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
if(CollectionUtil.isNotEmpty(updateLngCustomerDocDto.getFileList())) {
for(UpdateLngFileUploadDto lngFileUploadDto:updateLngCustomerDocDto.getFileList()) {
LngFileUpload lngFileUpload = new LngFileUpload();
BeanUtil.copyProperties(lngFileUploadDto, lngFileUpload);
lngFileUpload.setTableName("lng_customer_doc");
lngFileUpload.setTableId(lngCustomerDoc.getId());
lngFileUploadMapper.insert(lngFileUpload);
BeanUtil.copyProperties(lngFileUploadDto, lngFileUpload);
lngFileUpload.setTableName("lng_customer_doc");
lngFileUpload.setTableId(lngCustomerDoc.getId());
lngFileUploadMapper.insert(lngFileUpload);
}
}