jsk 机具库存查询 权限改造
This commit is contained in:
parent
b84d468e49
commit
e9eeaffa11
|
|
@ -10,6 +10,7 @@ import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
||||||
import com.bonus.material.basic.mapper.ComplexQueryMapper;
|
import com.bonus.material.basic.mapper.ComplexQueryMapper;
|
||||||
import com.bonus.material.basic.service.ComplexQueryService;
|
import com.bonus.material.basic.service.ComplexQueryService;
|
||||||
import com.bonus.material.ma.domain.Type;
|
import com.bonus.material.ma.domain.Type;
|
||||||
|
import com.bonus.material.ma.service.ITypeService;
|
||||||
import com.bonus.material.part.domain.PartInventory;
|
import com.bonus.material.part.domain.PartInventory;
|
||||||
import com.bonus.material.part.domain.PartTypeQueryDto;
|
import com.bonus.material.part.domain.PartTypeQueryDto;
|
||||||
import com.bonus.material.push.domain.MachineInfoBean;
|
import com.bonus.material.push.domain.MachineInfoBean;
|
||||||
|
|
@ -36,6 +37,9 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
||||||
@Resource
|
@Resource
|
||||||
private ComplexQueryMapper complexQueryMapper;
|
private ComplexQueryMapper complexQueryMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITypeService iTypeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工程机具使用列表
|
* 工程机具使用列表
|
||||||
*
|
*
|
||||||
|
|
@ -720,6 +724,11 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
||||||
public List<RetainedEquipmentInfo> getPartPersonNum(RetainedEquipmentInfo bean) {
|
public List<RetainedEquipmentInfo> getPartPersonNum(RetainedEquipmentInfo bean) {
|
||||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||||
bean.setUserId(userId);
|
bean.setUserId(userId);
|
||||||
|
/**
|
||||||
|
* jsk
|
||||||
|
*/
|
||||||
|
Long companyId=iTypeService.getUserDeptId();
|
||||||
|
bean.setCompanyId(companyId.intValue());
|
||||||
return complexQueryMapper.getPartPersonNum(bean);
|
return complexQueryMapper.getPartPersonNum(bean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import com.bonus.common.core.utils.DateUtils;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.material.ma.domain.TypeKeeper;
|
import com.bonus.material.ma.domain.TypeKeeper;
|
||||||
|
import com.bonus.material.ma.service.ITypeService;
|
||||||
import com.bonus.material.part.domain.PartLeaseDetails;
|
import com.bonus.material.part.domain.PartLeaseDetails;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
|
@ -21,6 +22,8 @@ import com.bonus.material.ma.mapper.PartTypeMapper;
|
||||||
import com.bonus.material.ma.domain.PartType;
|
import com.bonus.material.ma.domain.PartType;
|
||||||
import com.bonus.material.ma.service.IPartTypeService;
|
import com.bonus.material.ma.service.IPartTypeService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配件类型管理Service业务层处理
|
* 配件类型管理Service业务层处理
|
||||||
*
|
*
|
||||||
|
|
@ -34,6 +37,9 @@ public class PartTypeServiceImpl implements IPartTypeService
|
||||||
@Autowired
|
@Autowired
|
||||||
private PartTypeMapper partTypeMapper;
|
private PartTypeMapper partTypeMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITypeService iTypeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询配件类型管理
|
* 查询配件类型管理
|
||||||
*
|
*
|
||||||
|
|
@ -148,6 +154,11 @@ public class PartTypeServiceImpl implements IPartTypeService
|
||||||
partType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
partType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||||
partType.setParentId(partType.getId() != 0 ? partType.getId() : 0L);
|
partType.setParentId(partType.getId() != 0 ? partType.getId() : 0L);
|
||||||
partType.setLevel(partType.getLevel() != null ? String.valueOf(Integer.valueOf(partType.getLevel()) + 1) : "1");
|
partType.setLevel(partType.getLevel() != null ? String.valueOf(Integer.valueOf(partType.getLevel()) + 1) : "1");
|
||||||
|
/**
|
||||||
|
* jsk
|
||||||
|
*/
|
||||||
|
Long companyId=iTypeService.getUserDeptId();
|
||||||
|
partType.setCompanyId(companyId+"");
|
||||||
int result = partTypeMapper.insertPartType(partType);
|
int result = partTypeMapper.insertPartType(partType);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);
|
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);
|
||||||
|
|
|
||||||
|
|
@ -1705,6 +1705,9 @@
|
||||||
JOIN ma_part_type_keeper mtk ON mtk.type_id = mt.pa_id AND mtk.user_id = #{userId}
|
JOIN ma_part_type_keeper mtk ON mtk.type_id = mt.pa_id AND mtk.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
WHERE mt.del_flag = '0' and mt.`level` = '3'
|
WHERE mt.del_flag = '0' and mt.`level` = '3'
|
||||||
|
<if test="companyId != null and companyId != ''">
|
||||||
|
and mt.company_id=#{companyId}
|
||||||
|
</if>
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (
|
and (
|
||||||
mt2.pa_name like concat('%',#{keyWord},'%') or
|
mt2.pa_name like concat('%',#{keyWord},'%') or
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue