|
@@ -12,6 +12,7 @@ import com.ruoyi.zdsz.domain.bo.ZEngineeringInfoBo;
|
|
|
import com.ruoyi.zdsz.service.IZEnginMaterialQualityService;
|
|
|
import com.ruoyi.zdsz.service.IZEnginSpecificationsService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -118,10 +119,12 @@ public class ZEngineeringMaterialServiceImpl implements IZEngineeringMaterialSer
|
|
|
@Override
|
|
|
@DynamicName(spel = "#bo.createTime")
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- @Async("threadPoolTaskExecutor")
|
|
|
+ //@Async("threadPoolTaskExecutor")
|
|
|
public ZEngineeringMaterial insert(ZEngineeringMaterialBo bo) {
|
|
|
- ZEngineeringMaterial add = BeanUtil.toBean(bo, ZEngineeringMaterial.class);
|
|
|
+ ZEngineeringMaterial add = new ZEngineeringMaterial();
|
|
|
+ BeanUtils.copyProperties(bo,add);
|
|
|
validEntityBeforeSave(add);
|
|
|
+ add.setUpdateTime(new Date());
|
|
|
boolean flag = baseMapper.insert(add) > 0;
|
|
|
if (flag) {
|
|
|
bo.setId(add.getId());
|
|
@@ -182,7 +185,6 @@ public class ZEngineeringMaterialServiceImpl implements IZEngineeringMaterialSer
|
|
|
inlist.stream().forEach(i -> {
|
|
|
if (item.getId() == i) {
|
|
|
ZEngineeringMaterial update2 = BeanUtil.toBean(item, ZEngineeringMaterial.class);
|
|
|
-
|
|
|
update2.setDetailsId(Infobo.getId());
|
|
|
update2.setUpdateTime(new Date());
|
|
|
zEngineeringMaterialList.add(update2);
|