08-21
This commit is contained in:
@ -92,8 +92,8 @@ public class BusSegmentedIndicatorPlanningController extends BaseController {
|
||||
public R<BusSegmentedIndicatorPlanningVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
BusSegmentedIndicatorPlanningVo busSegmentedIndicatorPlanningVo = busSegmentedIndicatorPlanningService.queryById(id);
|
||||
List<TenderPlanFile> list = tenderPlanFileService.list(Wrappers.<TenderPlanFile>lambdaQuery().eq(TenderPlanFile::getPlanId, id));
|
||||
busSegmentedIndicatorPlanningVo.setFile(list);
|
||||
// List<TenderPlanFile> list = tenderPlanFileService.list(Wrappers.<TenderPlanFile>lambdaQuery().eq(TenderPlanFile::getPlanId, id));
|
||||
// busSegmentedIndicatorPlanningVo.setFile(list);
|
||||
return R.ok(busSegmentedIndicatorPlanningVo);
|
||||
}
|
||||
|
||||
|
@ -101,15 +101,14 @@ public class TenderPlanController extends BaseController {
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@RequestBody BusSegmentedIndicatorPlanningBo bo) {
|
||||
|
||||
if (CollectionUtil.isNotEmpty(bo.getFile())) {
|
||||
tenderPlanFileService.remove(Wrappers.<TenderPlanFile>lambdaQuery().eq(TenderPlanFile::getPlanId, bo.getId()));
|
||||
List<TenderPlanFile> convert = MapstructUtils.convert(bo.getFile(), TenderPlanFile.class);
|
||||
convert.forEach(item -> {
|
||||
item.setPlanId(bo.getId());
|
||||
});
|
||||
tenderPlanFileService.saveBatch(convert);
|
||||
}
|
||||
// tenderPlanFileService.remove(Wrappers.<TenderPlanFile>lambdaQuery().eq(TenderPlanFile::getPlanId, bo.getId()));
|
||||
// if (CollectionUtil.isNotEmpty(bo.getFile())) {
|
||||
// List<TenderPlanFile> convert = MapstructUtils.convert(bo.getFile(), TenderPlanFile.class);
|
||||
// convert.forEach(item -> {
|
||||
// item.setPlanId(bo.getId());
|
||||
// });
|
||||
// tenderPlanFileService.saveBatch(convert);
|
||||
// }
|
||||
// if (files != null && !files.isEmpty()) {
|
||||
// List<TenderPlanFile> tenderPlanFiles = new ArrayList<>();
|
||||
// for (MultipartFile file : files) {
|
||||
|
@ -83,4 +83,7 @@ public class BusSegmentedIndicatorPlanning extends BaseEntity {
|
||||
*/
|
||||
private String bidFile;
|
||||
|
||||
|
||||
private String tenderFile;
|
||||
|
||||
}
|
||||
|
@ -100,4 +100,7 @@ public class BusSegmentedIndicatorPlanningBo extends BaseEntity {
|
||||
*/
|
||||
private List<TenderPlanFileBo> file;
|
||||
|
||||
|
||||
private String tenderFile;
|
||||
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public class TenderSupplierInputBo extends BaseEntity {
|
||||
/**
|
||||
* 证书有效期
|
||||
*/
|
||||
private String safeCertificateValidity;
|
||||
private Date safeCertificateValidity;
|
||||
|
||||
/**
|
||||
* 注册注册人员的数量
|
||||
|
@ -102,6 +102,8 @@ BusSegmentedIndicatorPlanningVo implements Serializable {
|
||||
@ExcelProperty(value = "中标通知书")
|
||||
private String bidFile;
|
||||
|
||||
private List<TenderPlanFile> file;
|
||||
// private List<TenderPlanFile> file;
|
||||
|
||||
private String tenderFile;
|
||||
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ public class BusSegmentedIndicatorPlanningServiceImpl extends ServiceImpl<BusSeg
|
||||
private void validEntityBeforeSave(BusSegmentedIndicatorPlanning entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
String dictName = entity.getDictName();
|
||||
BigDecimal contractPrice = entity.getContractPrice();
|
||||
BigDecimal contractPrice = entity.getLimitPrice().multiply(new BigDecimal("10000"));
|
||||
switch (dictName) {
|
||||
case "1" -> {
|
||||
if (contractPrice.compareTo(BigDecimal.valueOf(100000000)) > 0) {
|
||||
|
Reference in New Issue
Block a user