不允许一个班组入场一个工程多次

This commit is contained in:
马三炮 2025-08-29 16:27:52 +08:00
parent 69e54eed7b
commit c0efc5c91a
3 changed files with 13 additions and 1 deletions

View File

@ -70,6 +70,8 @@ public class PmSubTeamContractController extends BaseController {
return toAjax(res);
} else if (res==2) {
return error("班组下还有人员未出场");
}else if (res==3) {
return error("班组已入场该工程");
}else {
return error("班组信息已存在");
}

View File

@ -75,6 +75,12 @@ public class PmSubTeamContractServiceImpl implements PmSubTeamContractService {
fileUploadUtils.uploadFile(fileBasicMsgDto.getFiles(), Constants.PM_SUB_TEAM_CONTRACT, pmSubTeamContract.getId().toString(), type,"", "");
}
}else {
//查看班组是否已经如果这个工程
List<PmSubTeamContract> PmSubTeamContractList = pmSubTeamContractMapper.selectSubTeamContractList(pmSubTeamContract);
if (PmSubTeamContractList.size()>0){
return 3;
}
pmSubTeamContract.setCreateUser(SecurityUtils.getLoginUser().getUsername());
pmSubTeamContract.setCreateTime(new Date());
pmSubTeamContract.setUpdateUser(SecurityUtils.getLoginUser().getUsername());

View File

@ -41,9 +41,13 @@
<if test="teamEinStatus!=null and teamEinStatus!= ''">
and team_ein_status LIKE CONCAT('%', #{teamEinStatus}, '%')
</if>
<if test="teamId!=null and teamId!= ''">
<if test="teamId!=null ">
and team_id =#{teamId}
</if>
<if test="proId!=null ">
and pro_id =#{proId}
</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