机具类型优化
This commit is contained in:
parent
15ac3613cd
commit
a9eb35b238
|
|
@ -12,10 +12,7 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,24 +91,32 @@ public class MaTypeServiceImpl implements ITypeService {
|
||||||
typeFileMapper.insertMaTypeFile(typeFile1);
|
typeFileMapper.insertMaTypeFile(typeFile1);
|
||||||
}
|
}
|
||||||
// 库管员配置
|
// 库管员配置
|
||||||
|
if (Objects.nonNull(maType.getKeeperUserId())) {
|
||||||
MaTypeKeeper typeKeeper = new MaTypeKeeper();
|
MaTypeKeeper typeKeeper = new MaTypeKeeper();
|
||||||
typeKeeper.setUserId(maType.getKeeperUserId());
|
typeKeeper.setUserId(maType.getKeeperUserId());
|
||||||
typeKeeper.setTypeId(typeId);
|
typeKeeper.setTypeId(typeId);
|
||||||
typeKeeper.setCreateTime(DateUtils.getNowDate());
|
typeKeeper.setCreateTime(DateUtils.getNowDate());
|
||||||
maTypeMapper.insertKeeper(typeKeeper);
|
maTypeMapper.insertKeeper(typeKeeper);
|
||||||
|
}
|
||||||
|
|
||||||
// 维修员配置
|
// 维修员配置
|
||||||
|
if (Objects.nonNull(maType.getRepairUserId())) {
|
||||||
MaTypeRepair typeRepair = new MaTypeRepair();
|
MaTypeRepair typeRepair = new MaTypeRepair();
|
||||||
typeRepair.setUserId(maType.getRepairUserId());
|
typeRepair.setUserId(maType.getRepairUserId());
|
||||||
typeRepair.setTypeId(typeId);
|
typeRepair.setTypeId(typeId);
|
||||||
typeRepair.setCreateTime(DateUtils.getNowDate());
|
typeRepair.setCreateTime(DateUtils.getNowDate());
|
||||||
maTypeMapper.insertRepair(typeRepair);
|
maTypeMapper.insertRepair(typeRepair);
|
||||||
|
}
|
||||||
|
|
||||||
// 资产属性配置
|
// 资产属性配置
|
||||||
|
if (maType.getPropId() > 0) {
|
||||||
MaPropSet propSet = new MaPropSet();
|
MaPropSet propSet = new MaPropSet();
|
||||||
propSet.setTypeId(typeId);
|
propSet.setTypeId(typeId);
|
||||||
propSet.setPropId(maType.getPropId());
|
propSet.setPropId(maType.getPropId());
|
||||||
propSet.setCreateTime(DateUtils.getNowDate());
|
propSet.setCreateTime(DateUtils.getNowDate());
|
||||||
maTypeMapper.insertMaPropSet(propSet);
|
maTypeMapper.insertMaPropSet(propSet);
|
||||||
|
}
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue