权限管理

This commit is contained in:
马三炮 2025-08-18 13:24:10 +08:00
parent 37bf2efaa1
commit bc411b893a
15 changed files with 163 additions and 8 deletions

View File

@ -85,13 +85,13 @@ public class PmPostTypeController extends BaseController{
}
/**
* 工种类型列表
* 工种类型下拉框
*/
@GetMapping("/listAll")
@SysLog(title = "工种类型管理", businessType = OperaType.QUERY, logType = 0, module = "工种类型管理->工种类型列表")
public TableDataInfo listAll(PmPostType pmPostType) {
try {
List<PmPostType> list = pmPostTypeService.selectPostTypeList(pmPostType);
List<PmPostType> list = pmPostTypeService.selectPostTypeListAll(pmPostType);
return getDataTable(list);
} catch (Exception e) {
log.error(e.toString(), e);

View File

@ -110,13 +110,13 @@ public class PmProjectController extends BaseController {
}
/**
* 标段工程列表
* 标段工程下拉框
*/
@GetMapping("/listAll")
@SysLog(title = "标段工程", businessType = OperaType.QUERY, logType = 0, module = "标段工程->标段工程列表")
public TableDataInfo listAll(PmProject pmProject) {
try {
List<PmProjectVo> list = pmProjectService.selectProjectList(pmProject);
List<PmProjectVo> list = pmProjectService.selectProjectListAll(pmProject);
return getDataTable(list);
} catch (Exception e) {
log.error(e.toString(), e);
@ -125,7 +125,7 @@ public class PmProjectController extends BaseController {
}
/**
* 标段工程列表
* 根据分包商id获取标段工程列表
*/
@GetMapping("/listAllBySubId")
@SysLog(title = "标段工程", businessType = OperaType.QUERY, logType = 0, module = "标段工程->标段工程列表")

View File

@ -97,14 +97,13 @@ public class PmSubController extends BaseController {
}
/**
* 分包商列表
* 分包商下拉框
*/
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pm:sub:list"))
@GetMapping("/listAll")
@SysLog(title = "分包商管理", businessType = OperaType.QUERY, logType = 0, module = "分包商管理->分包商列表")
public TableDataInfo listAll(PmSub pmSub) {
try {
List<PmSub> list = pmSubService.selectSubList(pmSub);
List<PmSub> list = pmSubService.selectSubListAll(pmSub);
return getDataTable(list);
} catch (Exception e) {
log.error(e.toString(), e);

View File

@ -30,4 +30,11 @@ public interface PmPostTypeMapper {
* @return
*/
PmPostType selectPostTypeByPostName(PmPostType pmPostType);
/**
* 工种类型下拉框
* @param pmPostType
* @return
*/
List<PmPostType> selectPostTypeListAll(PmPostType pmPostType);
}

View File

@ -53,5 +53,17 @@ public interface PmProjectMapper {
void updateMainProject(@Param("mainProId") Integer mainProId, @Param("proStatus")char proStatus);
/**
* 根据分包商id获取标段工程列表
* @param bmSubContract
* @return
*/
List<PmProjectVo> listAllBySubId(BmSubContract bmSubContract);
/**
* 标段工程下拉框
* @param pmProject
* @return
*/
List<PmProjectVo> selectProjectListAll(PmProject pmProject);
}

View File

@ -6,13 +6,40 @@ import java.util.List;
public interface PmSubMapper {
/**
* 分包商列表
* @param pmSub
* @return
*/
List<PmSub> selectSubList(PmSub pmSub);
/**
* 根据分包商名称获取分包商信息
* @param pmSub
* @return
*/
PmSub getSubBySubName(PmSub pmSub);
/**
* 修改分包商
* @param pmSub
* @return
*/
int updateSub(PmSub pmSub);
/**
* 新增分包商
* @param pmSub
* @return
*/
int addSub(PmSub pmSub);
/**
* 删除分包商
* @param pmSub
* @return
*/
int delSub(PmSub pmSub);
List<PmSub> selectSubListAll(PmSub pmSub);
}

View File

@ -20,4 +20,11 @@ public interface PmPostTypeService {
* 删除工种类型
*/
int delPostType(PmPostType pmPostType);
/**
* 工种类型下拉框
* @param pmPostType
* @return
*/
List<PmPostType> selectPostTypeListAll(PmPostType pmPostType);
}

View File

@ -22,5 +22,17 @@ public interface PmProjectService {
*/
int delProject(PmProject pmProject);
/**
* 根据分包商id获取标段工程列表
* @param bmSubContract
* @return
*/
List<PmProjectVo> listAllBySubId(BmSubContract bmSubContract);
/**
* 标段工程下拉框
* @param pmProject
* @return
*/
List<PmProjectVo> selectProjectListAll(PmProject pmProject);
}

View File

@ -6,9 +6,32 @@ import com.bonus.bmw.domain.po.PmSub;
import java.util.List;
public interface PmSubService {
/**
* 分包商列表
* @param pmSub
* @return
*/
List<PmSub> selectSubList(PmSub pmSub);
/**
* 新增和修改分包商
* @param pmSub
* @param fileBasicMsgDto
* @return
*/
int addOrUpdateSub(PmSub pmSub, FileBasicMsgDto fileBasicMsgDto);
/**
* 删除分包商
* @param pmSub
* @return
*/
int delSub(PmSub pmSub);
/**
* 分包商下拉框
* @param pmSub
* @return
*/
List<PmSub> selectSubListAll(PmSub pmSub);
}

View File

@ -64,4 +64,14 @@ public class PmPostTypeServiceImpl implements PmPostTypeService {
public int delPostType(PmPostType pmPostType) {
return pmPostTypeMapper.delPostType(pmPostType);
}
/**
* 工种类型下拉框
* @param pmPostType
* @return
*/
@Override
public List<PmPostType> selectPostTypeListAll(PmPostType pmPostType) {
return pmPostTypeMapper.selectPostTypeListAll(pmPostType);
}
}

View File

@ -104,8 +104,23 @@ public class PmProjectServiceImpl implements PmProjectService {
return pmProjectMapper.delProject(pmProject);
}
/**
* 根据分包商id获取标段工程列表
* @param bmSubContract
* @return
*/
@Override
public List<PmProjectVo> listAllBySubId(BmSubContract bmSubContract) {
return pmProjectMapper.listAllBySubId(bmSubContract);
}
/**
* 标段工程下拉框
* @param pmProject
* @return
*/
@Override
public List<PmProjectVo> selectProjectListAll(PmProject pmProject) {
return pmProjectMapper.selectProjectListAll(pmProject);
}
}

View File

@ -37,6 +37,11 @@ public class PmSubServiceImpl implements PmSubService {
@Resource
private BmSubContractMapper bmSubContractMapper;
/**
* 分包商列表
* @param pmSub
* @return
*/
@Override
public List<PmSub> selectSubList(PmSub pmSub) {
List<PmSub> pmSubList = pmSubMapper.selectSubList(pmSub);
@ -49,6 +54,12 @@ public class PmSubServiceImpl implements PmSubService {
return pmSubList;
}
/**
* 新增和修改分包商
* @param pmSub
* @param fileBasicMsgDto
* @return
*/
@Override
@Transactional
public int addOrUpdateSub(PmSub pmSub, FileBasicMsgDto fileBasicMsgDto) {
@ -92,6 +103,11 @@ public class PmSubServiceImpl implements PmSubService {
return res;
}
/**
* 删除分包商
* @param pmSub
* @return
*/
@Override
@Transactional
public int delSub(PmSub pmSub) {
@ -109,4 +125,14 @@ public class PmSubServiceImpl implements PmSubService {
return res;
}
/**
* 分包商下拉框
* @param pmSub
* @return
*/
@Override
public List<PmSub> selectSubListAll(PmSub pmSub) {
return pmSubMapper.selectSubListAll(pmSub);
}
}

View File

@ -41,4 +41,11 @@
select id,post_name,is_special,is_enable,create_user,update_user,create_time,update_time
from pm_post_type where is_active='1' and post_name=#{postName}
</select>
<select id="selectPostTypeListAll" resultType="com.bonus.bmw.domain.po.PmPostType">
select id,post_name
from pm_post_type where is_active='1'
<if test="postName!=null ">
AND post_name LIKE CONCAT('%', #{postName}, '%')
</if>
</select>
</mapper>

View File

@ -169,4 +169,10 @@
left join bm_sub_contract bsc on bsc.pro_id = pp.id
where pp.is_active = '1' and bsc.id = #{subId}
</select>
<select id="selectProjectListAll" resultType="com.bonus.bmw.domain.vo.PmProjectVo">
select pp.id as id,
pp.pro_name as proName
from pm_project pp
where pp.is_active = '1'
</select>
</mapper>

View File

@ -81,4 +81,8 @@
id_card_front,id_card_reverse,corporate_seal,sub_ein_status
from pm_sub where is_active='1' and sub_name= #{subName}
</select>
<select id="selectSubListAll" resultType="com.bonus.bmw.domain.po.PmSub">
select id,sub_name
from pm_sub where is_active='1'
</select>
</mapper>