分包商评价/核心人员评价,不展示核心人员姓名问题修复
This commit is contained in:
parent
246b4bc390
commit
f7f68dceb2
|
|
@ -71,4 +71,6 @@ public interface PersonSettingDao {
|
|||
Boolean selectFormanIsExist(TeamPersonBean o);
|
||||
|
||||
int updateTeamForeman(TeamPersonBean o);
|
||||
|
||||
int updateTeamBasicForeman(TeamPersonBean o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.bonus.bmw.team.entity.TeamPersonTransferBean;
|
|||
import com.bonus.common.core.constant.Constants;
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
|
@ -204,7 +205,11 @@ public class PersonSettingServiceImpl implements PersonSettingService {
|
|||
}
|
||||
}
|
||||
int i = dao.updateTeamForeman(o);
|
||||
return i > 0 ? R.ok(Constants.UPDATE_SUCCESS) : R.fail(Constants.UPDATE_FAIL);
|
||||
if(StringUtils.isNotBlank(o.getIsForeman()) && StringUtils.isNotBlank(o.getIdNumber())) {
|
||||
int j = dao.updateTeamBasicForeman(o);
|
||||
i += j;
|
||||
}
|
||||
return i > 1 ? R.ok(Constants.UPDATE_SUCCESS) : R.fail(Constants.UPDATE_FAIL);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,5 +328,19 @@
|
|||
where t.is_foreman = 1
|
||||
</select>
|
||||
|
||||
<update id="updateTeamBasicForeman">
|
||||
update bm_sub_team set
|
||||
<if test="isForeman == 1">
|
||||
team_Idnumber = #{idNumber}
|
||||
</if>
|
||||
<if test="isForeman == 0">
|
||||
team_Idnumber = null
|
||||
</if>
|
||||
, update_time = now()
|
||||
where id = (
|
||||
select team_id from bm_team_user_relation
|
||||
where id_number = #{idNumber} and is_active = 1)
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue