This commit is contained in:
parent
89a9ebdb94
commit
e656419492
|
|
@ -154,10 +154,10 @@ public interface PartLeaseMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询配件库管员配置
|
* 查询配件库管员配置
|
||||||
* @param typeId
|
* @param typeKeepers
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<MaPartTypeKeeper> selectTypeKeeperByTypeId(Long typeId);
|
List<MaPartTypeKeeper> selectTypeKeeperByTypeId(MaPartTypeKeeper typeKeepers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询配件库管关系
|
* 查询配件库管关系
|
||||||
|
|
|
||||||
|
|
@ -429,14 +429,13 @@ public class PartLeaseServiceImpl implements PartLeaseService {
|
||||||
if (!CollectionUtils.isEmpty(typeKeepers.getTypeIds())) {
|
if (!CollectionUtils.isEmpty(typeKeepers.getTypeIds())) {
|
||||||
for (Long typeId : typeKeepers.getTypeIds()) {
|
for (Long typeId : typeKeepers.getTypeIds()) {
|
||||||
// 先根据typeId查询库管员配置是否已经存在,存在则先删除
|
// 先根据typeId查询库管员配置是否已经存在,存在则先删除
|
||||||
List<MaPartTypeKeeper> list = partLeaseMapper.selectTypeKeeperByTypeId(typeId);
|
typeKeepers.setTypeId(typeId);
|
||||||
|
List<MaPartTypeKeeper> list = partLeaseMapper.selectTypeKeeperByTypeId(typeKeepers);
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
for (MaPartTypeKeeper typeKeeper : list) {
|
for (MaPartTypeKeeper typeKeeper : list) {
|
||||||
partLeaseMapper.deleteTypeKeeper(typeKeeper);
|
partLeaseMapper.deleteTypeKeeper(typeKeeper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
typeKeepers.setTypeId(typeId);
|
|
||||||
typeKeepers.setUserId(typeKeepers.getUserId());
|
|
||||||
typeKeepers.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
typeKeepers.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||||
typeKeepers.setCreateTime(DateUtils.getNowDate());
|
typeKeepers.setCreateTime(DateUtils.getNowDate());
|
||||||
int res = partLeaseMapper.insertTypeKeeper(typeKeepers);
|
int res = partLeaseMapper.insertTypeKeeper(typeKeepers);
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,7 @@
|
||||||
ma_part_type_keeper
|
ma_part_type_keeper
|
||||||
WHERE
|
WHERE
|
||||||
type_id = #{typeId}
|
type_id = #{typeId}
|
||||||
|
AND user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUserList" resultType="com.bonus.material.ma.domain.PartType">
|
<select id="selectUserList" resultType="com.bonus.material.ma.domain.PartType">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue