bug修复

This commit is contained in:
马三炮 2025-08-28 10:08:01 +08:00
parent 8fbd378710
commit 6b8b81591a
10 changed files with 37 additions and 5 deletions

View File

@ -60,7 +60,7 @@ public class PmMainProjectVo {
/**
*工程状态
*/
@Excel(name = "工程状态")
@Excel(name = "工程状态",readConverterExp ="0=在建,1=停工,2=筹建,3=遗留收尾,4=完工")
private String proStatus;
/**

View File

@ -30,4 +30,5 @@ public interface PmSubComMapper {
*/
int delSubCompany(PmSubCompany pmSubCompany);
List<PmSubCompany> selectSubCompanyListAll(PmSubCompany pmSubCompany);
}

View File

@ -27,4 +27,6 @@ public interface PmSubTeamMapper {
int delSubTeam(PmSubTeam pmSubTeam);
List<PmSubTeam> selectSubTeamListAll(PmSubTeam pmSubTeam);
PmSubTeam getSubTeamByName(PmSubTeam pmSubTeam);
}

View File

@ -81,7 +81,7 @@ public class PmSubComServiceImpl implements PmSubComService {
@Override
public List<PmSubCompany> selectSubCompanyListAll(PmSubCompany pmSubCompany) {
List<PmSubCompany> pmSubCompanyList = pmSubComMapper.selectSubCompanyList(pmSubCompany);
List<PmSubCompany> pmSubCompanyList = pmSubComMapper.selectSubCompanyListAll(pmSubCompany);
if (pmSubCompanyList.size()>0){
//获取分公司下面的项目部
for (PmSubCompany pmSubCompanyNew: pmSubCompanyList) {

View File

@ -36,13 +36,20 @@ public class PmSubTeamServiceImpl implements PmSubTeamService {
*/
@Override
public int addOrUpdateSubTeam(PmSubTeam pmSubTeam) {
PmSubTeam pmSubTeamOld = pmSubTeamMapper.getSubTeamByName(pmSubTeam);
//存在则删除后新增不存在则新增
if(StringUtils.isNotNull(pmSubTeam.getId())){
if (StringUtils.isNotNull(pmSubTeamOld) && !pmSubTeamOld.getId().equals(pmSubTeam.getId())){
return 0;
}
pmSubTeam.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
pmSubTeam.setUpdateTime(new Date());
return pmSubTeamMapper.updateSubTeam(pmSubTeam);
}else {
if (StringUtils.isNotNull(pmSubTeamOld)){
return 0;
}
pmSubTeam.setCreateUser(SecurityUtils.getLoginUser().getUsername());
pmSubTeam.setCreateTime(new Date());
pmSubTeam.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
@ -56,6 +63,7 @@ public class PmSubTeamServiceImpl implements PmSubTeamService {
*/
@Override
public int delSubTeam(PmSubTeam pmSubTeam) {
return pmSubTeamMapper.delSubTeam(pmSubTeam);
}

View File

@ -14,7 +14,7 @@
<if test="orgName!= null and orgName != ''" >
org_name=#{orgName},
</if>
<if test="isEnable!= null and isEnable != ''" >
<if test="isEnable!= null " >
is_enable=#{isEnable},
</if>
<if test="updateUser!= null and updateUser != ''" >

View File

@ -43,7 +43,7 @@
</select>
<select id="selectPostTypeListAll" resultType="com.bonus.bmw.domain.po.PmPostType">
select id,post_name
from pm_post_type where is_active='1'
from pm_post_type where is_active='1' and is_enable='1'
<if test="postName!=null ">
AND post_name LIKE CONCAT('%', #{postName}, '%')
</if>

View File

@ -168,6 +168,7 @@
from pm_project pp
left join bm_sub_contract bsc on bsc.pro_id = pp.id
where pp.is_active = '1' and bsc.sub_id = #{subId}
GROUP BY pp.id
</select>
<select id="selectProjectListAll" resultType="com.bonus.bmw.domain.vo.PmProjectVo">
select pp.id as id,

View File

@ -59,7 +59,21 @@
psc.update_time as updateTime
from pm_sub_company psc
left join pm_company pc on psc.com_id = pc.id
where pc.is_active = '1' and psc.sub_company_name =#{subCompanyName}
where psc.is_active = '1' and psc.sub_company_name =#{subCompanyName}
</select>
<select id="selectSubCompanyListAll" resultType="com.bonus.bmw.domain.po.PmSubCompany">
select psc.id as id,
psc.com_id as comId,
pc.company_name as companyName,
psc.sub_company_name as subCompanyName,
psc.is_enable as isEnable,
psc.create_user as createUser,
psc.update_user as updateUser,
psc.create_time as createTime,
psc.update_time as updateTime
from pm_sub_company psc
left join pm_company pc on psc.com_id = pc.id
where psc.is_active = '1' and psc.is_enable='1'
</select>
</mapper>

View File

@ -62,4 +62,10 @@
and pst.sub_id=#{subId}
</if>
</select>
<select id="getSubTeamByName" resultType="com.bonus.bmw.domain.po.PmSubTeam">
select pst.id as id,
pst.team_name as teamName
from pm_sub_team pst
where pst.is_active = '1' and pst.sub_id=#{subId} and pst.team_name = #{teamName}
</select>
</mapper>