修改表结构
This commit is contained in:
@ -2,10 +2,16 @@ package org.dromara.cailiaoshebei.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
||||
import org.dromara.cailiaoshebei.domain.BusMaterialsorder;
|
||||
import org.dromara.cailiaoshebei.domain.bo.*;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusCailiaoshebeiPiciVo;
|
||||
import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiPiciService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
@ -18,7 +24,6 @@ import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusMaterialsorderVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialsorderBo;
|
||||
import org.dromara.cailiaoshebei.service.IBusMaterialsorderService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
@ -35,17 +40,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
public class BusMaterialsorderController extends BaseController {
|
||||
|
||||
private final IBusMaterialsorderService busMaterialsorderService;
|
||||
|
||||
/**
|
||||
* 新增物资-设备订货
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:materialsorder:add")
|
||||
@Log(title = "物资-设备订货", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody BusMaterialsorderBo bo) {
|
||||
return toAjax(busMaterialsorderService.insertByBo(bo));
|
||||
}
|
||||
private final IBusCailiaoshebeiPiciService busCailiaoshebeiPiciService;
|
||||
|
||||
// /**
|
||||
// * 查询物资-设备订货列表
|
||||
@ -113,4 +108,38 @@ public class BusMaterialsorderController extends BaseController {
|
||||
// @PathVariable Long[] ids) {
|
||||
// return toAjax(busMaterialsorderService.deleteWithValidByIds(List.of(ids), true));
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 订货-批次号列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:materialsorder:pcPlanList")
|
||||
@GetMapping("/pcPlanList")
|
||||
public TableDataInfo<BusCailiaoshebeiPiciVo> pcPlanList(BusCailiaoshebeiPiciPcListReq bo, PageQuery pageQuery) {
|
||||
BusCailiaoshebeiPiciBo busCailiaoshebeiPiciBo = BeanUtil.copyProperties(bo, BusCailiaoshebeiPiciBo.class);
|
||||
busCailiaoshebeiPiciBo.setBatchType("3");
|
||||
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订货-修改订货信息
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:materialsorder:modifyTheOrderForm")
|
||||
@Log(title = "订货-修改订货信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/modifyTheOrderForm")
|
||||
public R<Void> modifyTheOrderForm(@Validated(EditGroup.class) @RequestBody MaterialsorderPcPlanEditReq req) {
|
||||
return toAjax(busMaterialsorderService.modifyTheOrderForm(req));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订货-查询物资设备订货列表
|
||||
*/
|
||||
@SaCheckPermission("cailiaoshebei:materialsorder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<BusMaterialsorderVo> list(BusMaterialsorderListReq req, PageQuery pageQuery) {
|
||||
BusMaterialsorderBo bo = BeanUtil.copyProperties(req, BusMaterialsorderBo.class);
|
||||
return busMaterialsorderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
}
|
||||
|
@ -30,9 +30,9 @@ public class BusCailiaoshebei extends BaseEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
* 批次号
|
||||
*/
|
||||
private Long batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 供货商ID
|
||||
@ -104,5 +104,4 @@ public class BusCailiaoshebei extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 物资-批次号对象 bus_cailiaoshebei_pici
|
||||
@ -67,4 +68,31 @@ public class BusCailiaoshebeiPici extends BaseEntity {
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 订货-采购人
|
||||
*/
|
||||
private String purchasingAgent;
|
||||
/**
|
||||
* 订货-采购时间
|
||||
*/
|
||||
private Date purchasingPeriod;
|
||||
/**
|
||||
* 订货-合同号
|
||||
*/
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 订货-备注
|
||||
*/
|
||||
private String dhRemark;
|
||||
/**
|
||||
* 订货-供应商
|
||||
*/
|
||||
private String dhSupplier;
|
||||
/**
|
||||
* 订货-状态
|
||||
*/
|
||||
private String dhSucceed;
|
||||
|
||||
|
||||
}
|
||||
|
@ -30,9 +30,9 @@ public class BusMaterialbatchdemandplan extends BaseEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
* 批次号
|
||||
*/
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
|
@ -30,9 +30,9 @@ public class BusMaterialsorder extends BaseEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
* 批次号
|
||||
*/
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
|
@ -40,9 +40,9 @@ public class BusCailiaoshebeiAddReq extends BaseEntity {
|
||||
/**
|
||||
* 批次ID (必填)
|
||||
*/
|
||||
@NotBlank(message = "批次ID不能为空", groups = { AddGroup.class })
|
||||
@NotBlank(message = "批次号不能为空", groups = { AddGroup.class })
|
||||
@Size(max = 128, message = "批次ID长度不能超过128个字符", groups = {AddGroup.class, EditGroup.class})
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 供货商ID (必填,多个逗号分隔)
|
||||
|
@ -35,9 +35,9 @@ public class BusCailiaoshebeiBo extends BaseEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
* 批次号
|
||||
*/
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 供货商ID
|
||||
|
@ -22,9 +22,9 @@ public class BusCailiaoshebeiListReq implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
* 批次号
|
||||
*/
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 供货商ID
|
||||
|
@ -17,9 +17,9 @@ import java.util.List;
|
||||
@Data
|
||||
public class BusMaterialbatchdemandplanAddReq implements Serializable {
|
||||
/**
|
||||
* 批次ID
|
||||
* 批次号
|
||||
*/
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@ public class BusMaterialsorderBo extends BaseEntity {
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
|
@ -0,0 +1,28 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/8/2 18:46
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class BusMaterialsorderListReq implements Serializable {
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private String batchId;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
}
|
@ -23,7 +23,7 @@ public class MasterDataListReq implements Serializable {
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
private String batchId;
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
|
@ -0,0 +1,50 @@
|
||||
package org.dromara.cailiaoshebei.domain.bo;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.cailiaoshebei.domain.BusMaterialsorder;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author 铁憨憨
|
||||
* @Date 2025/8/2 18:51
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MaterialsorderPcPlanEditReq implements Serializable {
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 订货-采购人
|
||||
*/
|
||||
private String purchasingAgent;
|
||||
/**
|
||||
* 订货-采购时间
|
||||
*/
|
||||
private Date purchasingPeriod;
|
||||
/**
|
||||
* 订货-合同号
|
||||
*/
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 订货-备注
|
||||
*/
|
||||
private String dhRemark;
|
||||
|
||||
/**
|
||||
* 订货-主体数据
|
||||
*/
|
||||
private List<BusMaterialsorder> list;
|
||||
|
||||
|
||||
}
|
@ -65,4 +65,30 @@ public class BusCailiaoshebeiPiciVo implements Serializable {
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 订货-采购人
|
||||
*/
|
||||
private String purchasingAgent;
|
||||
/**
|
||||
* 订货-采购时间
|
||||
*/
|
||||
private Date purchasingPeriod;
|
||||
/**
|
||||
* 订货-合同号
|
||||
*/
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 订货-备注
|
||||
*/
|
||||
private String dhRemark;
|
||||
/**
|
||||
* 订货-供应商
|
||||
*/
|
||||
private String dhSupplier;
|
||||
/**
|
||||
* 订货-状态
|
||||
*/
|
||||
private String dhSucceed;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.cailiaoshebei.service;
|
||||
|
||||
import org.dromara.cailiaoshebei.domain.bo.MaterialsorderPcPlanEditReq;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusMaterialsorderVo;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialsorderBo;
|
||||
import org.dromara.cailiaoshebei.domain.BusMaterialsorder;
|
||||
@ -76,4 +77,10 @@ public interface IBusMaterialsorderService extends IService<BusMaterialsorder>{
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean extractDataNewAddition(String batchNumber,Long projectId);
|
||||
|
||||
|
||||
/**
|
||||
* 修改订货单的基础头信息和基础信息
|
||||
*/
|
||||
Boolean modifyTheOrderForm(MaterialsorderPcPlanEditReq req);
|
||||
}
|
||||
|
@ -64,10 +64,6 @@ public class BusCailiaoshebeiServiceImpl extends ServiceImpl<BusCailiaoshebeiMap
|
||||
public TableDataInfo<BusCailiaoshebeiVo> queryPageList(BusCailiaoshebeiBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<BusCailiaoshebei> lqw = buildQueryWrapper(bo);
|
||||
Page<BusCailiaoshebeiVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
// //获取到供货商,随后返回对应的供货商名
|
||||
// List<SubContractor> list = contractorService.list(new LambdaQueryWrapper<SubContractor>().eq(SubContractor::getProjectId, bo.getProjectId()));
|
||||
//
|
||||
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -87,7 +83,7 @@ public class BusCailiaoshebeiServiceImpl extends ServiceImpl<BusCailiaoshebeiMap
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BusCailiaoshebei> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(BusCailiaoshebei::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBatchId()), BusCailiaoshebei::getBatchId, bo.getBatchId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getBatchNumber()), BusCailiaoshebei::getBatchNumber, bo.getBatchNumber());
|
||||
lqw.eq(bo.getSupplierId() != null, BusCailiaoshebei::getSupplierId, bo.getSupplierId());
|
||||
lqw.eq(bo.getProjectId() != null, BusCailiaoshebei::getProjectId, bo.getProjectId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSupplier()), BusCailiaoshebei::getSupplier, bo.getSupplier());
|
||||
|
@ -148,7 +148,7 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
|
||||
public Boolean add(BusMaterialbatchdemandplanAddReq bo) {
|
||||
//1、删除数据
|
||||
LambdaQueryWrapper<BusMaterialbatchdemandplan> eq = new LambdaQueryWrapper<BusMaterialbatchdemandplan>()
|
||||
.eq(BusMaterialbatchdemandplan::getBatchId, bo.getBatchId());
|
||||
.eq(BusMaterialbatchdemandplan::getBatchNumber, bo.getBatchNumber());
|
||||
int delete = baseMapper.delete(eq);
|
||||
if (delete != 1) {
|
||||
throw new RuntimeException("删除失败");
|
||||
|
@ -1,8 +1,14 @@
|
||||
package org.dromara.cailiaoshebei.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
||||
import org.dromara.cailiaoshebei.domain.BusMaterialbatchdemandplan;
|
||||
import org.dromara.cailiaoshebei.domain.bo.MaterialsorderPcPlanEditReq;
|
||||
import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiPiciService;
|
||||
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -11,6 +17,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.utils.BatchNumberGenerator;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialsorderBo;
|
||||
@ -20,9 +27,7 @@ import org.dromara.cailiaoshebei.mapper.BusMaterialsorderMapper;
|
||||
import org.dromara.cailiaoshebei.service.IBusMaterialsorderService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 物资-设备订货Service业务层处理
|
||||
@ -36,6 +41,8 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
||||
|
||||
private final BusMaterialsorderMapper baseMapper;
|
||||
private final IBusCailiaoshebeiPiciService busCailiaoshebeiPiciService;
|
||||
private final IBusMaterialbatchdemandplanService busMaterialbatchdemandplanService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询物资-设备订货
|
||||
@ -78,7 +85,7 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<BusMaterialsorder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(BusMaterialsorder::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBatchId()), BusMaterialsorder::getBatchId, bo.getBatchId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBatchNumber()), BusMaterialsorder::getBatchNumber, bo.getBatchNumber());
|
||||
lqw.eq(bo.getProjectId() != null, BusMaterialsorder::getProjectId, bo.getProjectId());
|
||||
lqw.eq(bo.getCailiaoshebeiId() != null, BusMaterialsorder::getCailiaoshebeiId, bo.getCailiaoshebeiId());
|
||||
lqw.eq(bo.getSuppliespriceId() != null, BusMaterialsorder::getSuppliespriceId, bo.getSuppliespriceId());
|
||||
@ -155,17 +162,66 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean extractDataNewAddition(String batchNumber,Long projectId) {
|
||||
//1、生成批次ID
|
||||
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici().
|
||||
setProjectId(projectId).
|
||||
setBatchType("3").
|
||||
setBatchNumber(BatchNumberGenerator.generateBatchNumber("DH-"));
|
||||
boolean save = busCailiaoshebeiPiciService.save(busCailiaoshebeiPici);
|
||||
if (!save) {
|
||||
// LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
// assert loginUser != null;
|
||||
//1、根据批次号查询主数据
|
||||
List<BusMaterialbatchdemandplan> list = busMaterialbatchdemandplanService.list(
|
||||
new LambdaQueryWrapper<BusMaterialbatchdemandplan>()
|
||||
.eq(BusMaterialbatchdemandplan::getBatchNumber, batchNumber)
|
||||
);
|
||||
//2、遍历主数据,根据供应商分成不同订单存储
|
||||
Map<String,List<BusMaterialsorder>> map = new HashMap<>();
|
||||
for (BusMaterialbatchdemandplan busMaterialbatchdemandplan : list) {
|
||||
String supplierCompany = busMaterialbatchdemandplan.getSupplierCompany();
|
||||
List<BusMaterialsorder> busMaterialsorders = map.get(supplierCompany);
|
||||
//判断如果为空就初始化
|
||||
if (busMaterialsorders == null) {
|
||||
busMaterialsorders = new ArrayList<>();
|
||||
}
|
||||
busMaterialsorders.add(BeanUtil.copyProperties(busMaterialbatchdemandplan, BusMaterialsorder.class));
|
||||
map.put(supplierCompany, busMaterialsorders);
|
||||
}
|
||||
//3、遍历map,根据供应商分成不同订单存储
|
||||
List<BusMaterialsorder> addData = new ArrayList<>();
|
||||
for (Map.Entry<String, List<BusMaterialsorder>> entry : map.entrySet()) {
|
||||
String supplierCompany = entry.getKey();
|
||||
List<BusMaterialsorder> busMaterialsorders = entry.getValue();
|
||||
//3-1、生成批次ID(订货批次ID)
|
||||
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici()
|
||||
.setBatchNumber(BatchNumberGenerator.generateBatchNumber("DH-"))
|
||||
.setProjectId(projectId)
|
||||
.setDhSupplier(supplierCompany) //供应商
|
||||
.setBatchType("3");
|
||||
boolean save = busCailiaoshebeiPiciService.save(busCailiaoshebeiPici);
|
||||
if(!save){
|
||||
throw new RuntimeException("订货批次号新增失败");
|
||||
}
|
||||
//3-2、组装订货详情
|
||||
for (BusMaterialsorder busMaterialsorder : busMaterialsorders) {
|
||||
busMaterialsorder.setBatchNumber(busCailiaoshebeiPici.getBatchNumber());
|
||||
addData.add(busMaterialsorder);
|
||||
}
|
||||
}
|
||||
//3-3、保存订货详情
|
||||
return baseMapper.insertBatch(addData);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean modifyTheOrderForm(MaterialsorderPcPlanEditReq req) {
|
||||
List<BusMaterialsorder> list = req.getList();
|
||||
if (list.isEmpty()){
|
||||
throw new RuntimeException("未获取到主体数据");
|
||||
}
|
||||
//1、修改主体数据标头
|
||||
BusCailiaoshebeiPici busCailiaoshebeiPici = BeanUtil.copyProperties(req, BusCailiaoshebeiPici.class);
|
||||
LambdaQueryWrapper<BusCailiaoshebeiPici> lqw = new LambdaQueryWrapper<BusCailiaoshebeiPici>().eq(BusCailiaoshebeiPici::getBatchNumber,req.getBatchNumber());
|
||||
if(!busCailiaoshebeiPiciService.update(busCailiaoshebeiPici,lqw)){
|
||||
return false;
|
||||
}
|
||||
//2、根据批次号查询主数据
|
||||
BusCailiaoshebeiPici busCailiaoshebeiPici1 = busCailiaoshebeiPiciService.getById(busCailiaoshebeiPici.getId());
|
||||
return null;
|
||||
//2、删除主体详情数据
|
||||
baseMapper.delete(new LambdaQueryWrapper<BusMaterialsorder>().eq(BusMaterialsorder::getBatchNumber, req.getBatchNumber()));
|
||||
//3、新增主体详情数据
|
||||
return baseMapper.insertBatch(list);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user