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.target>${java.version}</maven.compiler.target>
|
||||
<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>
|
||||
<libServerPwd>K9$pQ3!zX7@rT2&w</libServerPwd>
|
||||
<ignoreUpload>false</ignoreUpload>
|
||||
<docker-jar-name>${project.build.finalName}-server.jar</docker-jar-name>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@ -32,7 +32,7 @@ else
|
||||
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 -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
|
||||
|
||||
# 公共配置(编码、时区等)
|
||||
|
||||
@ -34,7 +34,7 @@ public class LngScorePageVo {
|
||||
* 评价体系主键
|
||||
*/
|
||||
@ApiModelProperty("评价体系主键")
|
||||
@Trans(type = TransType.API, id = "93d735dcb7364a0f8102188ec4d77ac7")
|
||||
//@Trans(type = TransType.API, id = "93d735dcb7364a0f8102188ec4d77ac7")
|
||||
private String gsId;
|
||||
/**
|
||||
* 供应商/客户
|
||||
|
||||
@ -4,6 +4,8 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
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.system.vo.LngFileUploadVo;
|
||||
|
||||
@ -135,4 +137,16 @@ public class LngScoreVo {
|
||||
@ApiModelProperty("lngFileUpload子表")
|
||||
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.util.List;
|
||||
|
||||
import com.xjrsoft.common.annotation.Trans;
|
||||
import com.xjrsoft.common.enums.TransType;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -137,4 +139,17 @@ public class LngScoreVo {
|
||||
@ApiModelProperty("lngFileUpload子表")
|
||||
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.metadata.IPage;
|
||||
import com.pictc.constant.FieldNameConstants;
|
||||
import com.pictc.datalog.DataOperationContent;
|
||||
import com.pictc.datalog.DataOperationListener;
|
||||
import com.pictc.enums.BusinessCode;
|
||||
@ -129,6 +130,7 @@ public class CountryRegionController {
|
||||
}else {
|
||||
dto.setFullPath(dto.getFullName());
|
||||
}
|
||||
checkParams(dto);
|
||||
return content.getObj();
|
||||
}
|
||||
|
||||
@ -164,6 +166,7 @@ public class CountryRegionController {
|
||||
}else {
|
||||
dto.setFullPath(dto.getFullName());
|
||||
}
|
||||
checkParams(dto);
|
||||
return content.getObj();
|
||||
}
|
||||
|
||||
@ -243,4 +246,20 @@ public class CountryRegionController {
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
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.mapper.LngBPlaceLngUnloadMapper;
|
||||
import com.xjrsoft.module.mdm.service.IPlaceLngUnloadService;
|
||||
|
||||
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
|
||||
|
||||
@ -119,7 +119,18 @@ public class CustomerScoreController {
|
||||
@SaCheckPermission("scoreCustomer:edit")
|
||||
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
|
||||
|
||||
@ -1,28 +1,25 @@
|
||||
package com.xjrsoft.module.sales.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||
import com.xjrsoft.module.sales.entity.LngCustomer;
|
||||
import com.xjrsoft.module.sales.entity.LngScore;
|
||||
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.LngCustomerScoreMapper;
|
||||
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.system.client.IFileClient;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
@ -34,9 +31,12 @@ import lombok.AllArgsConstructor;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
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;
|
||||
|
||||
@ -44,8 +44,8 @@ public class CustomerScoreServiceImpl extends MPJBaseServiceImpl<LngCustomerScor
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(List<Long> ids) {
|
||||
scoreCustomerLngScoreMapper.deleteBatchIds(ids);
|
||||
scoreCustomerLngScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||
customerScoreMapper.deleteBatchIds(ids);
|
||||
customerScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -57,6 +57,13 @@ public class CustomerScoreServiceImpl extends MPJBaseServiceImpl<LngCustomerScor
|
||||
return null;
|
||||
}
|
||||
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());
|
||||
vo.setLngFileUploadList(fileList);
|
||||
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.service.IScoreSupplierService;
|
||||
import com.xjrsoft.module.supplier.vo.LngScorePageVo;
|
||||
import com.xjrsoft.module.supplier.vo.LngScoreVo;
|
||||
|
||||
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;
|
||||
@ -115,7 +113,17 @@ public class SupplierScoreController {
|
||||
@ApiOperation(value = "修改LngScore")
|
||||
@SaCheckPermission("scoreSupplier:edit")
|
||||
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
|
||||
|
||||
@ -4,6 +4,7 @@ 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.supplier.dto.UpdateLngSupplierDto;
|
||||
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
||||
import com.xjrsoft.module.supplier.vo.LngSupplierVo;
|
||||
|
||||
@ -29,4 +30,5 @@ public interface ISupplierService extends MPJBaseService<LngSupplier>, MPJDeepSe
|
||||
Boolean delete(List<Long> ids);
|
||||
|
||||
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.github.yulichang.base.MPJBaseServiceImpl;
|
||||
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.mdm.entity.LngBRegion;
|
||||
import com.xjrsoft.module.supplier.dto.UpdateLngSupplierDto;
|
||||
import com.xjrsoft.module.supplier.entity.LngScore;
|
||||
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreMapper;
|
||||
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
||||
@ -18,6 +22,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
/**
|
||||
@ -30,9 +36,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
@AllArgsConstructor
|
||||
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;
|
||||
|
||||
@ -40,8 +48,8 @@ public class SupplierScoreServiceImpl extends MPJBaseServiceImpl<LngSupplierScor
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(List<Long> ids) {
|
||||
scoreSupplierLngScoreMapper.deleteBatchIds(ids);
|
||||
scoreSupplierLngScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||
supplierScoreMapper.deleteBatchIds(ids);
|
||||
supplierScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -54,6 +62,13 @@ public class SupplierScoreServiceImpl extends MPJBaseServiceImpl<LngSupplierScor
|
||||
return null;
|
||||
}
|
||||
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());
|
||||
vo.setLngFileUploadList(fileList);
|
||||
return vo;
|
||||
|
||||
@ -7,6 +7,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
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.LngSupplierBank;
|
||||
import com.xjrsoft.module.supplier.entity.LngSupplierContact;
|
||||
@ -34,7 +35,7 @@ import lombok.AllArgsConstructor;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, LngSupplier> implements ISupplierService {
|
||||
private final LngSupplierMapper supplierLngSupplierMapper;
|
||||
private final LngSupplierMapper supplierMapper;
|
||||
|
||||
private final LngSupplierBankMapper supplierLngSupplierBankMapper;
|
||||
private final LngSupplierContactMapper supplierLngSupplierContactMapper;
|
||||
@ -45,7 +46,7 @@ public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, L
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(List<Long> ids) {
|
||||
supplierLngSupplierMapper.deleteBatchIds(ids);
|
||||
supplierMapper.deleteBatchIds(ids);
|
||||
supplierLngSupplierBankMapper.delete(Wrappers.lambdaQuery(LngSupplierBank.class).in(LngSupplierBank::getSuCode, ids));
|
||||
supplierLngSupplierContactMapper.delete(Wrappers.lambdaQuery(LngSupplierContact.class).in(LngSupplierContact::getSuCode, ids));
|
||||
supplierLngSupplierDocMapper.delete(Wrappers.lambdaQuery(LngSupplierDoc.class).in(LngSupplierDoc::getSuCode, ids));
|
||||
@ -72,4 +73,5 @@ public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, L
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user