不允许一个班组入场一个工程多次
This commit is contained in:
parent
69e54eed7b
commit
c0efc5c91a
|
|
@ -70,6 +70,8 @@ public class PmSubTeamContractController extends BaseController {
|
||||||
return toAjax(res);
|
return toAjax(res);
|
||||||
} else if (res==2) {
|
} else if (res==2) {
|
||||||
return error("班组下还有人员未出场");
|
return error("班组下还有人员未出场");
|
||||||
|
}else if (res==3) {
|
||||||
|
return error("班组已入场该工程");
|
||||||
}else {
|
}else {
|
||||||
return error("班组信息已存在");
|
return error("班组信息已存在");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,12 @@ public class PmSubTeamContractServiceImpl implements PmSubTeamContractService {
|
||||||
fileUploadUtils.uploadFile(fileBasicMsgDto.getFiles(), Constants.PM_SUB_TEAM_CONTRACT, pmSubTeamContract.getId().toString(), type,"", "");
|
fileUploadUtils.uploadFile(fileBasicMsgDto.getFiles(), Constants.PM_SUB_TEAM_CONTRACT, pmSubTeamContract.getId().toString(), type,"", "");
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
//查看班组是否已经如果这个工程
|
||||||
|
|
||||||
|
List<PmSubTeamContract> PmSubTeamContractList = pmSubTeamContractMapper.selectSubTeamContractList(pmSubTeamContract);
|
||||||
|
if (PmSubTeamContractList.size()>0){
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
pmSubTeamContract.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
pmSubTeamContract.setCreateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
pmSubTeamContract.setCreateTime(new Date());
|
pmSubTeamContract.setCreateTime(new Date());
|
||||||
pmSubTeamContract.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
pmSubTeamContract.setUpdateUser(SecurityUtils.getLoginUser().getUsername());
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,13 @@
|
||||||
<if test="teamEinStatus!=null and teamEinStatus!= ''">
|
<if test="teamEinStatus!=null and teamEinStatus!= ''">
|
||||||
and team_ein_status LIKE CONCAT('%', #{teamEinStatus}, '%')
|
and team_ein_status LIKE CONCAT('%', #{teamEinStatus}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="teamId!=null and teamId!= ''">
|
<if test="teamId!=null ">
|
||||||
and team_id =#{teamId}
|
and team_id =#{teamId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="proId!=null ">
|
||||||
|
and pro_id =#{proId}
|
||||||
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getSubTeamContractById" resultType="com.bonus.bmw.domain.po.PmSubTeamContract">
|
<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
|
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