bug修复
This commit is contained in:
parent
8fbd378710
commit
6b8b81591a
|
|
@ -60,7 +60,7 @@ public class PmMainProjectVo {
|
|||
/**
|
||||
*工程状态
|
||||
*/
|
||||
@Excel(name = "工程状态")
|
||||
@Excel(name = "工程状态",readConverterExp ="0=在建,1=停工,2=筹建,3=遗留收尾,4=完工")
|
||||
private String proStatus;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -30,4 +30,5 @@ public interface PmSubComMapper {
|
|||
*/
|
||||
int delSubCompany(PmSubCompany pmSubCompany);
|
||||
|
||||
List<PmSubCompany> selectSubCompanyListAll(PmSubCompany pmSubCompany);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,4 +27,6 @@ public interface PmSubTeamMapper {
|
|||
int delSubTeam(PmSubTeam pmSubTeam);
|
||||
|
||||
List<PmSubTeam> selectSubTeamListAll(PmSubTeam pmSubTeam);
|
||||
|
||||
PmSubTeam getSubTeamByName(PmSubTeam pmSubTeam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 != ''" >
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue