Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-pcitc into dev
This commit is contained in:
@ -18,10 +18,11 @@
|
|||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
<docker-image-name>pcitc/itc-pcitc-demo</docker-image-name>
|
<docker-image-name>pcitc/itc-pcitc-demo</docker-image-name>
|
||||||
<libServerUrl>http://10.10.2.102:9500/</libServerUrl>
|
<libServerUrl>http://10.10.2.102:9509/</libServerUrl>
|
||||||
<libServerUser>pcitc</libServerUser>
|
<libServerUser>pcitc</libServerUser>
|
||||||
<libServerPwd>K9$pQ3!zX7@rT2&w</libServerPwd>
|
<libServerPwd>K9$pQ3!zX7@rT2&w</libServerPwd>
|
||||||
<ignoreUpload>false</ignoreUpload>
|
<ignoreUpload>false</ignoreUpload>
|
||||||
|
<docker-jar-name>${project.build.finalName}-server.jar</docker-jar-name>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -31,8 +31,8 @@ else
|
|||||||
export JAVA_OPTS="$JAVA_OPTS -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:CMSMaxAbortablePrecleanTime=5000"
|
export JAVA_OPTS="$JAVA_OPTS -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:CMSMaxAbortablePrecleanTime=5000"
|
||||||
export JAVA_OPTS="$JAVA_OPTS -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseCMSInitiatingOccupancyOnly"
|
export JAVA_OPTS="$JAVA_OPTS -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseCMSInitiatingOccupancyOnly"
|
||||||
export JAVA_OPTS="$JAVA_OPTS -verbose:gc -Xloggc:./logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps"
|
export JAVA_OPTS="$JAVA_OPTS -verbose:gc -Xloggc:./logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps"
|
||||||
# 开发环境开启远程调试
|
# 开发环境开启远程调试
|
||||||
export JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
|
# export JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 公共配置(编码、时区等)
|
# 公共配置(编码、时区等)
|
||||||
|
|||||||
@ -34,7 +34,7 @@ public class LngScorePageVo {
|
|||||||
* 评价体系主键
|
* 评价体系主键
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("评价体系主键")
|
@ApiModelProperty("评价体系主键")
|
||||||
@Trans(type = TransType.API, id = "93d735dcb7364a0f8102188ec4d77ac7")
|
//@Trans(type = TransType.API, id = "93d735dcb7364a0f8102188ec4d77ac7")
|
||||||
private String gsId;
|
private String gsId;
|
||||||
/**
|
/**
|
||||||
* 供应商/客户
|
* 供应商/客户
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import java.math.BigDecimal;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.xjrsoft.common.annotation.Trans;
|
||||||
|
import com.xjrsoft.common.enums.TransType;
|
||||||
import com.xjrsoft.module.supplier.vo.LngScoreDtlVo;
|
import com.xjrsoft.module.supplier.vo.LngScoreDtlVo;
|
||||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||||
|
|
||||||
@ -134,5 +136,17 @@ public class LngScoreVo {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("lngFileUpload子表")
|
@ApiModelProperty("lngFileUpload子表")
|
||||||
private List<LngFileUploadVo> lngFileUploadList;
|
private List<LngFileUploadVo> lngFileUploadList;
|
||||||
|
|
||||||
|
@Trans(type = TransType.DIC, id = "1990668094164484097", transToFieldName = "cpClassName")
|
||||||
|
private String cpClassCode;
|
||||||
|
|
||||||
|
private String cpClassName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户名称")
|
||||||
|
private String cpName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import java.math.BigDecimal;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.xjrsoft.common.annotation.Trans;
|
||||||
|
import com.xjrsoft.common.enums.TransType;
|
||||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -136,5 +138,18 @@ public class LngScoreVo {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("lngFileUpload子表")
|
@ApiModelProperty("lngFileUpload子表")
|
||||||
private List<LngFileUploadVo> lngFileUploadList;
|
private List<LngFileUploadVo> lngFileUploadList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Trans(type = TransType.DIC, id = "1990668094164484097", transToFieldName = "cpClassName")
|
||||||
|
private String cpClassCode;
|
||||||
|
|
||||||
|
private String cpClassName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户名称")
|
||||||
|
private String cpName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.pictc.constant.FieldNameConstants;
|
||||||
import com.pictc.datalog.DataOperationContent;
|
import com.pictc.datalog.DataOperationContent;
|
||||||
import com.pictc.datalog.DataOperationListener;
|
import com.pictc.datalog.DataOperationListener;
|
||||||
import com.pictc.enums.BusinessCode;
|
import com.pictc.enums.BusinessCode;
|
||||||
@ -129,17 +130,18 @@ public class CountryRegionController {
|
|||||||
}else {
|
}else {
|
||||||
dto.setFullPath(dto.getFullName());
|
dto.setFullPath(dto.getFullName());
|
||||||
}
|
}
|
||||||
|
checkParams(dto);
|
||||||
return content.getObj();
|
return content.getObj();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UpdateLngBRegionDto after(DataOperationContent<UpdateLngBRegionDto> content) {
|
public UpdateLngBRegionDto after(DataOperationContent<UpdateLngBRegionDto> content) {
|
||||||
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
|
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
|
||||||
if (StringUtils.isNotBlank(msg)) {
|
if (StringUtils.isNotBlank(msg)) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||||
}
|
}
|
||||||
UpdateLngBRegionDto obj = content.getObj();
|
UpdateLngBRegionDto obj = content.getObj();
|
||||||
tranProvider.saveData(obj.getCode(), obj.getFullName());
|
tranProvider.saveData(obj.getCode(), obj.getFullName());
|
||||||
return content.getObj();
|
return content.getObj();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@ -164,15 +166,16 @@ public class CountryRegionController {
|
|||||||
}else {
|
}else {
|
||||||
dto.setFullPath(dto.getFullName());
|
dto.setFullPath(dto.getFullName());
|
||||||
}
|
}
|
||||||
|
checkParams(dto);
|
||||||
return content.getObj();
|
return content.getObj();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UpdateLngBRegionDto after(DataOperationContent<UpdateLngBRegionDto> content) {
|
public UpdateLngBRegionDto after(DataOperationContent<UpdateLngBRegionDto> content) {
|
||||||
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
|
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
|
||||||
if (StringUtils.isNotBlank(msg)) {
|
if (StringUtils.isNotBlank(msg)) {
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||||
}
|
}
|
||||||
UpdateLngBRegionDto obj = content.getObj();
|
UpdateLngBRegionDto obj = content.getObj();
|
||||||
tranProvider.saveData(obj.getCode(), obj.getFullName());
|
tranProvider.saveData(obj.getCode(), obj.getFullName());
|
||||||
return content.getObj();
|
return content.getObj();
|
||||||
@ -241,6 +244,22 @@ public class CountryRegionController {
|
|||||||
return R.ok(countryRegionService.getParentByCode(code,excludeType,startPCode));
|
return R.ok(countryRegionService.getParentByCode(code,excludeType,startPCode));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void checkParams(UpdateLngBRegionDto dto) {
|
||||||
|
Long codeCount = countryRegionService.count(new LambdaQueryWrapper<LngBRegion>()
|
||||||
|
.eq(LngBRegion::getCode, dto.getCode()).ne(dto.getId() != null, LngBRegion::getId, dto.getId()));
|
||||||
|
if (codeCount > 0) {
|
||||||
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
|
FieldNameConstants.CODE));
|
||||||
|
}
|
||||||
|
Long nameCount = countryRegionService.count(new LambdaQueryWrapper<LngBRegion>()
|
||||||
|
.eq(LngBRegion::getFullName, dto.getFullName()).ne(dto.getId() != null, LngBRegion::getId, dto.getId()));
|
||||||
|
if (nameCount > 0) {
|
||||||
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DATA_FIELD_DUPLICATION,
|
||||||
|
FieldNameConstants.FULL_NAME));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,17 +1,13 @@
|
|||||||
package com.xjrsoft.module.mdm.service.impl;
|
package com.xjrsoft.module.mdm.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
||||||
import com.xjrsoft.module.mdm.entity.LngBPlaceLngUnload;
|
import com.xjrsoft.module.mdm.entity.LngBPlaceLngUnload;
|
||||||
import com.xjrsoft.module.mdm.mapper.LngBPlaceLngUnloadMapper;
|
import com.xjrsoft.module.mdm.mapper.LngBPlaceLngUnloadMapper;
|
||||||
import com.xjrsoft.module.mdm.service.IPlaceLngUnloadService;
|
import com.xjrsoft.module.mdm.service.IPlaceLngUnloadService;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
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
|
* @title: service
|
||||||
|
|||||||
@ -119,7 +119,18 @@ public class CustomerScoreController {
|
|||||||
@SaCheckPermission("scoreCustomer:edit")
|
@SaCheckPermission("scoreCustomer:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngScoreDto dto){
|
public R update(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||||
|
|
||||||
return R.ok(dataService.updateById(dto));
|
return R.ok(dataService.updateById(dto, new DataOperationListener<UpdateLngScoreDto>() {
|
||||||
|
@Override
|
||||||
|
public UpdateLngScoreDto before(DataOperationContent<UpdateLngScoreDto> content) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UpdateLngScoreDto after(DataOperationContent<UpdateLngScoreDto> content) {
|
||||||
|
//execAfter(content.getTableName(), content.getIdValue(), "I");
|
||||||
|
return content.getObj();
|
||||||
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
|
|||||||
@ -1,28 +1,25 @@
|
|||||||
package com.xjrsoft.module.sales.service.impl;
|
package com.xjrsoft.module.sales.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
import com.xjrsoft.module.sales.entity.LngCustomer;
|
import com.xjrsoft.module.sales.entity.LngCustomer;
|
||||||
import com.xjrsoft.module.sales.entity.LngScore;
|
import com.xjrsoft.module.sales.entity.LngScore;
|
||||||
import com.xjrsoft.module.sales.entity.LngScoreDtl;
|
import com.xjrsoft.module.sales.entity.LngScoreDtl;
|
||||||
|
import com.xjrsoft.module.sales.mapper.LngCustomerMapper;
|
||||||
import com.xjrsoft.module.sales.mapper.LngCustomerScoreDtlMapper;
|
import com.xjrsoft.module.sales.mapper.LngCustomerScoreDtlMapper;
|
||||||
import com.xjrsoft.module.sales.mapper.LngCustomerScoreMapper;
|
import com.xjrsoft.module.sales.mapper.LngCustomerScoreMapper;
|
||||||
import com.xjrsoft.module.sales.service.IScoreCustomerService;
|
import com.xjrsoft.module.sales.service.IScoreCustomerService;
|
||||||
import com.xjrsoft.module.sales.vo.LngCustomerDocVo;
|
|
||||||
import com.xjrsoft.module.sales.vo.LngCustomerVo;
|
|
||||||
import com.xjrsoft.module.sales.vo.LngScoreVo;
|
import com.xjrsoft.module.sales.vo.LngScoreVo;
|
||||||
import com.xjrsoft.module.system.client.IFileClient;
|
import com.xjrsoft.module.system.client.IFileClient;
|
||||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,9 +31,12 @@ import lombok.AllArgsConstructor;
|
|||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class CustomerScoreServiceImpl extends MPJBaseServiceImpl<LngCustomerScoreMapper, LngScore> implements IScoreCustomerService {
|
public class CustomerScoreServiceImpl extends MPJBaseServiceImpl<LngCustomerScoreMapper, LngScore> implements IScoreCustomerService {
|
||||||
private final LngCustomerScoreMapper scoreCustomerLngScoreMapper;
|
private final LngCustomerScoreMapper customerScoreMapper;
|
||||||
|
|
||||||
|
private final LngCustomerScoreDtlMapper customerScoreDtlMapper;
|
||||||
|
|
||||||
|
private final LngCustomerMapper customerMapper;
|
||||||
|
|
||||||
private final LngCustomerScoreDtlMapper scoreCustomerLngScoreDtlMapper;
|
|
||||||
|
|
||||||
private final IFileClient fileClient;
|
private final IFileClient fileClient;
|
||||||
|
|
||||||
@ -44,8 +44,8 @@ public class CustomerScoreServiceImpl extends MPJBaseServiceImpl<LngCustomerScor
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean delete(List<Long> ids) {
|
public Boolean delete(List<Long> ids) {
|
||||||
scoreCustomerLngScoreMapper.deleteBatchIds(ids);
|
customerScoreMapper.deleteBatchIds(ids);
|
||||||
scoreCustomerLngScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
customerScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -57,6 +57,13 @@ public class CustomerScoreServiceImpl extends MPJBaseServiceImpl<LngCustomerScor
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
LngScoreVo vo = BeanUtil.toBean(lngScore, LngScoreVo.class);
|
LngScoreVo vo = BeanUtil.toBean(lngScore, LngScoreVo.class);
|
||||||
|
LngCustomer customer = customerMapper.selectOne(new LambdaQueryWrapper<LngCustomer>()
|
||||||
|
.eq(LngCustomer::getCuCode, vo.getCpCode()));
|
||||||
|
if(customer != null) {
|
||||||
|
vo.setCpClassCode(customer.getClassCode());
|
||||||
|
vo.setCpName(customer.getCuName());
|
||||||
|
}
|
||||||
|
|
||||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_score", "lngFileUploadList", vo.getId());
|
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_score", "lngFileUploadList", vo.getId());
|
||||||
vo.setLngFileUploadList(fileList);
|
vo.setLngFileUploadList(fileList);
|
||||||
return vo;
|
return vo;
|
||||||
|
|||||||
@ -28,10 +28,8 @@ import com.xjrsoft.module.supplier.dto.UpdateLngScoreDto;
|
|||||||
import com.xjrsoft.module.supplier.entity.LngScore;
|
import com.xjrsoft.module.supplier.entity.LngScore;
|
||||||
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
||||||
import com.xjrsoft.module.supplier.vo.LngScorePageVo;
|
import com.xjrsoft.module.supplier.vo.LngScorePageVo;
|
||||||
import com.xjrsoft.module.supplier.vo.LngScoreVo;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -115,7 +113,17 @@ public class SupplierScoreController {
|
|||||||
@ApiOperation(value = "修改LngScore")
|
@ApiOperation(value = "修改LngScore")
|
||||||
@SaCheckPermission("scoreSupplier:edit")
|
@SaCheckPermission("scoreSupplier:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngScoreDto dto){
|
public R update(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||||
return R.ok(dataService.updateById(dto));
|
return R.ok(dataService.updateById(dto, new DataOperationListener<UpdateLngScoreDto>() {
|
||||||
|
@Override
|
||||||
|
public UpdateLngScoreDto before(DataOperationContent<UpdateLngScoreDto> content) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UpdateLngScoreDto after(DataOperationContent<UpdateLngScoreDto> content) {
|
||||||
|
return content.getObj();
|
||||||
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.github.yulichang.base.MPJBaseService;
|
import com.github.yulichang.base.MPJBaseService;
|
||||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||||
|
import com.xjrsoft.module.supplier.dto.UpdateLngSupplierDto;
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
||||||
import com.xjrsoft.module.supplier.vo.LngSupplierVo;
|
import com.xjrsoft.module.supplier.vo.LngSupplierVo;
|
||||||
|
|
||||||
@ -29,4 +30,5 @@ public interface ISupplierService extends MPJBaseService<LngSupplier>, MPJDeepSe
|
|||||||
Boolean delete(List<Long> ids);
|
Boolean delete(List<Long> ids);
|
||||||
|
|
||||||
LngSupplierVo getSupplierById(Long id);
|
LngSupplierVo getSupplierById(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,11 @@ package com.xjrsoft.module.supplier.service.impl;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
import com.xjrsoft.module.supplier.entity.LngScoreDtl;
|
import com.xjrsoft.module.supplier.entity.LngScoreDtl;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
||||||
|
import com.xjrsoft.module.supplier.mapper.LngSupplierMapper;
|
||||||
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreDtlMapper;
|
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreDtlMapper;
|
||||||
|
import com.xjrsoft.module.mdm.entity.LngBRegion;
|
||||||
|
import com.xjrsoft.module.supplier.dto.UpdateLngSupplierDto;
|
||||||
import com.xjrsoft.module.supplier.entity.LngScore;
|
import com.xjrsoft.module.supplier.entity.LngScore;
|
||||||
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreMapper;
|
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreMapper;
|
||||||
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
||||||
@ -18,6 +22,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,9 +36,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class SupplierScoreServiceImpl extends MPJBaseServiceImpl<LngSupplierScoreMapper, LngScore> implements IScoreSupplierService {
|
public class SupplierScoreServiceImpl extends MPJBaseServiceImpl<LngSupplierScoreMapper, LngScore> implements IScoreSupplierService {
|
||||||
|
|
||||||
private final LngSupplierScoreMapper scoreSupplierLngScoreMapper;
|
private final LngSupplierScoreMapper supplierScoreMapper;
|
||||||
|
|
||||||
private final LngSupplierScoreDtlMapper scoreSupplierLngScoreDtlMapper;
|
private final LngSupplierScoreDtlMapper supplierScoreDtlMapper;
|
||||||
|
|
||||||
|
private final LngSupplierMapper supplierMapper;
|
||||||
|
|
||||||
private final IFileClient fileClient;
|
private final IFileClient fileClient;
|
||||||
|
|
||||||
@ -40,8 +48,8 @@ public class SupplierScoreServiceImpl extends MPJBaseServiceImpl<LngSupplierScor
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean delete(List<Long> ids) {
|
public Boolean delete(List<Long> ids) {
|
||||||
scoreSupplierLngScoreMapper.deleteBatchIds(ids);
|
supplierScoreMapper.deleteBatchIds(ids);
|
||||||
scoreSupplierLngScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
supplierScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -54,6 +62,13 @@ public class SupplierScoreServiceImpl extends MPJBaseServiceImpl<LngSupplierScor
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
LngScoreVo vo = BeanUtil.toBean(lngScore, LngScoreVo.class);
|
LngScoreVo vo = BeanUtil.toBean(lngScore, LngScoreVo.class);
|
||||||
|
LngSupplier supplier = supplierMapper.selectOne(new LambdaQueryWrapper<LngSupplier>()
|
||||||
|
.eq(LngSupplier::getSuCode, vo.getCpCode()));
|
||||||
|
if(supplier != null) {
|
||||||
|
vo.setCpClassCode(supplier.getClassCode());
|
||||||
|
vo.setCpName(supplier.getSuName());
|
||||||
|
}
|
||||||
|
|
||||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_score", "lngFileUploadList", vo.getId());
|
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_score", "lngFileUploadList", vo.getId());
|
||||||
vo.setLngFileUploadList(fileList);
|
vo.setLngFileUploadList(fileList);
|
||||||
return vo;
|
return vo;
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
|
import com.xjrsoft.module.supplier.dto.UpdateLngSupplierDto;
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplierBank;
|
import com.xjrsoft.module.supplier.entity.LngSupplierBank;
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplierContact;
|
import com.xjrsoft.module.supplier.entity.LngSupplierContact;
|
||||||
@ -34,7 +35,7 @@ import lombok.AllArgsConstructor;
|
|||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, LngSupplier> implements ISupplierService {
|
public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, LngSupplier> implements ISupplierService {
|
||||||
private final LngSupplierMapper supplierLngSupplierMapper;
|
private final LngSupplierMapper supplierMapper;
|
||||||
|
|
||||||
private final LngSupplierBankMapper supplierLngSupplierBankMapper;
|
private final LngSupplierBankMapper supplierLngSupplierBankMapper;
|
||||||
private final LngSupplierContactMapper supplierLngSupplierContactMapper;
|
private final LngSupplierContactMapper supplierLngSupplierContactMapper;
|
||||||
@ -45,7 +46,7 @@ public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, L
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean delete(List<Long> ids) {
|
public Boolean delete(List<Long> ids) {
|
||||||
supplierLngSupplierMapper.deleteBatchIds(ids);
|
supplierMapper.deleteBatchIds(ids);
|
||||||
supplierLngSupplierBankMapper.delete(Wrappers.lambdaQuery(LngSupplierBank.class).in(LngSupplierBank::getSuCode, ids));
|
supplierLngSupplierBankMapper.delete(Wrappers.lambdaQuery(LngSupplierBank.class).in(LngSupplierBank::getSuCode, ids));
|
||||||
supplierLngSupplierContactMapper.delete(Wrappers.lambdaQuery(LngSupplierContact.class).in(LngSupplierContact::getSuCode, ids));
|
supplierLngSupplierContactMapper.delete(Wrappers.lambdaQuery(LngSupplierContact.class).in(LngSupplierContact::getSuCode, ids));
|
||||||
supplierLngSupplierDocMapper.delete(Wrappers.lambdaQuery(LngSupplierDoc.class).in(LngSupplierDoc::getSuCode, ids));
|
supplierLngSupplierDocMapper.delete(Wrappers.lambdaQuery(LngSupplierDoc.class).in(LngSupplierDoc::getSuCode, ids));
|
||||||
@ -70,6 +71,7 @@ public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, L
|
|||||||
vo.setLngFileUploadList(fileList);
|
vo.setLngFileUploadList(fileList);
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user