供应商评价
This commit is contained in:
@ -8,11 +8,13 @@ import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.pictc.annotations.datalog.JoinCaseType;
|
||||
import com.pictc.annotations.datalog.JoinType;
|
||||
import com.pictc.annotations.datalog.LogAttrField;
|
||||
import com.pictc.annotations.datalog.LogField;
|
||||
import com.pictc.annotations.datalog.LogJoin;
|
||||
import com.pictc.annotations.datalog.LogJoinColumn;
|
||||
import com.pictc.annotations.datalog.LogTable;
|
||||
import com.pictc.annotations.datalog.ValueDirectionType;
|
||||
import com.xjrsoft.module.system.dto.UpdateLngFileUploadDto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -139,8 +141,15 @@ public class UpdateLngScoreDto implements Serializable {
|
||||
@ApiModelProperty("lngScoreDtl子表")
|
||||
@LogJoin(name = "lngScoreDtl子表",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "sId",relatedField = "id", valueDirection = ValueDirectionType.RIGHT)
|
||||
@LogJoinColumn(field = "id",relatedField = "sId", valueDirection = ValueDirectionType.RIGHT)
|
||||
},
|
||||
caseType = JoinCaseType.FULL, target = UpdateLngScoreDtlDto.class, type = JoinType.MANY)
|
||||
private List<UpdateLngScoreDtlDto> lngScoreDtlList;
|
||||
|
||||
/**
|
||||
* lngFileUpload
|
||||
*/
|
||||
@ApiModelProperty("lngFileUpload子表")
|
||||
@LogAttrField
|
||||
private List<UpdateLngFileUploadDto> lngFileUploadList;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ public class UpdateLngScoreDto implements Serializable {
|
||||
*/
|
||||
@LogField(name="评分日期",index=1)
|
||||
@ApiModelProperty("评分日期")
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime dateGrade;
|
||||
|
||||
/**
|
||||
@ -104,7 +104,7 @@ public class UpdateLngScoreDto implements Serializable {
|
||||
@ApiModelProperty("lngScoreDtl子表")
|
||||
@LogJoin(name = "lngScoreDtl子表",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "sId",relatedField = "id", valueDirection = ValueDirectionType.RIGHT)
|
||||
@LogJoinColumn(field = "id",relatedField = "sId", valueDirection = ValueDirectionType.RIGHT)
|
||||
},
|
||||
caseType = JoinCaseType.FULL, target = UpdateLngScoreDtlDto.class, type = JoinType.MANY)
|
||||
private List<UpdateLngScoreDtlDto> lngScoreDtlList;
|
||||
|
||||
@ -28,7 +28,7 @@ public class LngScorePageVo {
|
||||
* 评分日期
|
||||
*/
|
||||
@ApiModelProperty("评分日期")
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime dateGrade;
|
||||
/**
|
||||
* 评价体系主键
|
||||
|
||||
@ -4,6 +4,8 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -129,4 +131,10 @@ public class LngScoreVo {
|
||||
@ApiModelProperty("lngScoreDtl子表")
|
||||
private List<LngScoreDtlVo> lngScoreDtlList;
|
||||
|
||||
/**
|
||||
* lngFileUpload
|
||||
*/
|
||||
@ApiModelProperty("lngFileUpload子表")
|
||||
private List<LngFileUploadVo> lngFileUploadList;
|
||||
|
||||
}
|
||||
|
||||
@ -15,6 +15,9 @@ 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.datalog.DataOperationContent;
|
||||
import com.pictc.datalog.DataOperationListener;
|
||||
import com.pictc.utils.StringUtils;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
@ -22,6 +25,7 @@ import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.sales.dto.LngScorePageDto;
|
||||
import com.xjrsoft.module.sales.dto.UpdateLngCustomerGroupDto;
|
||||
import com.xjrsoft.module.sales.dto.UpdateLngScoreDto;
|
||||
import com.xjrsoft.module.sales.entity.LngScore;
|
||||
import com.xjrsoft.module.sales.service.IScoreCustomerService;
|
||||
@ -43,7 +47,7 @@ import lombok.AllArgsConstructor;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sales" + "/scoreCustomer")
|
||||
@RequestMapping("/sales/scoreCustomer")
|
||||
@Api(value = "/sales" + "/scoreCustomer",tags = "客户评价代码")
|
||||
@AllArgsConstructor
|
||||
public class CustomerScoreController {
|
||||
@ -65,6 +69,7 @@ public class CustomerScoreController {
|
||||
.eq(ObjectUtil.isNotNull(dto.getScore()),LngScore::getScore,dto.getScore())
|
||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngScore::getApproCode,dto.getApproCode())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngScore::getNote,dto.getNote())
|
||||
.eq(LngScore::getTableName, "lng_customer")
|
||||
.orderByDesc(LngScore::getId);
|
||||
IPage<LngScore> page = scoreCustomerService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngScorePageVo> pageOutput = ConventPage.getPageOutput(page, LngScorePageVo.class);
|
||||
@ -75,11 +80,7 @@ public class CustomerScoreController {
|
||||
@ApiOperation(value="根据id查询LngScore信息")
|
||||
@SaCheckPermission("scoreCustomer:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngScore lngScore = scoreCustomerService.getByIdDeep(id);
|
||||
if (lngScore == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngScore, LngScoreVo.class));
|
||||
return R.ok(scoreCustomerService.getInfoById(id));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ -95,14 +96,29 @@ public class CustomerScoreController {
|
||||
@ApiOperation(value = "新增LngScore")
|
||||
@SaCheckPermission("scoreCustomer:add")
|
||||
public R add(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||
UpdateLngScoreDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
if(StringUtils.isEmpty(dto.getTableName())) {
|
||||
dto.setTableName("lng_customer");
|
||||
}
|
||||
UpdateLngScoreDto res = dataService.insert(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();
|
||||
}
|
||||
});
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改LngScore")
|
||||
@SaCheckPermission("scoreCustomer:edit")
|
||||
public R update(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||
|
||||
return R.ok(dataService.updateById(dto));
|
||||
}
|
||||
|
||||
|
||||
@ -1,20 +1,24 @@
|
||||
package com.xjrsoft.module.sales.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
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.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.yulichang.annotation.EntityMapping;
|
||||
import com.pictc.annotations.datalog.JoinCaseType;
|
||||
import com.pictc.annotations.datalog.JoinType;
|
||||
import com.pictc.annotations.datalog.LogJoin;
|
||||
import com.pictc.annotations.datalog.LogJoinColumn;
|
||||
import com.pictc.annotations.datalog.ValueDirectionType;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
@ -134,6 +138,11 @@ public class LngScore implements Serializable {
|
||||
@ApiModelProperty("lngScoreDtl子表")
|
||||
@TableField(exist = false)
|
||||
@EntityMapping(thisField = "id", joinField = "sId")
|
||||
@LogJoin(name = "客户联系人信息",
|
||||
columns = {
|
||||
@LogJoinColumn(field = "id",relatedField = "sId", valueDirection = ValueDirectionType.RIGHT)
|
||||
}, caseType = JoinCaseType.FULL, target = LngScoreDtl.class, type = JoinType.MANY)
|
||||
|
||||
private List<LngScoreDtl> lngScoreDtlList;
|
||||
|
||||
}
|
||||
@ -15,10 +15,12 @@ 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.datalog.DataOperationContent;
|
||||
import com.pictc.datalog.DataOperationListener;
|
||||
import com.pictc.utils.StringUtils;
|
||||
import com.xjrsoft.common.model.result.R;
|
||||
import com.xjrsoft.common.page.ConventPage;
|
||||
import com.xjrsoft.common.page.PageOutput;
|
||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||
import com.xjrsoft.module.supplier.dto.LngScorePageDto;
|
||||
@ -43,7 +45,7 @@ import lombok.AllArgsConstructor;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/supplier" + "/scoreSupplier")
|
||||
@RequestMapping("/supplier/scoreSupplier")
|
||||
@Api(value = "/supplier" + "/scoreSupplier",tags = "供应商评价代码")
|
||||
@AllArgsConstructor
|
||||
public class SupplierScoreController {
|
||||
@ -65,8 +67,8 @@ public class SupplierScoreController {
|
||||
.eq(ObjectUtil.isNotNull(dto.getScore()),LngScore::getScore,dto.getScore())
|
||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngScore::getApproCode,dto.getApproCode())
|
||||
.like(StrUtil.isNotBlank(dto.getNote()),LngScore::getNote,dto.getNote())
|
||||
.orderByDesc(LngScore::getId)
|
||||
.select(LngScore.class,x -> VoToColumnUtil.fieldsToColumns(LngScorePageVo.class).contains(x.getProperty()));
|
||||
.eq(LngScore::getTableName, "lng_supplier")
|
||||
.orderByDesc(LngScore::getId);
|
||||
IPage<LngScore> page = scoreSupplierService.page(ConventPage.getPage(dto), queryWrapper);
|
||||
PageOutput<LngScorePageVo> pageOutput = ConventPage.getPageOutput(page, LngScorePageVo.class);
|
||||
return R.ok(pageOutput);
|
||||
@ -76,11 +78,7 @@ public class SupplierScoreController {
|
||||
@ApiOperation(value="根据id查询LngScore信息")
|
||||
@SaCheckPermission("scoreSupplier:detail")
|
||||
public R info(@RequestParam Long id){
|
||||
LngScore lngScore = scoreSupplierService.getByIdDeep(id);
|
||||
if (lngScore == null) {
|
||||
return R.error("找不到此数据!");
|
||||
}
|
||||
return R.ok(BeanUtil.toBean(lngScore, LngScoreVo.class));
|
||||
return R.ok(scoreSupplierService.getInfoById(id));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/datalog")
|
||||
@ -96,8 +94,21 @@ public class SupplierScoreController {
|
||||
@ApiOperation(value = "新增LngScore")
|
||||
@SaCheckPermission("scoreSupplier:add")
|
||||
public R add(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||
UpdateLngScoreDto res = dataService.insert(dto);
|
||||
return R.ok(res.getId());
|
||||
if(StringUtils.isEmpty(dto.getTableName())) {
|
||||
dto.setTableName("lng_supplier");
|
||||
}
|
||||
UpdateLngScoreDto res = dataService.insert(dto, new DataOperationListener<UpdateLngScoreDto>() {
|
||||
@Override
|
||||
public UpdateLngScoreDto before(DataOperationContent<UpdateLngScoreDto> content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateLngScoreDto after(DataOperationContent<UpdateLngScoreDto> content) {
|
||||
return content.getObj();
|
||||
}
|
||||
});
|
||||
return R.ok(res);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ -111,7 +122,7 @@ public class SupplierScoreController {
|
||||
@ApiOperation(value = "删除")
|
||||
@SaCheckPermission("scoreSupplier:delete")
|
||||
public R delete(@Valid @RequestBody List<Long> ids){
|
||||
return R.ok(dataService.deleteByIds(UpdateLngScoreDto.class, ids));
|
||||
return R.ok(dataService.deleteByIds(UpdateLngScoreDto.class, ids));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package com.xjrsoft.module.supplier.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
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.entity.LngScore;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import com.xjrsoft.module.supplier.vo.LngScoreVo;
|
||||
|
||||
/**
|
||||
* @title: service
|
||||
@ -16,21 +16,7 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
public interface IScoreSupplierService extends MPJBaseService<LngScore>, MPJDeepService<LngScore>, MPJRelationService<LngScore> {
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param lngScore
|
||||
* @return
|
||||
*/
|
||||
Boolean add(LngScore lngScore);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lngScore
|
||||
* @return
|
||||
*/
|
||||
Boolean update(LngScore lngScore);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
@ -39,4 +25,6 @@ public interface IScoreSupplierService extends MPJBaseService<LngScore>, MPJDeep
|
||||
* @return
|
||||
*/
|
||||
Boolean delete(List<Long> ids);
|
||||
|
||||
LngScoreVo getInfoById(Long id);
|
||||
}
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
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.mapper.LngSupplierScoreDtlMapper;
|
||||
import com.xjrsoft.module.supplier.entity.LngScore;
|
||||
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreMapper;
|
||||
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
||||
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-12-17
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ScoreSupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierScoreMapper, LngScore> implements IScoreSupplierService {
|
||||
private final LngSupplierScoreMapper scoreSupplierLngScoreMapper;
|
||||
|
||||
private final LngSupplierScoreDtlMapper scoreSupplierLngScoreDtlMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean add(LngScore lngScore) {
|
||||
scoreSupplierLngScoreMapper.insert(lngScore);
|
||||
for (LngScoreDtl lngScoreDtl : lngScore.getLngScoreDtlList()) {
|
||||
lngScoreDtl.setSId(lngScore.getId());
|
||||
scoreSupplierLngScoreDtlMapper.insert(lngScoreDtl);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean update(LngScore lngScore) {
|
||||
scoreSupplierLngScoreMapper.updateById(lngScore);
|
||||
//********************************* LngScoreDtl 增删改 开始 *******************************************/
|
||||
{
|
||||
// 查出所有子级的id
|
||||
List<LngScoreDtl> lngScoreDtlList = scoreSupplierLngScoreDtlMapper.selectList(Wrappers.lambdaQuery(LngScoreDtl.class).eq(LngScoreDtl::getSId, lngScore.getId()).select(LngScoreDtl::getId));
|
||||
List<Long> lngScoreDtlIds = lngScoreDtlList.stream().map(LngScoreDtl::getId).collect(Collectors.toList());
|
||||
//原有子表单 没有被删除的主键
|
||||
List<Long> lngScoreDtlOldIds = lngScore.getLngScoreDtlList().stream().map(LngScoreDtl::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
//找到需要删除的id
|
||||
List<Long> lngScoreDtlRemoveIds = lngScoreDtlIds.stream().filter(item -> !lngScoreDtlOldIds.contains(item)).collect(Collectors.toList());
|
||||
|
||||
for (LngScoreDtl lngScoreDtl : lngScore.getLngScoreDtlList()) {
|
||||
//如果不等于空则修改
|
||||
if (lngScoreDtl.getId() != null) {
|
||||
scoreSupplierLngScoreDtlMapper.updateById(lngScoreDtl);
|
||||
}
|
||||
//如果等于空 则新增
|
||||
else {
|
||||
//已经不存在的id 删除
|
||||
lngScoreDtl.setSId(lngScore.getId());
|
||||
scoreSupplierLngScoreDtlMapper.insert(lngScoreDtl);
|
||||
}
|
||||
}
|
||||
//已经不存在的id 删除
|
||||
if(lngScoreDtlRemoveIds.size() > 0){
|
||||
scoreSupplierLngScoreDtlMapper.deleteBatchIds(lngScoreDtlRemoveIds);
|
||||
}
|
||||
}
|
||||
//********************************* LngScoreDtl 增删改 结束 *******************************************/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(List<Long> ids) {
|
||||
scoreSupplierLngScoreMapper.deleteBatchIds(ids);
|
||||
scoreSupplierLngScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
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.mapper.LngSupplierScoreDtlMapper;
|
||||
import com.xjrsoft.module.supplier.entity.LngScore;
|
||||
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreMapper;
|
||||
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
||||
import com.xjrsoft.module.supplier.vo.LngScoreVo;
|
||||
import com.xjrsoft.module.system.client.IFileClient;
|
||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
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-12-17
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class SupplierScoreServiceImpl extends MPJBaseServiceImpl<LngSupplierScoreMapper, LngScore> implements IScoreSupplierService {
|
||||
|
||||
private final LngSupplierScoreMapper scoreSupplierLngScoreMapper;
|
||||
|
||||
private final LngSupplierScoreDtlMapper scoreSupplierLngScoreDtlMapper;
|
||||
|
||||
private final IFileClient fileClient;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(List<Long> ids) {
|
||||
scoreSupplierLngScoreMapper.deleteBatchIds(ids);
|
||||
scoreSupplierLngScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LngScoreVo getInfoById(Long id) {
|
||||
LngScore lngScore = this.getByIdDeep(id);
|
||||
if(lngScore == null) {
|
||||
return null;
|
||||
}
|
||||
LngScoreVo vo = BeanUtil.toBean(lngScore, LngScoreVo.class);
|
||||
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_supplier", "lngFileUploadList", vo.getId());
|
||||
vo.setLngFileUploadList(fileList);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user