bug修复
This commit is contained in:
parent
6b8b81591a
commit
bd986822cb
|
|
@ -86,7 +86,7 @@ public class PmProjectController extends BaseController {
|
|||
if (res>0){
|
||||
return toAjax(res);
|
||||
}else {
|
||||
return error("总工程下存在标段工程");
|
||||
return error("标段工程被绑定分包请勿删除");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class PmSubTeamController extends BaseController {
|
|||
if (res>0){
|
||||
return toAjax(res);
|
||||
}else {
|
||||
return error();
|
||||
return error("班组已经出入场请勿删除");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.bonus.bmw.service.impl;
|
|||
import com.bonus.bmw.domain.po.BmSubContract;
|
||||
import com.bonus.bmw.domain.po.PmProject;
|
||||
import com.bonus.bmw.domain.po.PmSubCompany;
|
||||
import com.bonus.bmw.domain.vo.BmSubContractVo;
|
||||
import com.bonus.bmw.domain.vo.PmProjectVo;
|
||||
import com.bonus.bmw.mapper.BmSubContractMapper;
|
||||
import com.bonus.bmw.mapper.PmProjectMapper;
|
||||
import com.bonus.bmw.service.PmProjectService;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
|
|
@ -29,7 +31,8 @@ public class PmProjectServiceImpl implements PmProjectService {
|
|||
@Resource
|
||||
private PmProjectMapper pmProjectMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private BmSubContractMapper bmSubContractMapper;
|
||||
/**
|
||||
* 标段工程列表
|
||||
*/
|
||||
|
|
@ -103,6 +106,12 @@ public class PmProjectServiceImpl implements PmProjectService {
|
|||
*/
|
||||
@Override
|
||||
public int delProject(PmProject pmProject) {
|
||||
BmSubContract bmSubContract = new BmSubContract();
|
||||
bmSubContract.setProId(pmProject.getId());
|
||||
List<BmSubContractVo> pmSubTeamContractList = bmSubContractMapper.selectSubContractList(bmSubContract);
|
||||
if (pmSubTeamContractList.size()>0){
|
||||
return 0;
|
||||
}
|
||||
return pmProjectMapper.delProject(pmProject);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.bmw.service.impl;
|
||||
|
||||
import com.bonus.bmw.domain.po.PmSubTeam;
|
||||
import com.bonus.bmw.domain.po.PmSubTeamContract;
|
||||
import com.bonus.bmw.mapper.PmSubTeamContractMapper;
|
||||
import com.bonus.bmw.mapper.PmSubTeamMapper;
|
||||
import com.bonus.bmw.service.PmSubTeamService;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
|
|
@ -23,6 +25,9 @@ public class PmSubTeamServiceImpl implements PmSubTeamService {
|
|||
@Resource
|
||||
private PmSubTeamMapper pmSubTeamMapper;
|
||||
|
||||
@Resource
|
||||
private PmSubTeamContractMapper pmSubTeamContractMapper;
|
||||
|
||||
/**
|
||||
* 分包班组信息列表
|
||||
*/
|
||||
|
|
@ -63,7 +68,12 @@ public class PmSubTeamServiceImpl implements PmSubTeamService {
|
|||
*/
|
||||
@Override
|
||||
public int delSubTeam(PmSubTeam pmSubTeam) {
|
||||
|
||||
PmSubTeamContract pmSubTeamContract = new PmSubTeamContract();
|
||||
pmSubTeamContract.setTeamId(pmSubTeam.getId());
|
||||
List<PmSubTeamContract> pmSubTeamContractList = pmSubTeamContractMapper.selectSubTeamContractList(pmSubTeamContract);
|
||||
if (pmSubTeamContractList.size()>0){
|
||||
return 0;
|
||||
}
|
||||
return pmSubTeamMapper.delSubTeam(pmSubTeam);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@
|
|||
<if test="subId!=null and subId!=''">
|
||||
and bsc.sub_id =#{subId}
|
||||
</if>
|
||||
<if test="proId!=null and proId!=''">
|
||||
and bsc.pro_id =#{proId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getSubContractBySubContractName" resultType="com.bonus.bmw.domain.po.BmSubContract">
|
||||
select bsc.id as id,
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@
|
|||
<if test="teamEinStatus!=null and teamEinStatus!= ''">
|
||||
and team_ein_status LIKE CONCAT('%', #{teamEinStatus}, '%')
|
||||
</if>
|
||||
<if test="teamId!=null and teamId!= ''">
|
||||
and team_id =#{teamId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getSubTeamContractById" resultType="com.bonus.bmw.domain.po.PmSubTeamContract">
|
||||
select id,team_id,team_name,sub_id,sub_name,pro_id,pro_name,team_ein_time,team_ein_status,team_exit_time
|
||||
|
|
|
|||
Loading…
Reference in New Issue