1、注释掉新增物品后在详情表中增加记录的代码

dev
yitonglei 3 years ago
parent 6b16970be7
commit d098fd44b5
  1. 22
      lab-service/lab-capital/src/main/java/org/springblade/lims/goods/controller/GoodsController.java
  2. 2
      lab-service/lab-file/src/main/java/org/springblade/file/service/impl/QualityFileServiceImpl.java

@ -10,6 +10,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.apache.commons.lang.math.RandomUtils;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
@ -137,16 +138,17 @@ public class GoodsController extends BladeController {
}
// goods.setDeactivate(1);
// 物品详情入库
ProductStoreDetial productStoreDetial = new ProductStoreDetial();
productStoreDetial.setGoodsId(goods.getId());
productStoreDetial.setGoodsName(goods.getName());
productStoreDetial.setPNum(1);
productStoreDetial.setNum(goods.getNum());
productStoreDetial.setBeyondTime(new Date());
productStoreDetial.setCompany(goods.getCompany());
productStoreDetial.setLocation(goods.getLocation());
productStoreDetial.setStatus(0);
productStoreDetialService.save(productStoreDetial);
goods.setId(RandomUtils.nextLong());
// ProductStoreDetial productStoreDetial = new ProductStoreDetial();
// productStoreDetial.setGoodsId(goods.getId());
// productStoreDetial.setGoodsName(goods.getName());
// productStoreDetial.setPNum(1);
// productStoreDetial.setNum(goods.getNum());
// productStoreDetial.setBeyondTime(new Date());
// productStoreDetial.setCompany(goods.getCompany());
// productStoreDetial.setLocation(goods.getLocation());
// productStoreDetial.setStatus(0);
// productStoreDetialService.save(productStoreDetial);
if (goods.getBigClassId() != null) {
ProductClass productClass = productClassService.getById(goods.getBigClassId());
goods.setBigClass(productClass.getName());

@ -109,7 +109,7 @@ public class QualityFileServiceImpl extends BaseServiceImpl<QualityFileMapper, Q
qualityFile.setId(fileId);
QualityFileAssistent assistent = new QualityFileAssistent();
assistent.setVersion(1);
assistent.setVersion(StringUtil.isBlank(qualityFile.getVersion()) == true ? 1 : Integer.parseInt(qualityFile.getVersion()));
assistent.setStatus(1);
assistent.setName("默认名称");
assistent.setQualityFileId(qualityFile.getId());

Loading…
Cancel
Save